Skip to content

Commit 9b62e0c

Browse files
committed
Add support for TS 4.9
1 parent 8e19048 commit 9b62e0c

File tree

12 files changed

+415
-123
lines changed

12 files changed

+415
-123
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
### Features
44

55
- Added support for a catch-all wildcard in `externalSymbolLinkMappings`, #2102.
6+
- Added support for TypeScript 4.9.
67

78
### Thanks!
89

package-lock.json

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

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"shiki": "^0.11.1"
3131
},
3232
"peerDependencies": {
33-
"typescript": "4.6.x || 4.7.x || 4.8.x"
33+
"typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x"
3434
},
3535
"devDependencies": {
3636
"@types/lunr": "^2.3.4",
@@ -48,7 +48,7 @@
4848
"prettier": "2.7.1",
4949
"puppeteer": "^13.5.2",
5050
"ts-node": "^10.9.1",
51-
"typescript": "^4.8.2"
51+
"typescript": "^4.9.2-rc"
5252
},
5353
"files": [
5454
"/bin",
@@ -64,7 +64,8 @@
6464
"scripts": {
6565
"test": "mocha -r ts-node/register --config .config/mocha.fast.json",
6666
"test:cov": "c8 mocha -r ts-node/register --config .config/mocha.fast.json",
67-
"build:c2": "node bin/typedoc --tsconfig src/test/converter2/tsconfig.json",
67+
"doc:c": "node bin/typedoc --tsconfig src/test/converter/tsconfig.json",
68+
"doc:c2": "node bin/typedoc --tsconfig src/test/converter2/tsconfig.json",
6869
"test:full": "c8 mocha -r ts-node/register --config .config/mocha.full.json",
6970
"test:visual": "ts-node ./src/test/capture-screenshots.ts && ./scripts/compare_screenshots.sh",
7071
"test:visual:accept": "node scripts/accept_visual_regression.js",

src/lib/converter/comments/discovery.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const wantedKinds: Record<ReflectionKind, ts.SyntaxKind[]> = {
7373
[ReflectionKind.Parameter]: [ts.SyntaxKind.Parameter],
7474
[ReflectionKind.TypeLiteral]: [ts.SyntaxKind.TypeLiteral],
7575
[ReflectionKind.TypeParameter]: [ts.SyntaxKind.TypeParameter],
76-
[ReflectionKind.Accessor]: [],
76+
[ReflectionKind.Accessor]: [ts.SyntaxKind.PropertyDeclaration],
7777
[ReflectionKind.GetSignature]: [ts.SyntaxKind.GetAccessor],
7878
[ReflectionKind.SetSignature]: [ts.SyntaxKind.SetAccessor],
7979
[ReflectionKind.ObjectLiteral]: [ts.SyntaxKind.ObjectLiteralExpression],

src/lib/utils/events.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ const eventSplitter = /\s+/;
8888
* space-separated events `"change blur", callback` and jQuery-style event
8989
* maps `{event: callback}`).
9090
*/
91-
function eventsApi<T, U>(
91+
function eventsApi<T extends {}, U>(
9292
iteratee: EventIteratee<T, U>,
9393
events: U,
9494
name: EventMap | string | undefined,

src/test/behaviorTests.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,14 @@ export const behaviorTests: {
268268
);
269269
},
270270

271+
hiddenAccessor(project) {
272+
const test = query(project, "Test");
273+
equal(
274+
test.children?.map((c) => c.name),
275+
["constructor", "auto", "x", "y"]
276+
);
277+
},
278+
271279
inheritDocBasic(project) {
272280
const target = query(project, "InterfaceTarget");
273281
const comment = new Comment(

src/test/converter/class/getter-setter.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ export class GetterSetter {
1515
set writeOnlyName(value: string) {
1616
this._name = value;
1717
}
18+
19+
/**
20+
* Accessor comment
21+
*/
22+
accessor autoAccessor: string;
1823
}
1924

2025
export {};

0 commit comments

Comments
 (0)