Skip to content

Commit 21f97a5

Browse files
committed
Resolve TypeOperatorType to allow it to be hyperlinkable
1 parent aa59c1e commit 21f97a5

File tree

7 files changed

+13
-8
lines changed

7 files changed

+13
-8
lines changed

package-lock.json

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"minimatch": "^3.0.0",
4040
"progress": "^2.0.3",
4141
"shelljs": "^0.8.3",
42-
"typedoc-default-themes": "^0.6.3",
42+
"typedoc-default-themes": "file:../typedoc-default-themes/typedoc-default-themes-0.6.4.tgz",
4343
"typescript": "3.7.x"
4444
},
4545
"devDependencies": {

src/lib/converter/plugins/TypePlugin.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Reflection, ReflectionKind, Decorator, DeclarationReflection, DeclarationHierarchy } from '../../models/reflections/index';
2-
import { Type, ReferenceType, TupleType, UnionType, IntersectionType, ArrayType } from '../../models/types/index';
2+
import { Type, ReferenceType, TupleType, UnionType, IntersectionType, ArrayType, TypeOperatorType } from '../../models/types/index';
33
import { Component, ConverterComponent } from '../components';
44
import { Converter } from '../converter';
55
import { Context } from '../context';
@@ -106,6 +106,8 @@ export class TypePlugin extends ConverterComponent {
106106
resolveTypes(reflection, type.types);
107107
} else if (type instanceof ArrayType) {
108108
resolveType(reflection, type.elementType);
109+
} else if (type instanceof TypeOperatorType) {
110+
resolveType(reflection, type.target);
109111
}
110112
}
111113
}

src/test/.editorconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[*.html]
2+
insert_final_newline = false

src/test/converter/type-operator/specs.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"type": "typeOperator",
3434
"operator": "keyof",
3535
"target": {
36+
"id": 2,
3637
"type": "reference",
3738
"name": "TestClass"
3839
}
@@ -62,6 +63,7 @@
6263
"type": "typeOperator",
6364
"operator": "keyof",
6465
"target": {
66+
"id": 2,
6567
"type": "reference",
6668
"name": "TestClass"
6769
}
@@ -193,4 +195,4 @@
193195
]
194196
}
195197
]
196-
}
198+
}

src/test/renderer/specs/classes/_classes_.baseclass.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ <h2>Properties</h2>
181181
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-private">
182182
<a name="internalclass" class="tsd-anchor"></a>
183183
<h3><span class="tsd-flag ts-flagPrivate">Private</span> internal<wbr>Class</h3>
184-
<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>
184+
<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>
185185
<aside class="tsd-sources">
186186
<ul>
187187
<li>Defined in <a href="https://github.com/sebastian-lenz/typedoc/blob/master/examples/basic/src/classes.ts#L76">classes.ts:76</a></li>

src/test/renderer/specs/classes/_classes_.internalclass.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ <h1>Class InternalClass&lt;TTT&gt;</h1>
8080
<h3>Type parameters</h3>
8181
<ul class="tsd-type-parameters">
8282
<li>
83-
<h4>TTT<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">keyof BaseClass</span></h4>
83+
<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>
8484
</li>
8585
</ul>
8686
</section>

0 commit comments

Comments
 (0)