Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve TypeOperatorType to allow it to be hyperlinkable #1161

Merged
merged 1 commit into from Jan 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 2 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -39,7 +39,7 @@
"minimatch": "^3.0.0",
"progress": "^2.0.3",
"shelljs": "^0.8.3",
"typedoc-default-themes": "0.7.0-2",
"typedoc-default-themes": "file:../typedoc-default-themes/typedoc-default-themes-0.6.4.tgz",
"typescript": "3.7.x"
},
"devDependencies": {
Expand Down
4 changes: 3 additions & 1 deletion src/lib/converter/plugins/TypePlugin.ts
@@ -1,5 +1,5 @@
import { Reflection, ReflectionKind, Decorator, DeclarationReflection, DeclarationHierarchy } from '../../models/reflections/index';
import { Type, ReferenceType, TupleType, UnionType, IntersectionType, ArrayType } from '../../models/types/index';
import { Type, ReferenceType, TupleType, UnionType, IntersectionType, ArrayType, TypeOperatorType } from '../../models/types/index';
import { Component, ConverterComponent } from '../components';
import { Converter } from '../converter';
import { Context } from '../context';
Expand Down Expand Up @@ -106,6 +106,8 @@ export class TypePlugin extends ConverterComponent {
resolveTypes(reflection, type.types);
} else if (type instanceof ArrayType) {
resolveType(reflection, type.elementType);
} else if (type instanceof TypeOperatorType) {
resolveType(reflection, type.target);
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/test/.editorconfig
@@ -0,0 +1,2 @@
[*.html]
insert_final_newline = false
4 changes: 3 additions & 1 deletion src/test/converter/type-operator/specs.json
Expand Up @@ -35,6 +35,7 @@
"type": "typeOperator",
"operator": "keyof",
"target": {
"id": 2,
"type": "reference",
"name": "TestClass"
}
Expand Down Expand Up @@ -64,6 +65,7 @@
"type": "typeOperator",
"operator": "keyof",
"target": {
"id": 2,
"type": "reference",
"name": "TestClass"
}
Expand Down Expand Up @@ -195,4 +197,4 @@
]
}
]
}
}
2 changes: 1 addition & 1 deletion src/test/renderer/specs/classes/_classes_.baseclass.html
Expand Up @@ -181,7 +181,7 @@ <h2>Properties</h2>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private">
<a name="internalclass" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagPrivate">Private</span> internal<wbr>Class</h3>
<div class="tsd-signature tsd-kind-icon">internal<wbr>Class<span class="tsd-signature-symbol">:</span> <a href="_classes_.internalclass.html" class="tsd-signature-type">InternalClass</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">keyof BaseClass</span><span class="tsd-signature-symbol">&gt;</span></div>
<div class="tsd-signature tsd-kind-icon">internal<wbr>Class<span class="tsd-signature-symbol">:</span> <a href="_classes_.internalclass.html" class="tsd-signature-type">InternalClass</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">keyof <a href="_classes_.baseclass.html" class="tsd-signature-type">BaseClass</a></span><span class="tsd-signature-symbol">&gt;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/sebastian-lenz/typedoc/blob/master/examples/basic/src/classes.ts#L76">classes.ts:76</a></li>
Expand Down
Expand Up @@ -80,7 +80,7 @@ <h1>Class InternalClass&lt;TTT&gt;</h1>
<h3>Type parameters</h3>
<ul class="tsd-type-parameters">
<li>
<h4>TTT<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">keyof BaseClass</span></h4>
<h4>TTT<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">keyof <a href="_classes_.baseclass.html" class="tsd-signature-type">BaseClass</a></span></h4>
</li>
</ul>
</section>
Expand Down