diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ab509ef7..ad9dafd64 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Features - Added support for a catch-all wildcard in `externalSymbolLinkMappings`, #2102. +- Added support for TypeScript 4.9. ### Thanks! diff --git a/package-lock.json b/package-lock.json index 6cf7e594f..4347476bd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,13 +33,13 @@ "prettier": "2.7.1", "puppeteer": "^13.5.2", "ts-node": "^10.9.1", - "typescript": "^4.8.2" + "typescript": "^4.9.2-rc" }, "engines": { "node": ">= 14.14" }, "peerDependencies": { - "typescript": "4.6.x || 4.7.x || 4.8.x" + "typescript": "^4.9.2-rc" } }, "node_modules/@bcoe/v8-coverage": { @@ -364,6 +364,35 @@ } } }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/typescript": { + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", + "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", + "dev": true, + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "node_modules/@typescript-eslint/parser": { "version": "5.36.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.36.1.tgz", @@ -435,6 +464,35 @@ } } }, + "node_modules/@typescript-eslint/type-utils/node_modules/tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/typescript": { + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", + "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", + "dev": true, + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "node_modules/@typescript-eslint/types": { "version": "5.36.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.36.1.tgz", @@ -475,6 +533,35 @@ } } }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/typescript": { + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", + "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", + "dev": true, + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "node_modules/@typescript-eslint/utils": { "version": "5.36.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.36.1.tgz", @@ -3351,22 +3438,7 @@ "node": ">=0.3.1" } }, - "node_modules/tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "dependencies": { - "tslib": "^1.8.1" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - } - }, - "node_modules/tsutils/node_modules/tslib": { + "node_modules/tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", @@ -3385,9 +3457,9 @@ } }, "node_modules/typescript": { - "version": "4.8.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz", - "integrity": "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==", + "version": "4.9.2-rc", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.2-rc.tgz", + "integrity": "sha512-Ly9UUxJBfiiFjfegI1gsW9FI8Xhw1cuwRMBJ4wdYg+UXZR4VnZvD1OnBDj/iQ2U+tWbWEjYqJ5xx1Cwr4Vsa4w==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -3911,6 +3983,24 @@ "regexpp": "^3.2.0", "semver": "^7.3.7", "tsutils": "^3.21.0" + }, + "dependencies": { + "tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + }, + "typescript": { + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", + "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", + "dev": true, + "peer": true + } } }, "@typescript-eslint/parser": { @@ -3945,6 +4035,24 @@ "@typescript-eslint/utils": "5.36.1", "debug": "^4.3.4", "tsutils": "^3.21.0" + }, + "dependencies": { + "tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + }, + "typescript": { + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", + "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", + "dev": true, + "peer": true + } } }, "@typescript-eslint/types": { @@ -3966,6 +4074,24 @@ "is-glob": "^4.0.3", "semver": "^7.3.7", "tsutils": "^3.21.0" + }, + "dependencies": { + "tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + }, + "typescript": { + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", + "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", + "dev": true, + "peer": true + } } }, "@typescript-eslint/utils": { @@ -5960,22 +6086,11 @@ } } }, - "tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - }, - "dependencies": { - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - } - } + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true }, "type-check": { "version": "0.4.0", @@ -5987,9 +6102,9 @@ } }, "typescript": { - "version": "4.8.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz", - "integrity": "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==", + "version": "4.9.2-rc", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.2-rc.tgz", + "integrity": "sha512-Ly9UUxJBfiiFjfegI1gsW9FI8Xhw1cuwRMBJ4wdYg+UXZR4VnZvD1OnBDj/iQ2U+tWbWEjYqJ5xx1Cwr4Vsa4w==", "dev": true }, "unbzip2-stream": { diff --git a/package.json b/package.json index f1a285d99..d0f48a549 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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", @@ -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", diff --git a/src/lib/converter/comments/discovery.ts b/src/lib/converter/comments/discovery.ts index 05a13ef10..3c6cd15cc 100644 --- a/src/lib/converter/comments/discovery.ts +++ b/src/lib/converter/comments/discovery.ts @@ -73,7 +73,7 @@ const wantedKinds: Record = { [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], diff --git a/src/lib/utils/events.ts b/src/lib/utils/events.ts index da4f39f46..9e2453d95 100644 --- a/src/lib/utils/events.ts +++ b/src/lib/utils/events.ts @@ -88,7 +88,7 @@ const eventSplitter = /\s+/; * space-separated events `"change blur", callback` and jQuery-style event * maps `{event: callback}`). */ -function eventsApi( +function eventsApi( iteratee: EventIteratee, events: U, name: EventMap | string | undefined, diff --git a/src/test/behaviorTests.ts b/src/test/behaviorTests.ts index 372b70948..885ec4ccc 100644 --- a/src/test/behaviorTests.ts +++ b/src/test/behaviorTests.ts @@ -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( diff --git a/src/test/converter/class/getter-setter.ts b/src/test/converter/class/getter-setter.ts index 585521da0..2f3ad3590 100644 --- a/src/test/converter/class/getter-setter.ts +++ b/src/test/converter/class/getter-setter.ts @@ -15,6 +15,11 @@ export class GetterSetter { set writeOnlyName(value: string) { this._name = value; } + + /** + * Accessor comment + */ + accessor autoAccessor: string; } export {}; diff --git a/src/test/converter/class/specs-with-lump-categories.json b/src/test/converter/class/specs-with-lump-categories.json index 4f3c0b863..7167c50d3 100644 --- a/src/test/converter/class/specs-with-lump-categories.json +++ b/src/test/converter/class/specs-with-lump-categories.json @@ -4305,6 +4305,29 @@ "name": "string" } }, + { + "id": 199, + "name": "autoAccessor", + "kind": 262144, + "kindString": "Accessor", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Accessor comment" + } + ] + }, + "sources": [ + { + "fileName": "getter-setter.ts", + "line": 22, + "character": 13, + "url": "typedoc://getter-setter.ts#L22" + } + ] + }, { "id": 190, "name": "name", @@ -4443,6 +4466,7 @@ { "title": "Accessors", "children": [ + 199, 190, 194, 196 @@ -4477,14 +4501,14 @@ ] }, { - "id": 199, + "id": 200, "name": "this", "kind": 2, "kindString": "Module", "flags": {}, "children": [ { - "id": 200, + "id": 201, "name": "ChainClass", "kind": 128, "kindString": "Class", @@ -4499,28 +4523,28 @@ }, "children": [ { - "id": 201, + "id": 202, "name": "constructor", "kind": 512, "kindString": "Constructor", "flags": {}, "signatures": [ { - "id": 202, + "id": 203, "name": "new ChainClass", "kind": 16384, "kindString": "Constructor signature", "flags": {}, "type": { "type": "reference", - "id": 200, + "id": 201, "name": "ChainClass" } } ] }, { - "id": 203, + "id": 204, "name": "chain", "kind": 2048, "kindString": "Method", @@ -4537,7 +4561,7 @@ ], "signatures": [ { - "id": 204, + "id": 205, "name": "chain", "kind": 4096, "kindString": "Call signature", @@ -4552,7 +4576,7 @@ }, "type": { "type": "reference", - "id": 200, + "id": 201, "name": "ChainClass" } } @@ -4563,13 +4587,13 @@ { "title": "Constructors", "children": [ - 201 + 202 ] }, { "title": "Methods", "children": [ - 203 + 204 ] } ], @@ -4587,7 +4611,7 @@ { "title": "Classes", "children": [ - 200 + 201 ] } ], @@ -4601,35 +4625,35 @@ ] }, { - "id": 205, + "id": 206, "name": "type-operator", "kind": 2, "kindString": "Module", "flags": {}, "children": [ { - "id": 211, + "id": 212, "name": "GenericClass", "kind": 128, "kindString": "Class", "flags": {}, "children": [ { - "id": 212, + "id": 213, "name": "constructor", "kind": 512, "kindString": "Constructor", "flags": {}, "signatures": [ { - "id": 213, + "id": 214, "name": "new GenericClass", "kind": 16384, "kindString": "Constructor signature", "flags": {}, "typeParameter": [ { - "id": 214, + "id": 215, "name": "T", "kind": 131072, "kindString": "Type parameter", @@ -4639,7 +4663,7 @@ "operator": "keyof", "target": { "type": "reference", - "id": 206, + "id": 207, "name": "TestClass" } } @@ -4647,11 +4671,11 @@ ], "type": { "type": "reference", - "id": 211, + "id": 212, "typeArguments": [ { "type": "reference", - "id": 214, + "id": 215, "name": "T" } ], @@ -4661,7 +4685,7 @@ ] }, { - "id": 215, + "id": 216, "name": "c", "kind": 1024, "kindString": "Property", @@ -4676,7 +4700,7 @@ ], "type": { "type": "reference", - "id": 214, + "id": 215, "name": "T" } } @@ -4685,13 +4709,13 @@ { "title": "Constructors", "children": [ - 212 + 213 ] }, { "title": "Properties", "children": [ - 215 + 216 ] } ], @@ -4705,7 +4729,7 @@ ], "typeParameters": [ { - "id": 216, + "id": 217, "name": "T", "kind": 131072, "kindString": "Type parameter", @@ -4715,7 +4739,7 @@ "operator": "keyof", "target": { "type": "reference", - "id": 206, + "id": 207, "name": "TestClass" } } @@ -4723,7 +4747,7 @@ ] }, { - "id": 206, + "id": 207, "name": "TestClass", "kind": 128, "kindString": "Class", @@ -4743,7 +4767,7 @@ "kind": "inline-tag", "tag": "@link", "text": "TestClass", - "target": 206 + "target": 207 }, { "kind": "text", @@ -4755,28 +4779,28 @@ }, "children": [ { - "id": 207, + "id": 208, "name": "constructor", "kind": 512, "kindString": "Constructor", "flags": {}, "signatures": [ { - "id": 208, + "id": 209, "name": "new TestClass", "kind": 16384, "kindString": "Constructor signature", "flags": {}, "type": { "type": "reference", - "id": 206, + "id": 207, "name": "TestClass" } } ] }, { - "id": 209, + "id": 210, "name": "a", "kind": 1024, "kindString": "Property", @@ -4795,7 +4819,7 @@ } }, { - "id": 210, + "id": 211, "name": "b", "kind": 1024, "kindString": "Property", @@ -4818,14 +4842,14 @@ { "title": "Constructors", "children": [ - 207 + 208 ] }, { "title": "Properties", "children": [ - 209, - 210 + 210, + 211 ] } ], @@ -4843,8 +4867,8 @@ { "title": "Classes", "children": [ - 211, - 206 + 212, + 207 ] } ], @@ -4870,8 +4894,8 @@ 134, 166, 185, - 199, - 205 + 200, + 206 ] } ] diff --git a/src/test/converter/class/specs.json b/src/test/converter/class/specs.json index 799355572..46b12943e 100644 --- a/src/test/converter/class/specs.json +++ b/src/test/converter/class/specs.json @@ -4301,6 +4301,29 @@ "name": "string" } }, + { + "id": 199, + "name": "autoAccessor", + "kind": 262144, + "kindString": "Accessor", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Accessor comment" + } + ] + }, + "sources": [ + { + "fileName": "getter-setter.ts", + "line": 22, + "character": 13, + "url": "typedoc://getter-setter.ts#L22" + } + ] + }, { "id": 190, "name": "name", @@ -4439,6 +4462,7 @@ { "title": "Accessors", "children": [ + 199, 190, 194, 196 @@ -4473,14 +4497,14 @@ ] }, { - "id": 199, + "id": 200, "name": "this", "kind": 2, "kindString": "Module", "flags": {}, "children": [ { - "id": 200, + "id": 201, "name": "ChainClass", "kind": 128, "kindString": "Class", @@ -4495,28 +4519,28 @@ }, "children": [ { - "id": 201, + "id": 202, "name": "constructor", "kind": 512, "kindString": "Constructor", "flags": {}, "signatures": [ { - "id": 202, + "id": 203, "name": "new ChainClass", "kind": 16384, "kindString": "Constructor signature", "flags": {}, "type": { "type": "reference", - "id": 200, + "id": 201, "name": "ChainClass" } } ] }, { - "id": 203, + "id": 204, "name": "chain", "kind": 2048, "kindString": "Method", @@ -4533,7 +4557,7 @@ ], "signatures": [ { - "id": 204, + "id": 205, "name": "chain", "kind": 4096, "kindString": "Call signature", @@ -4548,7 +4572,7 @@ }, "type": { "type": "reference", - "id": 200, + "id": 201, "name": "ChainClass" } } @@ -4559,13 +4583,13 @@ { "title": "Constructors", "children": [ - 201 + 202 ] }, { "title": "Methods", "children": [ - 203 + 204 ] } ], @@ -4583,7 +4607,7 @@ { "title": "Classes", "children": [ - 200 + 201 ] } ], @@ -4597,35 +4621,35 @@ ] }, { - "id": 205, + "id": 206, "name": "type-operator", "kind": 2, "kindString": "Module", "flags": {}, "children": [ { - "id": 211, + "id": 212, "name": "GenericClass", "kind": 128, "kindString": "Class", "flags": {}, "children": [ { - "id": 212, + "id": 213, "name": "constructor", "kind": 512, "kindString": "Constructor", "flags": {}, "signatures": [ { - "id": 213, + "id": 214, "name": "new GenericClass", "kind": 16384, "kindString": "Constructor signature", "flags": {}, "typeParameter": [ { - "id": 214, + "id": 215, "name": "T", "kind": 131072, "kindString": "Type parameter", @@ -4635,7 +4659,7 @@ "operator": "keyof", "target": { "type": "reference", - "id": 206, + "id": 207, "name": "TestClass" } } @@ -4643,11 +4667,11 @@ ], "type": { "type": "reference", - "id": 211, + "id": 212, "typeArguments": [ { "type": "reference", - "id": 214, + "id": 215, "name": "T" } ], @@ -4657,7 +4681,7 @@ ] }, { - "id": 215, + "id": 216, "name": "c", "kind": 1024, "kindString": "Property", @@ -4672,7 +4696,7 @@ ], "type": { "type": "reference", - "id": 214, + "id": 215, "name": "T" } } @@ -4681,13 +4705,13 @@ { "title": "Constructors", "children": [ - 212 + 213 ] }, { "title": "Properties", "children": [ - 215 + 216 ] } ], @@ -4701,7 +4725,7 @@ ], "typeParameters": [ { - "id": 216, + "id": 217, "name": "T", "kind": 131072, "kindString": "Type parameter", @@ -4711,7 +4735,7 @@ "operator": "keyof", "target": { "type": "reference", - "id": 206, + "id": 207, "name": "TestClass" } } @@ -4719,7 +4743,7 @@ ] }, { - "id": 206, + "id": 207, "name": "TestClass", "kind": 128, "kindString": "Class", @@ -4739,7 +4763,7 @@ "kind": "inline-tag", "tag": "@link", "text": "TestClass", - "target": 206 + "target": 207 }, { "kind": "text", @@ -4751,28 +4775,28 @@ }, "children": [ { - "id": 207, + "id": 208, "name": "constructor", "kind": 512, "kindString": "Constructor", "flags": {}, "signatures": [ { - "id": 208, + "id": 209, "name": "new TestClass", "kind": 16384, "kindString": "Constructor signature", "flags": {}, "type": { "type": "reference", - "id": 206, + "id": 207, "name": "TestClass" } } ] }, { - "id": 209, + "id": 210, "name": "a", "kind": 1024, "kindString": "Property", @@ -4791,7 +4815,7 @@ } }, { - "id": 210, + "id": 211, "name": "b", "kind": 1024, "kindString": "Property", @@ -4814,14 +4838,14 @@ { "title": "Constructors", "children": [ - 207 + 208 ] }, { "title": "Properties", "children": [ - 209, - 210 + 210, + 211 ] } ], @@ -4839,8 +4863,8 @@ { "title": "Classes", "children": [ - 211, - 206 + 212, + 207 ] } ], @@ -4866,8 +4890,8 @@ 134, 166, 185, - 199, - 205 + 200, + 206 ] } ] diff --git a/src/test/converter/variables/specs.json b/src/test/converter/variables/specs.json index 75e00ff0c..13f7be2c4 100644 --- a/src/test/converter/variables/specs.json +++ b/src/test/converter/variables/specs.json @@ -1907,6 +1907,93 @@ }, "defaultValue": "15" }, + { + "id": 99, + "name": "satisfies", + "kind": 32, + "kindString": "Variable", + "flags": { + "isConst": true + }, + "sources": [ + { + "fileName": "variable.ts", + "line": 9, + "character": 13, + "url": "typedoc://variable.ts#L9" + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 100, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 101, + "name": "a", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "variable.ts", + "line": 10, + "character": 4, + "url": "typedoc://variable.ts#L10" + } + ], + "type": { + "type": "intrinsic", + "name": "number" + }, + "defaultValue": "1" + }, + { + "id": 102, + "name": "b", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "variable.ts", + "line": 11, + "character": 4, + "url": "typedoc://variable.ts#L11" + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "defaultValue": "\"2\"" + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 101, + 102 + ] + } + ], + "sources": [ + { + "fileName": "variable.ts", + "line": 9, + "character": 25, + "url": "typedoc://variable.ts#L9" + } + ] + } + }, + "defaultValue": "..." + }, { "id": 96, "name": "x", @@ -1988,6 +2075,7 @@ 93, 94, 95, + 99, 96, 97, 98 diff --git a/src/test/converter/variables/variable.ts b/src/test/converter/variables/variable.ts index e1fbac2c9..919a3a76a 100644 --- a/src/test/converter/variables/variable.ts +++ b/src/test/converter/variables/variable.ts @@ -5,3 +5,8 @@ export var myVar = 15; export let x: object; export let y: Promise; export let z: Promise; + +export const satisfies = { + a: 1, + b: "2" +} satisfies Record \ No newline at end of file diff --git a/src/test/converter2/behavior/hiddenAccessor.ts b/src/test/converter2/behavior/hiddenAccessor.ts new file mode 100644 index 000000000..6cc14a2cd --- /dev/null +++ b/src/test/converter2/behavior/hiddenAccessor.ts @@ -0,0 +1,21 @@ +export class Test { + get x() { + return 1; + } + + get y() { + return 1; + } + /** @hidden */ + set y(v) {} + + /** @hidden */ + get z() { + return 1; + } + + accessor auto!: string; + + /** @hidden */ + accessor autoHidden!: string; +}