Skip to content

Commit

Permalink
Add support for TS 4.9
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit0 committed Nov 13, 2022
1 parent 8e19048 commit 9b62e0c
Show file tree
Hide file tree
Showing 12 changed files with 415 additions and 123 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
### Features

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

### Thanks!

Expand Down
195 changes: 155 additions & 40 deletions package-lock.json

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

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"shiki": "^0.11.1"
},
"peerDependencies": {
"typescript": "4.6.x || 4.7.x || 4.8.x"
"typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x"
},
"devDependencies": {
"@types/lunr": "^2.3.4",
Expand All @@ -48,7 +48,7 @@
"prettier": "2.7.1",
"puppeteer": "^13.5.2",
"ts-node": "^10.9.1",
"typescript": "^4.8.2"
"typescript": "^4.9.2-rc"
},
"files": [
"/bin",
Expand All @@ -64,7 +64,8 @@
"scripts": {
"test": "mocha -r ts-node/register --config .config/mocha.fast.json",
"test:cov": "c8 mocha -r ts-node/register --config .config/mocha.fast.json",
"build:c2": "node bin/typedoc --tsconfig src/test/converter2/tsconfig.json",
"doc:c": "node bin/typedoc --tsconfig src/test/converter/tsconfig.json",
"doc:c2": "node bin/typedoc --tsconfig src/test/converter2/tsconfig.json",
"test:full": "c8 mocha -r ts-node/register --config .config/mocha.full.json",
"test:visual": "ts-node ./src/test/capture-screenshots.ts && ./scripts/compare_screenshots.sh",
"test:visual:accept": "node scripts/accept_visual_regression.js",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/converter/comments/discovery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const wantedKinds: Record<ReflectionKind, ts.SyntaxKind[]> = {
[ReflectionKind.Parameter]: [ts.SyntaxKind.Parameter],
[ReflectionKind.TypeLiteral]: [ts.SyntaxKind.TypeLiteral],
[ReflectionKind.TypeParameter]: [ts.SyntaxKind.TypeParameter],
[ReflectionKind.Accessor]: [],
[ReflectionKind.Accessor]: [ts.SyntaxKind.PropertyDeclaration],
[ReflectionKind.GetSignature]: [ts.SyntaxKind.GetAccessor],
[ReflectionKind.SetSignature]: [ts.SyntaxKind.SetAccessor],
[ReflectionKind.ObjectLiteral]: [ts.SyntaxKind.ObjectLiteralExpression],
Expand Down
2 changes: 1 addition & 1 deletion src/lib/utils/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const eventSplitter = /\s+/;
* space-separated events `"change blur", callback` and jQuery-style event
* maps `{event: callback}`).
*/
function eventsApi<T, U>(
function eventsApi<T extends {}, U>(
iteratee: EventIteratee<T, U>,
events: U,
name: EventMap | string | undefined,
Expand Down
8 changes: 8 additions & 0 deletions src/test/behaviorTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,14 @@ export const behaviorTests: {
);
},

hiddenAccessor(project) {
const test = query(project, "Test");
equal(
test.children?.map((c) => c.name),
["constructor", "auto", "x", "y"]
);
},

inheritDocBasic(project) {
const target = query(project, "InterfaceTarget");
const comment = new Comment(
Expand Down
5 changes: 5 additions & 0 deletions src/test/converter/class/getter-setter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ export class GetterSetter {
set writeOnlyName(value: string) {
this._name = value;
}

/**
* Accessor comment
*/
accessor autoAccessor: string;
}

export {};
Loading

0 comments on commit 9b62e0c

Please sign in to comment.