Skip to content

Commit 17222cb

Browse files
committed
Support TypeDoc 0.28
1 parent e3a2925 commit 17222cb

File tree

6 files changed

+18
-17
lines changed

6 files changed

+18
-17
lines changed

.prettierignore

-3
This file was deleted.

index.ts

+4
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@ export function load(app: Application) {
185185
// an infinite loop when converting.
186186
const tried = new Set<ts.Symbol>();
187187

188+
// Any re-exports will be deferred, so we need to allow deferred conversion here
189+
// and finalize it after the loop.
190+
app.converter.permitDeferredConversion();
188191
do {
189192
for (const s of missing) {
190193
if (shouldConvertSymbol(s, context.checker)) {
@@ -198,6 +201,7 @@ export function load(app: Application) {
198201
missing.delete(s);
199202
}
200203
} while (missing.size > 0);
204+
app.converter.finalizeDeferredConversion();
201205

202206
// If we added a module and all the missing symbols were excluded, get rid of our namespace.
203207
if (

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"@types/node": "18",
1111
"dprint": "^0.49.0",
1212
"outdent": "^0.8.0",
13-
"typedoc": "^0.28.0",
13+
"typedoc": "^0.28.1",
1414
"typescript": "^5.8.2",
1515
"vitest": "^3.0.8"
1616
},
@@ -25,7 +25,7 @@
2525
"typedoc-plugin"
2626
],
2727
"peerDependencies": {
28-
"typedoc": "0.28.x"
28+
"typedoc": "^0.28.1"
2929
},
3030
"scripts": {
3131
"test": "vitest run test/packages.test.ts",

pnpm-lock.yaml

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/packages.test.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ test("Single missing export", () => {
104104

105105
const hierarchy = outdent`
106106
Module <internal>
107-
Type alias FooType
107+
Type Alias FooType
108108
Function foo
109109
`;
110110

@@ -130,7 +130,7 @@ test("Multiple entry points", () => {
130130
const hierarchy = outdent`
131131
Module multi-entry/a.ts
132132
Module <internal>
133-
Type alias FooNum
133+
Type Alias FooNum
134134
Function aFn
135135
Module multi-entry/b.ts
136136
Module <internal>
@@ -153,7 +153,7 @@ test("Missing declaration", () => {
153153

154154
const hierarchy = outdent`
155155
Module <internal>
156-
Type alias Options
156+
Type Alias Options
157157
Function f
158158
`;
159159

@@ -191,7 +191,7 @@ test("Issue #15", () => {
191191
const hierarchy = outdent`
192192
Module <internal>
193193
Variable default
194-
Type alias F
194+
Type Alias F
195195
`;
196196

197197
expect(toStringHierarchy(project)).toBe(hierarchy);
@@ -225,7 +225,7 @@ test("Disabling <internals> module, #16", () => {
225225
const project = convert("single-missing-export/index.ts");
226226

227227
const hierarchy = outdent`
228-
Type alias FooType
228+
Type Alias FooType
229229
Function foo
230230
`;
231231

test/packages/single-missing-export/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
* This type is properly exported.
99
*/
1010
export function foo(): FooType {
11-
return 123;
11+
return 123 as FooType;
1212
}
1313

1414
/**
1515
* This is an internal type which is not exported.
1616
*/
17-
type FooType = number;
17+
type FooType = number & { readonly __fooType: unique symbol };

0 commit comments

Comments
 (0)