From a11a9292a48ec8064df4b8df804fe863ba163905 Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Sun, 28 Mar 2021 20:16:01 -0600 Subject: [PATCH] chore: Add "converter2" tests --- .eslintrc | 6 +- scripts/copy_test_files.js | 1 + src/test/converter/alias/alias.ts | 84 -- src/test/converter/alias/specs.json | 890 ------------------ src/test/converter/class/class.ts | 9 - .../converter/class/clodule-with-subclass.ts | 13 - .../class/specs-with-lump-categories.json | 772 +++++---------- src/test/converter/class/specs.json | 772 +++++---------- src/test/converter/comment/comment.ts | 21 - src/test/converter/comment/specs.json | 242 +---- .../converter/declaration/declaration.d.ts | 5 - src/test/converter/declaration/specs.json | 316 +------ src/test/converter/exports/export.ts | 11 - src/test/converter/exports/specs.json | 152 +-- src/test/converter/function/function.ts | 2 - src/test/converter/function/specs.json | 219 ++--- src/test/converter/js/index.js | 4 - src/test/converter/js/specs.json | 448 ++------- src/test/converter/types/specs.json | 188 ++-- src/test/converter/types/tuple.ts | 4 - src/test/converter/variables/literal.ts | 7 - src/test/converter/variables/specs.json | 187 +--- src/test/converter/variables/specs.nodoc.json | 10 +- src/test/converter2.test.ts | 226 +++++ .../issues/gh1124.d.ts} | 9 - src/test/converter2/issues/gh1150.ts | 19 + src/test/converter2/issues/gh1164.ts | 8 + src/test/converter2/issues/gh1330.ts | 14 + src/test/converter2/issues/gh1366.d.ts | 8 + src/test/converter2/issues/gh1408.ts | 1 + .../issues/gh1436.d.ts} | 0 src/test/converter2/issues/gh1449.ts | 3 + src/test/converter2/issues/gh1454.ts | 5 + src/test/converter2/issues/gh1462.ts | 8 + src/test/converter2/issues/gh1481.js | 5 + .../issues/gh1483.js} | 6 - src/test/converter2/issues/gh1490.ts | 4 + src/test/converter2/issues/gh1509.ts | 6 + .../issues/gh1514.ts} | 1 - src/test/converter2/issues/gh1522.ts | 4 + src/test/converter2/issues/gh1524.d.ts | 2 + src/test/converter2/issues/gh1534.ts | 1 + src/test/converter2/issues/gh1547.ts | 25 + src/test/converter2/issues/gh869.ts | 6 + src/test/converter2/tsconfig.json | 12 + tsconfig.json | 1 + 46 files changed, 1141 insertions(+), 3596 deletions(-) delete mode 100644 src/test/converter/class/clodule-with-subclass.ts create mode 100644 src/test/converter2.test.ts rename src/test/{converter/declaration/namespaces.d.ts => converter2/issues/gh1124.d.ts} (51%) create mode 100644 src/test/converter2/issues/gh1150.ts create mode 100644 src/test/converter2/issues/gh1164.ts create mode 100644 src/test/converter2/issues/gh1330.ts create mode 100644 src/test/converter2/issues/gh1366.d.ts create mode 100644 src/test/converter2/issues/gh1408.ts rename src/test/{converter/declaration/global-fn.d.ts => converter2/issues/gh1436.d.ts} (100%) create mode 100644 src/test/converter2/issues/gh1449.ts create mode 100644 src/test/converter2/issues/gh1454.ts create mode 100644 src/test/converter2/issues/gh1462.ts create mode 100644 src/test/converter2/issues/gh1481.js rename src/test/{converter/js/declaration-merging.js => converter2/issues/gh1483.js} (67%) create mode 100644 src/test/converter2/issues/gh1490.ts create mode 100644 src/test/converter2/issues/gh1509.ts rename src/test/{converter/variables/symbols.ts => converter2/issues/gh1514.ts} (87%) create mode 100644 src/test/converter2/issues/gh1522.ts create mode 100644 src/test/converter2/issues/gh1524.d.ts create mode 100644 src/test/converter2/issues/gh1534.ts create mode 100644 src/test/converter2/issues/gh1547.ts create mode 100644 src/test/converter2/issues/gh869.ts create mode 100644 src/test/converter2/tsconfig.json diff --git a/.eslintrc b/.eslintrc index 47938f396..648d82b0f 100644 --- a/.eslintrc +++ b/.eslintrc @@ -41,7 +41,11 @@ }, "overrides": [ { - "files": ["src/test/converter/**", "src/test/renderer/**"], + "files": [ + "src/test/converter/**", + "src/test/converter2/**", + "src/test/renderer/**" + ], "rules": { "prefer-rest-params": 0, "no-inner-declarations": 0, diff --git a/scripts/copy_test_files.js b/scripts/copy_test_files.js index 8181f6459..b365fc019 100644 --- a/scripts/copy_test_files.js +++ b/scripts/copy_test_files.js @@ -5,6 +5,7 @@ const { join } = require("path"); const copy = [ "test/converter", + "test/converter2", "test/renderer", "test/module", "test/utils/options/readers/data", diff --git a/src/test/converter/alias/alias.ts b/src/test/converter/alias/alias.ts index 7399786e8..0bdfaeb5a 100644 --- a/src/test/converter/alias/alias.ts +++ b/src/test/converter/alias/alias.ts @@ -17,87 +17,3 @@ export type IsString = T extends string ? "string" : "not string"; * Extracts the type of a promise. */ export type PromiseType = T extends PromiseLike ? U : T; - -/** - * Conditional type with infer - */ -export type PopFront = ((...args: T) => any) extends ( - a: any, - ...r: infer R -) => any - ? R - : never; - -/** - * See GH#1150. Calling typeChecker.typeToString on this type will send TS into an infinite - * loop, which is undesirable. - */ -export type HorribleRecursiveTypeThatShouldNotBeUsedByAnyone< - T extends any[], - R = {} -> = { - 0: R; - 1: HorribleRecursiveTypeThatShouldNotBeUsedByAnyone< - PopFront, - { - [K in keyof R | keyof T[0]]: K extends keyof R ? R[K] : T[0][K]; - } - >; -}[T["length"] extends 0 ? 0 : 1]; - -export namespace GH1330 { - export type ExampleParam = Example; - export interface Example {} - - declare const makeExample: () => Example; - declare const makeExample2: () => ExampleParam; - - // Recursive type when we don't have a type node. - export const testValue = makeExample(); - export const testValue2 = makeExample2(); - - export type HasProp = { key: T }; - - declare const makeProp: (x: T) => HasProp; - export const testValue3 = makeProp(1); -} - -export namespace GH1408 { - export declare function foo(): T; -} - -export namespace GH1454 { - export type Foo = string | number; - export type Bar = string | number; - - export declare function bar(x: Bar): Bar; - export declare function foo(x: Foo): Foo; -} - -export namespace GH1547 { - export interface ThingA { - type: "ThingA"; - } - - export interface ThingB { - type: "ThingB"; - } - - type Things = ThingA | ThingB; - - type ValueOrArray = T | Array>; - - /** - * Test. - */ - export class Test { - /** - * Log a thing. - * - * @param things - Array of things or a thing. - */ - log_thing(things: ValueOrArray): void { - console.log(things); - } - } -} diff --git a/src/test/converter/alias/specs.json b/src/test/converter/alias/specs.json index 5c3105d1d..32112ed75 100644 --- a/src/test/converter/alias/specs.json +++ b/src/test/converter/alias/specs.json @@ -5,760 +5,6 @@ "kindString": "Project", "flags": {}, "children": [ - { - "id": 28, - "name": "GH1330", - "kind": 2, - "kindString": "Namespace", - "flags": {}, - "children": [ - { - "id": 30, - "name": "Example", - "kind": 256, - "kindString": "Interface", - "flags": {}, - "typeParameter": [ - { - "id": 31, - "name": "T", - "kind": 131072, - "kindString": "Type parameter", - "flags": {}, - "type": { - "type": "reference", - "id": 29, - "name": "ExampleParam" - }, - "default": { - "type": "reference", - "id": 29, - "name": "ExampleParam" - } - } - ] - }, - { - "id": 29, - "name": "ExampleParam", - "kind": 4194304, - "kindString": "Type alias", - "flags": {}, - "type": { - "type": "reference", - "id": 30, - "name": "Example" - } - }, - { - "id": 34, - "name": "HasProp", - "kind": 4194304, - "kindString": "Type alias", - "flags": {}, - "typeParameter": [ - { - "id": 37, - "name": "T", - "kind": 131072, - "kindString": "Type parameter", - "flags": {} - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 35, - "name": "__type", - "kind": 65536, - "kindString": "Type literal", - "flags": {}, - "children": [ - { - "id": 36, - "name": "key", - "kind": 1024, - "kindString": "Property", - "flags": {}, - "type": { - "type": "reference", - "name": "T" - } - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [ - 36 - ] - } - ] - } - } - }, - { - "id": 32, - "name": "testValue", - "kind": 32, - "kindString": "Variable", - "flags": { - "isConst": true - }, - "type": { - "type": "reference", - "id": 30, - "typeArguments": [ - { - "type": "reference", - "id": 29, - "name": "ExampleParam" - } - ], - "name": "Example" - }, - "defaultValue": "..." - }, - { - "id": 33, - "name": "testValue2", - "kind": 32, - "kindString": "Variable", - "flags": { - "isConst": true - }, - "type": { - "type": "reference", - "id": 29, - "name": "ExampleParam" - }, - "defaultValue": "..." - }, - { - "id": 38, - "name": "testValue3", - "kind": 32, - "kindString": "Variable", - "flags": { - "isConst": true - }, - "type": { - "type": "reference", - "id": 34, - "typeArguments": [ - { - "type": "intrinsic", - "name": "number" - } - ], - "name": "HasProp" - }, - "defaultValue": "..." - } - ], - "groups": [ - { - "title": "Interfaces", - "kind": 256, - "children": [ - 30 - ] - }, - { - "title": "Type aliases", - "kind": 4194304, - "children": [ - 29, - 34 - ] - }, - { - "title": "Variables", - "kind": 32, - "children": [ - 32, - 33, - 38 - ] - } - ] - }, - { - "id": 39, - "name": "GH1408", - "kind": 2, - "kindString": "Namespace", - "flags": {}, - "children": [ - { - "id": 40, - "name": "foo", - "kind": 64, - "kindString": "Function", - "flags": {}, - "signatures": [ - { - "id": 41, - "name": "foo", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "typeParameter": [ - { - "id": 42, - "name": "T", - "kind": 131072, - "kindString": "Type parameter", - "flags": {}, - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "unknown" - } - } - } - ], - "type": { - "type": "reference", - "name": "T" - } - } - ] - } - ], - "groups": [ - { - "title": "Functions", - "kind": 64, - "children": [ - 40 - ] - } - ] - }, - { - "id": 43, - "name": "GH1454", - "kind": 2, - "kindString": "Namespace", - "flags": {}, - "children": [ - { - "id": 51, - "name": "Bar", - "kind": 4194304, - "kindString": "Type alias", - "flags": {}, - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "number" - } - ] - } - }, - { - "id": 50, - "name": "Foo", - "kind": 4194304, - "kindString": "Type alias", - "flags": {}, - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "number" - } - ] - } - }, - { - "id": 44, - "name": "bar", - "kind": 64, - "kindString": "Function", - "flags": {}, - "signatures": [ - { - "id": 45, - "name": "bar", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 46, - "name": "x", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "reference", - "id": 51, - "name": "Bar" - } - } - ], - "type": { - "type": "reference", - "id": 51, - "name": "Bar" - } - } - ] - }, - { - "id": 47, - "name": "foo", - "kind": 64, - "kindString": "Function", - "flags": {}, - "signatures": [ - { - "id": 48, - "name": "foo", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 49, - "name": "x", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "reference", - "id": 50, - "name": "Foo" - } - } - ], - "type": { - "type": "reference", - "id": 50, - "name": "Foo" - } - } - ] - } - ], - "groups": [ - { - "title": "Type aliases", - "kind": 4194304, - "children": [ - 51, - 50 - ] - }, - { - "title": "Functions", - "kind": 64, - "children": [ - 44, - 47 - ] - } - ] - }, - { - "id": 52, - "name": "GH1547", - "kind": 2, - "kindString": "Namespace", - "flags": {}, - "children": [ - { - "id": 57, - "name": "Test", - "kind": 128, - "kindString": "Class", - "flags": {}, - "comment": { - "shortText": "Test." - }, - "children": [ - { - "id": 58, - "name": "constructor", - "kind": 512, - "kindString": "Constructor", - "flags": {}, - "signatures": [ - { - "id": 59, - "name": "new Test", - "kind": 16384, - "kindString": "Constructor signature", - "flags": {}, - "type": { - "type": "reference", - "id": 57, - "name": "Test" - } - } - ] - }, - { - "id": 60, - "name": "log_thing", - "kind": 2048, - "kindString": "Method", - "flags": {}, - "signatures": [ - { - "id": 61, - "name": "log_thing", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "comment": { - "shortText": "Log a thing." - }, - "parameters": [ - { - "id": 62, - "name": "things", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "comment": { - "text": "Array of things or a thing.\n" - }, - "type": { - "type": "reference", - "typeArguments": [ - { - "type": "reference", - "name": "Things" - } - ], - "name": "ValueOrArray" - } - } - ], - "type": { - "type": "intrinsic", - "name": "void" - } - } - ] - } - ], - "groups": [ - { - "title": "Constructors", - "kind": 512, - "children": [ - 58 - ] - }, - { - "title": "Methods", - "kind": 2048, - "children": [ - 60 - ] - } - ] - }, - { - "id": 53, - "name": "ThingA", - "kind": 256, - "kindString": "Interface", - "flags": {}, - "children": [ - { - "id": 54, - "name": "type", - "kind": 1024, - "kindString": "Property", - "flags": {}, - "type": { - "type": "literal", - "value": "ThingA" - } - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [ - 54 - ] - } - ] - }, - { - "id": 55, - "name": "ThingB", - "kind": 256, - "kindString": "Interface", - "flags": {}, - "children": [ - { - "id": 56, - "name": "type", - "kind": 1024, - "kindString": "Property", - "flags": {}, - "type": { - "type": "literal", - "value": "ThingB" - } - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [ - 56 - ] - } - ] - } - ], - "groups": [ - { - "title": "Classes", - "kind": 128, - "children": [ - 57 - ] - }, - { - "title": "Interfaces", - "kind": 256, - "children": [ - 53, - 55 - ] - } - ] - }, - { - "id": 21, - "name": "HorribleRecursiveTypeThatShouldNotBeUsedByAnyone", - "kind": 4194304, - "kindString": "Type alias", - "flags": {}, - "comment": { - "shortText": "See GH#1150. Calling typeChecker.typeToString on this type will send TS into an infinite\nloop, which is undesirable." - }, - "typeParameter": [ - { - "id": 25, - "name": "T", - "kind": 131072, - "kindString": "Type parameter", - "flags": {}, - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "any" - } - } - }, - { - "id": 27, - "name": "R", - "kind": 131072, - "kindString": "Type parameter", - "flags": {}, - "default": { - "type": "reflection", - "declaration": { - "id": 26, - "name": "__type", - "kind": 65536, - "kindString": "Type literal", - "flags": {} - } - } - } - ], - "type": { - "type": "indexedAccess", - "indexType": { - "type": "conditional", - "checkType": { - "type": "indexedAccess", - "indexType": { - "type": "literal", - "value": "length" - }, - "objectType": { - "type": "reference", - "name": "T" - } - }, - "extendsType": { - "type": "literal", - "value": 0 - }, - "trueType": { - "type": "literal", - "value": 0 - }, - "falseType": { - "type": "literal", - "value": 1 - } - }, - "objectType": { - "type": "reflection", - "declaration": { - "id": 22, - "name": "__type", - "kind": 65536, - "kindString": "Type literal", - "flags": {}, - "children": [ - { - "id": 23, - "name": "0", - "kind": 1024, - "kindString": "Property", - "flags": {}, - "type": { - "type": "reference", - "name": "R" - } - }, - { - "id": 24, - "name": "1", - "kind": 1024, - "kindString": "Property", - "flags": {}, - "type": { - "type": "reference", - "id": 21, - "typeArguments": [ - { - "type": "reference", - "id": 12, - "typeArguments": [ - { - "type": "reference", - "name": "T" - } - ], - "name": "PopFront" - }, - { - "type": "mapped", - "parameter": "K", - "parameterType": { - "type": "union", - "types": [ - { - "type": "typeOperator", - "operator": "keyof", - "target": { - "type": "reference", - "name": "R" - } - }, - { - "type": "typeOperator", - "operator": "keyof", - "target": { - "type": "indexedAccess", - "indexType": { - "type": "literal", - "value": 0 - }, - "objectType": { - "type": "reference", - "name": "T" - } - } - } - ] - }, - "templateType": { - "type": "conditional", - "checkType": { - "type": "reference", - "name": "K" - }, - "extendsType": { - "type": "typeOperator", - "operator": "keyof", - "target": { - "type": "reference", - "name": "R" - } - }, - "trueType": { - "type": "indexedAccess", - "indexType": { - "type": "reference", - "name": "K" - }, - "objectType": { - "type": "reference", - "name": "R" - } - }, - "falseType": { - "type": "indexedAccess", - "indexType": { - "type": "reference", - "name": "K" - }, - "objectType": { - "type": "indexedAccess", - "indexType": { - "type": "literal", - "value": 0 - }, - "objectType": { - "type": "reference", - "name": "T" - } - } - } - } - } - ], - "name": "HorribleRecursiveTypeThatShouldNotBeUsedByAnyone" - } - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [ - 23, - 24 - ] - } - ] - } - } - } - }, { "id": 8, "name": "IsString", @@ -797,130 +43,6 @@ } } }, - { - "id": 12, - "name": "PopFront", - "kind": 4194304, - "kindString": "Type alias", - "flags": {}, - "comment": { - "shortText": "Conditional type with infer" - }, - "typeParameter": [ - { - "id": 20, - "name": "T", - "kind": 131072, - "kindString": "Type parameter", - "flags": {}, - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "any" - } - } - } - ], - "type": { - "type": "conditional", - "checkType": { - "type": "reflection", - "declaration": { - "id": 13, - "name": "__type", - "kind": 65536, - "kindString": "Type literal", - "flags": {}, - "signatures": [ - { - "id": 14, - "name": "__type", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 15, - "name": "args", - "kind": 32768, - "kindString": "Parameter", - "flags": { - "isRest": true - }, - "type": { - "type": "reference", - "name": "T" - } - } - ], - "type": { - "type": "intrinsic", - "name": "any" - } - } - ] - } - }, - "extendsType": { - "type": "reflection", - "declaration": { - "id": 16, - "name": "__type", - "kind": 65536, - "kindString": "Type literal", - "flags": {}, - "signatures": [ - { - "id": 17, - "name": "__type", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 18, - "name": "a", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "any" - } - }, - { - "id": 19, - "name": "r", - "kind": 32768, - "kindString": "Parameter", - "flags": { - "isRest": true - }, - "type": { - "type": "inferred", - "name": "R" - } - } - ], - "type": { - "type": "intrinsic", - "name": "any" - } - } - ] - } - }, - "trueType": { - "type": "reference", - "name": "R" - }, - "falseType": { - "type": "intrinsic", - "name": "never" - } - } - }, { "id": 10, "name": "PromiseType", @@ -1056,23 +178,11 @@ } ], "groups": [ - { - "title": "Namespaces", - "kind": 2, - "children": [ - 28, - 39, - 43, - 52 - ] - }, { "title": "Type aliases", "kind": 4194304, "children": [ - 21, 8, - 12, 10, 1, 7 diff --git a/src/test/converter/class/class.ts b/src/test/converter/class/class.ts index 146449568..084a3321e 100644 --- a/src/test/converter/class/class.ts +++ b/src/test/converter/class/class.ts @@ -122,15 +122,6 @@ export class Ts38PrivateFields { #foo = 1; } -export namespace GH1509 { - export interface Foo { - foo: number; - } - - export interface PartialFoo extends Partial {} - export interface ReadonlyFoo extends Readonly> {} -} - export abstract class Abstract { abstract needsImpl(): number } diff --git a/src/test/converter/class/clodule-with-subclass.ts b/src/test/converter/class/clodule-with-subclass.ts deleted file mode 100644 index c83bf9e72..000000000 --- a/src/test/converter/class/clodule-with-subclass.ts +++ /dev/null @@ -1,13 +0,0 @@ -/** - * @packageDocumentation - * @module clodule - */ - -// see https://github.com/TypeStrong/typedoc/issues/869 -export class Foo {} -export namespace Foo { - // merges with static side of class `Foo` - export const x = 1; -} - -export class Bar extends Foo {} diff --git a/src/test/converter/class/specs-with-lump-categories.json b/src/test/converter/class/specs-with-lump-categories.json index e3c9caabd..87d2d8fdd 100644 --- a/src/test/converter/class/specs-with-lump-categories.json +++ b/src/test/converter/class/specs-with-lump-categories.json @@ -306,158 +306,6 @@ "kindString": "Module", "flags": {}, "children": [ - { - "id": 85, - "name": "GH1509", - "kind": 2, - "kindString": "Namespace", - "flags": {}, - "children": [ - { - "id": 86, - "name": "Foo", - "kind": 256, - "kindString": "Interface", - "flags": {}, - "children": [ - { - "id": 87, - "name": "foo", - "kind": 1024, - "kindString": "Property", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [ - 87 - ] - } - ] - }, - { - "id": 88, - "name": "PartialFoo", - "kind": 256, - "kindString": "Interface", - "flags": {}, - "children": [ - { - "id": 89, - "name": "foo", - "kind": 1024, - "kindString": "Property", - "flags": { - "isOptional": true - }, - "type": { - "type": "intrinsic", - "name": "number" - }, - "inheritedFrom": { - "type": "reference", - "name": "Partial.foo" - } - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [ - 89 - ] - } - ], - "extendedTypes": [ - { - "type": "reference", - "typeArguments": [ - { - "type": "reference", - "id": 86, - "name": "Foo" - } - ], - "name": "Partial" - } - ] - }, - { - "id": 90, - "name": "ReadonlyFoo", - "kind": 256, - "kindString": "Interface", - "flags": {}, - "children": [ - { - "id": 91, - "name": "foo", - "kind": 1024, - "kindString": "Property", - "flags": { - "isOptional": true, - "isReadonly": true - }, - "type": { - "type": "intrinsic", - "name": "number" - }, - "inheritedFrom": { - "type": "reference", - "name": "Readonly.foo" - } - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [ - 91 - ] - } - ], - "extendedTypes": [ - { - "type": "reference", - "typeArguments": [ - { - "type": "reference", - "typeArguments": [ - { - "type": "reference", - "id": 86, - "name": "Foo" - } - ], - "name": "Partial" - } - ], - "name": "Readonly" - } - ] - } - ], - "groups": [ - { - "title": "Interfaces", - "kind": 256, - "children": [ - 86, - 88, - 90 - ] - } - ] - }, { "id": 59, "name": "TestSubClass", @@ -500,7 +348,7 @@ ] }, { - "id": 92, + "id": 85, "name": "Abstract", "kind": 128, "kindString": "Class", @@ -509,28 +357,28 @@ }, "children": [ { - "id": 93, + "id": 86, "name": "constructor", "kind": 512, "kindString": "Constructor", "flags": {}, "signatures": [ { - "id": 94, + "id": 87, "name": "new Abstract", "kind": 16384, "kindString": "Constructor signature", "flags": {}, "type": { "type": "reference", - "id": 92, + "id": 85, "name": "Abstract" } } ] }, { - "id": 95, + "id": 88, "name": "needsImpl", "kind": 2048, "kindString": "Method", @@ -539,7 +387,7 @@ }, "signatures": [ { - "id": 96, + "id": 89, "name": "needsImpl", "kind": 4096, "kindString": "Call signature", @@ -557,14 +405,14 @@ "title": "Constructors", "kind": 512, "children": [ - 93 + 86 ] }, { "title": "Methods", "kind": 2048, "children": [ - 95 + 88 ] } ] @@ -1596,7 +1444,7 @@ ] }, { - "id": 97, + "id": 90, "name": "AbstractMe", "kind": 4194304, "kindString": "Type alias", @@ -1604,14 +1452,14 @@ "type": { "type": "reflection", "declaration": { - "id": 98, + "id": 91, "name": "__type", "kind": 512, "kindString": "Constructor", "flags": {}, "signatures": [ { - "id": 99, + "id": 92, "name": "__type", "kind": 16384, "kindString": "Constructor signature", @@ -1620,7 +1468,7 @@ }, "type": { "type": "reference", - "id": 92, + "id": 85, "name": "Abstract" } } @@ -1634,7 +1482,6 @@ "title": "Namespaces", "kind": 2, "children": [ - 85, 59 ] }, @@ -1642,7 +1489,7 @@ "title": "Classes", "kind": 128, "children": [ - 92, + 85, 74, 62, 68, @@ -1655,182 +1502,20 @@ "title": "Type aliases", "kind": 4194304, "children": [ - 97 - ] - } - ] - }, - { - "id": 100, - "name": "clodule", - "kind": 1, - "kindString": "Module", - "flags": {}, - "comment": {}, - "originalName": "clodule-with-subclass", - "children": [ - { - "id": 104, - "name": "Foo", - "kind": 2, - "kindString": "Namespace", - "flags": {}, - "children": [ - { - "id": 105, - "name": "x", - "kind": 32, - "kindString": "Variable", - "flags": { - "isConst": true - }, - "type": { - "type": "literal", - "value": 1 - }, - "defaultValue": "1" - } - ], - "groups": [ - { - "title": "Variables", - "kind": 32, - "children": [ - 105 - ] - } - ] - }, - { - "id": 106, - "name": "Bar", - "kind": 128, - "kindString": "Class", - "flags": {}, - "children": [ - { - "id": 107, - "name": "constructor", - "kind": 512, - "kindString": "Constructor", - "flags": {}, - "signatures": [ - { - "id": 108, - "name": "new Bar", - "kind": 16384, - "kindString": "Constructor signature", - "flags": {}, - "type": { - "type": "reference", - "id": 106, - "name": "Bar" - }, - "inheritedFrom": { - "type": "reference", - "id": 103, - "name": "Foo.constructor" - } - } - ], - "inheritedFrom": { - "type": "reference", - "id": 102, - "name": "Foo.constructor" - } - } - ], - "groups": [ - { - "title": "Constructors", - "kind": 512, - "children": [ - 107 - ] - } - ], - "extendedTypes": [ - { - "type": "reference", - "id": 101, - "name": "Foo" - } - ] - }, - { - "id": 101, - "name": "Foo", - "kind": 128, - "kindString": "Class", - "flags": {}, - "children": [ - { - "id": 102, - "name": "constructor", - "kind": 512, - "kindString": "Constructor", - "flags": {}, - "signatures": [ - { - "id": 103, - "name": "new Foo", - "kind": 16384, - "kindString": "Constructor signature", - "flags": {}, - "type": { - "type": "reference", - "id": 101, - "name": "Foo" - } - } - ] - } - ], - "groups": [ - { - "title": "Constructors", - "kind": 512, - "children": [ - 102 - ] - } - ], - "extendedBy": [ - { - "type": "reference", - "id": 106, - "name": "Bar" - } - ] - } - ], - "groups": [ - { - "title": "Namespaces", - "kind": 2, - "children": [ - 104 - ] - }, - { - "title": "Classes", - "kind": 128, - "children": [ - 106, - 101 + 90 ] } ] }, { - "id": 109, + "id": 93, "name": "constructor-properties", "kind": 1, "kindString": "Module", "flags": {}, "children": [ { - "id": 110, + "id": 94, "name": "Vector2", "kind": 128, "kindString": "Class", @@ -1840,14 +1525,14 @@ }, "children": [ { - "id": 111, + "id": 95, "name": "constructor", "kind": 512, "kindString": "Constructor", "flags": {}, "signatures": [ { - "id": 112, + "id": 96, "name": "new Vector2", "kind": 16384, "kindString": "Constructor signature", @@ -1855,7 +1540,7 @@ "comment": {}, "parameters": [ { - "id": 113, + "id": 97, "name": "x", "kind": 32768, "kindString": "Parameter", @@ -1869,7 +1554,7 @@ } }, { - "id": 114, + "id": 98, "name": "y", "kind": 32768, "kindString": "Parameter", @@ -1883,7 +1568,7 @@ } }, { - "id": 115, + "id": 99, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -1899,14 +1584,14 @@ ], "type": { "type": "reference", - "id": 110, + "id": 94, "name": "Vector2" } } ] }, { - "id": 118, + "id": 102, "name": "name", "kind": 1024, "kindString": "Property", @@ -1919,7 +1604,7 @@ } }, { - "id": 116, + "id": 100, "name": "x", "kind": 1024, "kindString": "Property", @@ -1932,7 +1617,7 @@ } }, { - "id": 117, + "id": 101, "name": "y", "kind": 1024, "kindString": "Property", @@ -1950,29 +1635,29 @@ "title": "Constructors", "kind": 512, "children": [ - 111 + 95 ] }, { "title": "Properties", "kind": 1024, "children": [ - 118, - 116, - 117 + 102, + 100, + 101 ] } ], "extendedBy": [ { "type": "reference", - "id": 119, + "id": 103, "name": "Vector3" } ] }, { - "id": 119, + "id": 103, "name": "Vector3", "kind": 128, "kindString": "Class", @@ -1982,14 +1667,14 @@ }, "children": [ { - "id": 120, + "id": 104, "name": "constructor", "kind": 512, "kindString": "Constructor", "flags": {}, "signatures": [ { - "id": 121, + "id": 105, "name": "new Vector3", "kind": 16384, "kindString": "Constructor signature", @@ -1997,7 +1682,7 @@ "comment": {}, "parameters": [ { - "id": 122, + "id": 106, "name": "x", "kind": 32768, "kindString": "Parameter", @@ -2011,7 +1696,7 @@ } }, { - "id": 123, + "id": 107, "name": "y", "kind": 32768, "kindString": "Parameter", @@ -2025,7 +1710,7 @@ } }, { - "id": 124, + "id": 108, "name": "z", "kind": 32768, "kindString": "Parameter", @@ -2039,7 +1724,7 @@ } }, { - "id": 125, + "id": 109, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -2055,24 +1740,24 @@ ], "type": { "type": "reference", - "id": 119, + "id": 103, "name": "Vector3" }, "overwrites": { "type": "reference", - "id": 112, + "id": 96, "name": "Vector2.constructor" } } ], "overwrites": { "type": "reference", - "id": 111, + "id": 95, "name": "Vector2.constructor" } }, { - "id": 128, + "id": 112, "name": "name", "kind": 1024, "kindString": "Property", @@ -2085,12 +1770,12 @@ }, "inheritedFrom": { "type": "reference", - "id": 118, + "id": 102, "name": "Vector2.name" } }, { - "id": 129, + "id": 113, "name": "x", "kind": 1024, "kindString": "Property", @@ -2103,12 +1788,12 @@ }, "inheritedFrom": { "type": "reference", - "id": 116, + "id": 100, "name": "Vector2.x" } }, { - "id": 126, + "id": 110, "name": "y", "kind": 1024, "kindString": "Property", @@ -2121,12 +1806,12 @@ }, "inheritedFrom": { "type": "reference", - "id": 117, + "id": 101, "name": "Vector2.y" } }, { - "id": 127, + "id": 111, "name": "z", "kind": 1024, "kindString": "Property", @@ -2144,24 +1829,24 @@ "title": "Constructors", "kind": 512, "children": [ - 120 + 104 ] }, { "title": "Properties", "kind": 1024, "children": [ - 128, - 129, - 126, - 127 + 112, + 113, + 110, + 111 ] } ], "extendedTypes": [ { "type": "reference", - "id": 110, + "id": 94, "name": "Vector2" } ] @@ -2172,21 +1857,21 @@ "title": "Classes", "kind": 128, "children": [ - 110, - 119 + 94, + 103 ] } ] }, { - "id": 130, + "id": 114, "name": "decorators", "kind": 1, "kindString": "Module", "flags": {}, "children": [ { - "id": 144, + "id": 128, "name": "DecoratedClass", "kind": 128, "kindString": "Class", @@ -2199,7 +1884,7 @@ "name": "decoratorWithOptions", "type": { "type": "reference", - "id": 139, + "id": 123, "name": "decoratorWithOptions" }, "arguments": { @@ -2209,28 +1894,28 @@ ], "children": [ { - "id": 145, + "id": 129, "name": "constructor", "kind": 512, "kindString": "Constructor", "flags": {}, "signatures": [ { - "id": 146, + "id": 130, "name": "new DecoratedClass", "kind": 16384, "kindString": "Constructor signature", "flags": {}, "type": { "type": "reference", - "id": 144, + "id": 128, "name": "DecoratedClass" } } ] }, { - "id": 147, + "id": 131, "name": "decoratedMethod", "kind": 2048, "kindString": "Method", @@ -2240,7 +1925,7 @@ "name": "decoratorAtom", "type": { "type": "reference", - "id": 131, + "id": 115, "name": "decoratorAtom" } }, @@ -2248,7 +1933,7 @@ "name": "decoratorWithParam", "type": { "type": "reference", - "id": 136, + "id": 120, "name": "decoratorWithParam" }, "arguments": { @@ -2258,7 +1943,7 @@ ], "signatures": [ { - "id": 148, + "id": 132, "name": "decoratedMethod", "kind": 4096, "kindString": "Call signature", @@ -2279,20 +1964,20 @@ "title": "Constructors", "kind": 512, "children": [ - 145 + 129 ] }, { "title": "Methods", "kind": 2048, "children": [ - 147 + 131 ] } ] }, { - "id": 131, + "id": 115, "name": "decoratorAtom", "kind": 64, "kindString": "Function", @@ -2300,13 +1985,13 @@ "decorates": [ { "type": "reference", - "id": 147, + "id": 131, "name": "decoratedMethod" } ], "signatures": [ { - "id": 132, + "id": 116, "name": "decoratorAtom", "kind": 4096, "kindString": "Call signature", @@ -2316,7 +2001,7 @@ }, "parameters": [ { - "id": 133, + "id": 117, "name": "target", "kind": 32768, "kindString": "Parameter", @@ -2327,7 +2012,7 @@ } }, { - "id": 134, + "id": 118, "name": "propertyKey", "kind": 32768, "kindString": "Parameter", @@ -2347,7 +2032,7 @@ } }, { - "id": 135, + "id": 119, "name": "descriptor", "kind": 32768, "kindString": "Parameter", @@ -2372,7 +2057,7 @@ ] }, { - "id": 139, + "id": 123, "name": "decoratorWithOptions", "kind": 64, "kindString": "Function", @@ -2380,13 +2065,13 @@ "decorates": [ { "type": "reference", - "id": 144, + "id": 128, "name": "DecoratedClass" } ], "signatures": [ { - "id": 140, + "id": 124, "name": "decoratorWithOptions", "kind": 4096, "kindString": "Call signature", @@ -2396,7 +2081,7 @@ }, "parameters": [ { - "id": 141, + "id": 125, "name": "options", "kind": 32768, "kindString": "Parameter", @@ -2407,14 +2092,14 @@ "type": { "type": "reflection", "declaration": { - "id": 142, + "id": 126, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "children": [ { - "id": 143, + "id": 127, "name": "name", "kind": 1024, "kindString": "Property", @@ -2433,7 +2118,7 @@ "title": "Properties", "kind": 1024, "children": [ - 143 + 127 ] } ] @@ -2449,7 +2134,7 @@ ] }, { - "id": 136, + "id": 120, "name": "decoratorWithParam", "kind": 64, "kindString": "Function", @@ -2457,13 +2142,13 @@ "decorates": [ { "type": "reference", - "id": 147, + "id": 131, "name": "decoratedMethod" } ], "signatures": [ { - "id": 137, + "id": 121, "name": "decoratorWithParam", "kind": 4096, "kindString": "Call signature", @@ -2473,7 +2158,7 @@ }, "parameters": [ { - "id": 138, + "id": 122, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -2500,57 +2185,57 @@ "title": "Classes", "kind": 128, "children": [ - 144 + 128 ] }, { "title": "Functions", "kind": 64, "children": [ - 131, - 139, - 136 + 115, + 123, + 120 ] } ] }, { - "id": 176, + "id": 160, "name": "events", "kind": 1, "kindString": "Module", "flags": {}, "children": [ { - "id": 177, + "id": 161, "name": "EventDispatcher", "kind": 128, "kindString": "Class", "flags": {}, "children": [ { - "id": 179, + "id": 163, "name": "constructor", "kind": 512, "kindString": "Constructor", "flags": {}, "signatures": [ { - "id": 180, + "id": 164, "name": "new EventDispatcher", "kind": 16384, "kindString": "Constructor signature", "flags": {}, "type": { "type": "reference", - "id": 177, + "id": 161, "name": "EventDispatcher" } } ] }, { - "id": 178, + "id": 162, "name": "EVENT_CLICK", "kind": 8388608, "kindString": "Event", @@ -2572,14 +2257,14 @@ "title": "Constructors", "kind": 512, "children": [ - 179 + 163 ] }, { "title": "Events", "kind": 8388608, "children": [ - 178 + 162 ] } ] @@ -2590,20 +2275,20 @@ "title": "Classes", "kind": 128, "children": [ - 177 + 161 ] } ] }, { - "id": 149, + "id": 133, "name": "events-overloads", "kind": 1, "kindString": "Module", "flags": {}, "children": [ { - "id": 150, + "id": 134, "name": "Test", "kind": 256, "kindString": "Interface", @@ -2619,14 +2304,14 @@ }, "children": [ { - "id": 151, + "id": 135, "name": "on", "kind": 8388608, "kindString": "Event", "flags": {}, "signatures": [ { - "id": 152, + "id": 136, "name": "on", "kind": 8388608, "kindString": "Event", @@ -2636,7 +2321,7 @@ }, "parameters": [ { - "id": 153, + "id": 137, "name": "event", "kind": 32768, "kindString": "Parameter", @@ -2650,7 +2335,7 @@ } }, { - "id": 154, + "id": 138, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -2661,21 +2346,21 @@ "type": { "type": "reflection", "declaration": { - "id": 155, + "id": 139, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 156, + "id": 140, "name": "__type", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 157, + "id": 141, "name": "e", "kind": 32768, "kindString": "Parameter", @@ -2702,7 +2387,7 @@ } }, { - "id": 158, + "id": 142, "name": "on", "kind": 8388608, "kindString": "Event", @@ -2712,7 +2397,7 @@ }, "parameters": [ { - "id": 159, + "id": 143, "name": "event", "kind": 32768, "kindString": "Parameter", @@ -2726,7 +2411,7 @@ } }, { - "id": 160, + "id": 144, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -2737,21 +2422,21 @@ "type": { "type": "reflection", "declaration": { - "id": 161, + "id": 145, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 162, + "id": 146, "name": "__type", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 163, + "id": 147, "name": "e", "kind": 32768, "kindString": "Parameter", @@ -2778,7 +2463,7 @@ } }, { - "id": 164, + "id": 148, "name": "on", "kind": 8388608, "kindString": "Event", @@ -2788,7 +2473,7 @@ }, "parameters": [ { - "id": 165, + "id": 149, "name": "event", "kind": 32768, "kindString": "Parameter", @@ -2802,7 +2487,7 @@ } }, { - "id": 166, + "id": 150, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -2813,21 +2498,21 @@ "type": { "type": "reflection", "declaration": { - "id": 167, + "id": 151, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 168, + "id": 152, "name": "__type", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 169, + "id": 153, "name": "e", "kind": 32768, "kindString": "Parameter", @@ -2854,7 +2539,7 @@ } }, { - "id": 170, + "id": 154, "name": "on", "kind": 8388608, "kindString": "Event", @@ -2864,7 +2549,7 @@ }, "parameters": [ { - "id": 171, + "id": 155, "name": "event", "kind": 32768, "kindString": "Parameter", @@ -2878,7 +2563,7 @@ } }, { - "id": 172, + "id": 156, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -2889,21 +2574,21 @@ "type": { "type": "reflection", "declaration": { - "id": 173, + "id": 157, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 174, + "id": 158, "name": "__type", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 175, + "id": 159, "name": "e", "kind": 32768, "kindString": "Parameter", @@ -2937,7 +2622,7 @@ "title": "Events", "kind": 8388608, "children": [ - 151 + 135 ] } ] @@ -2948,20 +2633,20 @@ "title": "Interfaces", "kind": 256, "children": [ - 150 + 134 ] } ] }, { - "id": 181, + "id": 165, "name": "generic-class", "kind": 1, "kindString": "Module", "flags": {}, "children": [ { - "id": 182, + "id": 166, "name": "GenericClass", "kind": 128, "kindString": "Class", @@ -2971,14 +2656,14 @@ }, "children": [ { - "id": 183, + "id": 167, "name": "constructor", "kind": 512, "kindString": "Constructor", "flags": {}, "signatures": [ { - "id": 184, + "id": 168, "name": "new GenericClass", "kind": 16384, "kindString": "Constructor signature", @@ -2988,7 +2673,7 @@ }, "typeParameter": [ { - "id": 185, + "id": 169, "name": "T", "kind": 131072, "kindString": "Type parameter", @@ -2997,7 +2682,7 @@ ], "parameters": [ { - "id": 186, + "id": 170, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -3013,7 +2698,7 @@ ], "type": { "type": "reference", - "id": 182, + "id": 166, "typeArguments": [ { "type": "reference", @@ -3026,7 +2711,7 @@ ] }, { - "id": 187, + "id": 171, "name": "value", "kind": 1024, "kindString": "Property", @@ -3042,7 +2727,7 @@ } }, { - "id": 188, + "id": 172, "name": "values", "kind": 1024, "kindString": "Property", @@ -3061,14 +2746,14 @@ } }, { - "id": 189, + "id": 173, "name": "getValue", "kind": 2048, "kindString": "Method", "flags": {}, "signatures": [ { - "id": 190, + "id": 174, "name": "getValue", "kind": 4096, "kindString": "Call signature", @@ -3090,28 +2775,28 @@ "title": "Constructors", "kind": 512, "children": [ - 183 + 167 ] }, { "title": "Properties", "kind": 1024, "children": [ - 187, - 188 + 171, + 172 ] }, { "title": "Methods", "kind": 2048, "children": [ - 189 + 173 ] } ], "typeParameter": [ { - "id": 191, + "id": 175, "name": "T", "kind": 131072, "kindString": "Type parameter", @@ -3124,13 +2809,13 @@ "extendedBy": [ { "type": "reference", - "id": 192, + "id": 176, "name": "NonGenericClass" } ] }, { - "id": 192, + "id": 176, "name": "NonGenericClass", "kind": 128, "kindString": "Class", @@ -3140,14 +2825,14 @@ }, "children": [ { - "id": 193, + "id": 177, "name": "constructor", "kind": 512, "kindString": "Constructor", "flags": {}, "signatures": [ { - "id": 194, + "id": 178, "name": "new NonGenericClass", "kind": 16384, "kindString": "Constructor signature", @@ -3157,7 +2842,7 @@ }, "parameters": [ { - "id": 195, + "id": 179, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -3173,24 +2858,24 @@ ], "type": { "type": "reference", - "id": 192, + "id": 176, "name": "NonGenericClass" }, "inheritedFrom": { "type": "reference", - "id": 184, + "id": 168, "name": "GenericClass.constructor" } } ], "inheritedFrom": { "type": "reference", - "id": 183, + "id": 167, "name": "GenericClass.constructor" } }, { - "id": 196, + "id": 180, "name": "value", "kind": 1024, "kindString": "Property", @@ -3206,12 +2891,12 @@ }, "inheritedFrom": { "type": "reference", - "id": 187, + "id": 171, "name": "GenericClass.value" } }, { - "id": 197, + "id": 181, "name": "values", "kind": 1024, "kindString": "Property", @@ -3230,19 +2915,19 @@ }, "inheritedFrom": { "type": "reference", - "id": 188, + "id": 172, "name": "GenericClass.values" } }, { - "id": 198, + "id": 182, "name": "getValue", "kind": 2048, "kindString": "Method", "flags": {}, "signatures": [ { - "id": 199, + "id": 183, "name": "getValue", "kind": 4096, "kindString": "Call signature", @@ -3257,14 +2942,14 @@ }, "inheritedFrom": { "type": "reference", - "id": 190, + "id": 174, "name": "GenericClass.getValue" } } ], "inheritedFrom": { "type": "reference", - "id": 189, + "id": 173, "name": "GenericClass.getValue" } } @@ -3274,29 +2959,29 @@ "title": "Constructors", "kind": 512, "children": [ - 193 + 177 ] }, { "title": "Properties", "kind": 1024, "children": [ - 196, - 197 + 180, + 181 ] }, { "title": "Methods", "kind": 2048, "children": [ - 198 + 182 ] } ], "extendedTypes": [ { "type": "reference", - "id": 182, + "id": 166, "typeArguments": [ { "type": "intrinsic", @@ -3313,49 +2998,49 @@ "title": "Classes", "kind": 128, "children": [ - 182, - 192 + 166, + 176 ] } ] }, { - "id": 200, + "id": 184, "name": "getter-setter", "kind": 1, "kindString": "Module", "flags": {}, "children": [ { - "id": 201, + "id": 185, "name": "GetterSetter", "kind": 128, "kindString": "Class", "flags": {}, "children": [ { - "id": 202, + "id": 186, "name": "constructor", "kind": 512, "kindString": "Constructor", "flags": {}, "signatures": [ { - "id": 203, + "id": 187, "name": "new GetterSetter", "kind": 16384, "kindString": "Constructor signature", "flags": {}, "type": { "type": "reference", - "id": 201, + "id": 185, "name": "GetterSetter" } } ] }, { - "id": 204, + "id": 188, "name": "_name", "kind": 1024, "kindString": "Property", @@ -3368,14 +3053,14 @@ } }, { - "id": 205, + "id": 189, "name": "name", "kind": 262144, "kindString": "Accessor", "flags": {}, "getSignature": [ { - "id": 206, + "id": 190, "name": "name", "kind": 524288, "kindString": "Get signature", @@ -3388,14 +3073,14 @@ ], "setSignature": [ { - "id": 207, + "id": 191, "name": "name", "kind": 1048576, "kindString": "Set signature", "flags": {}, "parameters": [ { - "id": 208, + "id": 192, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -3414,14 +3099,14 @@ ] }, { - "id": 209, + "id": 193, "name": "readOnlyName", "kind": 262144, "kindString": "Accessor", "flags": {}, "getSignature": [ { - "id": 210, + "id": 194, "name": "readOnlyName", "kind": 524288, "kindString": "Get signature", @@ -3434,21 +3119,21 @@ ] }, { - "id": 211, + "id": 195, "name": "writeOnlyName", "kind": 262144, "kindString": "Accessor", "flags": {}, "setSignature": [ { - "id": 212, + "id": 196, "name": "writeOnlyName", "kind": 1048576, "kindString": "Set signature", "flags": {}, "parameters": [ { - "id": 213, + "id": 197, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -3472,23 +3157,23 @@ "title": "Constructors", "kind": 512, "children": [ - 202 + 186 ] }, { "title": "Properties", "kind": 1024, "children": [ - 204 + 188 ] }, { "title": "Accessors", "kind": 262144, "children": [ - 205, - 209, - 211 + 189, + 193, + 195 ] } ] @@ -3499,20 +3184,20 @@ "title": "Classes", "kind": 128, "children": [ - 201 + 185 ] } ] }, { - "id": 214, + "id": 198, "name": "this", "kind": 1, "kindString": "Module", "flags": {}, "children": [ { - "id": 215, + "id": 199, "name": "ChainClass", "kind": 128, "kindString": "Class", @@ -3523,28 +3208,28 @@ }, "children": [ { - "id": 216, + "id": 200, "name": "constructor", "kind": 512, "kindString": "Constructor", "flags": {}, "signatures": [ { - "id": 217, + "id": 201, "name": "new ChainClass", "kind": 16384, "kindString": "Constructor signature", "flags": {}, "type": { "type": "reference", - "id": 215, + "id": 199, "name": "ChainClass" } } ] }, { - "id": 218, + "id": 202, "name": "chain", "kind": 2048, "kindString": "Method", @@ -3553,7 +3238,7 @@ }, "signatures": [ { - "id": 219, + "id": 203, "name": "chain", "kind": 4096, "kindString": "Call signature", @@ -3563,7 +3248,7 @@ }, "type": { "type": "reference", - "id": 215, + "id": 199, "name": "ChainClass" } } @@ -3575,14 +3260,14 @@ "title": "Constructors", "kind": 512, "children": [ - 216 + 200 ] }, { "title": "Methods", "kind": 2048, "children": [ - 218 + 202 ] } ] @@ -3593,41 +3278,41 @@ "title": "Classes", "kind": 128, "children": [ - 215 + 199 ] } ] }, { - "id": 220, + "id": 204, "name": "type-operator", "kind": 1, "kindString": "Module", "flags": {}, "children": [ { - "id": 226, + "id": 210, "name": "GenericClass", "kind": 128, "kindString": "Class", "flags": {}, "children": [ { - "id": 227, + "id": 211, "name": "constructor", "kind": 512, "kindString": "Constructor", "flags": {}, "signatures": [ { - "id": 228, + "id": 212, "name": "new GenericClass", "kind": 16384, "kindString": "Constructor signature", "flags": {}, "typeParameter": [ { - "id": 229, + "id": 213, "name": "T", "kind": 131072, "kindString": "Type parameter", @@ -3637,7 +3322,7 @@ "operator": "keyof", "target": { "type": "reference", - "id": 221, + "id": 205, "name": "TestClass" } } @@ -3645,7 +3330,7 @@ ], "type": { "type": "reference", - "id": 226, + "id": 210, "typeArguments": [ { "type": "reference", @@ -3658,7 +3343,7 @@ ] }, { - "id": 230, + "id": 214, "name": "c", "kind": 1024, "kindString": "Property", @@ -3674,20 +3359,20 @@ "title": "Constructors", "kind": 512, "children": [ - 227 + 211 ] }, { "title": "Properties", "kind": 1024, "children": [ - 230 + 214 ] } ], "typeParameter": [ { - "id": 231, + "id": 215, "name": "T", "kind": 131072, "kindString": "Type parameter", @@ -3697,7 +3382,7 @@ "operator": "keyof", "target": { "type": "reference", - "id": 221, + "id": 205, "name": "TestClass" } } @@ -3705,7 +3390,7 @@ ] }, { - "id": 221, + "id": 205, "name": "TestClass", "kind": 128, "kindString": "Class", @@ -3722,28 +3407,28 @@ }, "children": [ { - "id": 222, + "id": 206, "name": "constructor", "kind": 512, "kindString": "Constructor", "flags": {}, "signatures": [ { - "id": 223, + "id": 207, "name": "new TestClass", "kind": 16384, "kindString": "Constructor signature", "flags": {}, "type": { "type": "reference", - "id": 221, + "id": 205, "name": "TestClass" } } ] }, { - "id": 224, + "id": 208, "name": "a", "kind": 1024, "kindString": "Property", @@ -3754,7 +3439,7 @@ } }, { - "id": 225, + "id": 209, "name": "b", "kind": 1024, "kindString": "Property", @@ -3770,15 +3455,15 @@ "title": "Constructors", "kind": 512, "children": [ - 222 + 206 ] }, { "title": "Properties", "kind": 1024, "children": [ - 224, - 225 + 208, + 209 ] } ] @@ -3789,8 +3474,8 @@ "title": "Classes", "kind": 128, "children": [ - 226, - 221 + 210, + 205 ] } ] @@ -3803,15 +3488,14 @@ "children": [ 1, 21, - 100, - 109, - 130, - 176, - 149, - 181, - 200, - 214, - 220 + 93, + 114, + 160, + 133, + 165, + 184, + 198, + 204 ] } ] diff --git a/src/test/converter/class/specs.json b/src/test/converter/class/specs.json index d0af17aea..8595c0029 100644 --- a/src/test/converter/class/specs.json +++ b/src/test/converter/class/specs.json @@ -306,158 +306,6 @@ "kindString": "Module", "flags": {}, "children": [ - { - "id": 85, - "name": "GH1509", - "kind": 2, - "kindString": "Namespace", - "flags": {}, - "children": [ - { - "id": 86, - "name": "Foo", - "kind": 256, - "kindString": "Interface", - "flags": {}, - "children": [ - { - "id": 87, - "name": "foo", - "kind": 1024, - "kindString": "Property", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [ - 87 - ] - } - ] - }, - { - "id": 88, - "name": "PartialFoo", - "kind": 256, - "kindString": "Interface", - "flags": {}, - "children": [ - { - "id": 89, - "name": "foo", - "kind": 1024, - "kindString": "Property", - "flags": { - "isOptional": true - }, - "type": { - "type": "intrinsic", - "name": "number" - }, - "inheritedFrom": { - "type": "reference", - "name": "Partial.foo" - } - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [ - 89 - ] - } - ], - "extendedTypes": [ - { - "type": "reference", - "typeArguments": [ - { - "type": "reference", - "id": 86, - "name": "Foo" - } - ], - "name": "Partial" - } - ] - }, - { - "id": 90, - "name": "ReadonlyFoo", - "kind": 256, - "kindString": "Interface", - "flags": {}, - "children": [ - { - "id": 91, - "name": "foo", - "kind": 1024, - "kindString": "Property", - "flags": { - "isOptional": true, - "isReadonly": true - }, - "type": { - "type": "intrinsic", - "name": "number" - }, - "inheritedFrom": { - "type": "reference", - "name": "Readonly.foo" - } - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [ - 91 - ] - } - ], - "extendedTypes": [ - { - "type": "reference", - "typeArguments": [ - { - "type": "reference", - "typeArguments": [ - { - "type": "reference", - "id": 86, - "name": "Foo" - } - ], - "name": "Partial" - } - ], - "name": "Readonly" - } - ] - } - ], - "groups": [ - { - "title": "Interfaces", - "kind": 256, - "children": [ - 86, - 88, - 90 - ] - } - ] - }, { "id": 59, "name": "TestSubClass", @@ -500,7 +348,7 @@ ] }, { - "id": 92, + "id": 85, "name": "Abstract", "kind": 128, "kindString": "Class", @@ -509,28 +357,28 @@ }, "children": [ { - "id": 93, + "id": 86, "name": "constructor", "kind": 512, "kindString": "Constructor", "flags": {}, "signatures": [ { - "id": 94, + "id": 87, "name": "new Abstract", "kind": 16384, "kindString": "Constructor signature", "flags": {}, "type": { "type": "reference", - "id": 92, + "id": 85, "name": "Abstract" } } ] }, { - "id": 95, + "id": 88, "name": "needsImpl", "kind": 2048, "kindString": "Method", @@ -539,7 +387,7 @@ }, "signatures": [ { - "id": 96, + "id": 89, "name": "needsImpl", "kind": 4096, "kindString": "Call signature", @@ -557,14 +405,14 @@ "title": "Constructors", "kind": 512, "children": [ - 93 + 86 ] }, { "title": "Methods", "kind": 2048, "children": [ - 95 + 88 ] } ] @@ -1592,7 +1440,7 @@ ] }, { - "id": 97, + "id": 90, "name": "AbstractMe", "kind": 4194304, "kindString": "Type alias", @@ -1600,14 +1448,14 @@ "type": { "type": "reflection", "declaration": { - "id": 98, + "id": 91, "name": "__type", "kind": 512, "kindString": "Constructor", "flags": {}, "signatures": [ { - "id": 99, + "id": 92, "name": "__type", "kind": 16384, "kindString": "Constructor signature", @@ -1616,7 +1464,7 @@ }, "type": { "type": "reference", - "id": 92, + "id": 85, "name": "Abstract" } } @@ -1630,7 +1478,6 @@ "title": "Namespaces", "kind": 2, "children": [ - 85, 59 ] }, @@ -1638,7 +1485,7 @@ "title": "Classes", "kind": 128, "children": [ - 92, + 85, 74, 62, 68, @@ -1651,182 +1498,20 @@ "title": "Type aliases", "kind": 4194304, "children": [ - 97 - ] - } - ] - }, - { - "id": 100, - "name": "clodule", - "kind": 1, - "kindString": "Module", - "flags": {}, - "comment": {}, - "originalName": "clodule-with-subclass", - "children": [ - { - "id": 104, - "name": "Foo", - "kind": 2, - "kindString": "Namespace", - "flags": {}, - "children": [ - { - "id": 105, - "name": "x", - "kind": 32, - "kindString": "Variable", - "flags": { - "isConst": true - }, - "type": { - "type": "literal", - "value": 1 - }, - "defaultValue": "1" - } - ], - "groups": [ - { - "title": "Variables", - "kind": 32, - "children": [ - 105 - ] - } - ] - }, - { - "id": 106, - "name": "Bar", - "kind": 128, - "kindString": "Class", - "flags": {}, - "children": [ - { - "id": 107, - "name": "constructor", - "kind": 512, - "kindString": "Constructor", - "flags": {}, - "signatures": [ - { - "id": 108, - "name": "new Bar", - "kind": 16384, - "kindString": "Constructor signature", - "flags": {}, - "type": { - "type": "reference", - "id": 106, - "name": "Bar" - }, - "inheritedFrom": { - "type": "reference", - "id": 103, - "name": "Foo.constructor" - } - } - ], - "inheritedFrom": { - "type": "reference", - "id": 102, - "name": "Foo.constructor" - } - } - ], - "groups": [ - { - "title": "Constructors", - "kind": 512, - "children": [ - 107 - ] - } - ], - "extendedTypes": [ - { - "type": "reference", - "id": 101, - "name": "Foo" - } - ] - }, - { - "id": 101, - "name": "Foo", - "kind": 128, - "kindString": "Class", - "flags": {}, - "children": [ - { - "id": 102, - "name": "constructor", - "kind": 512, - "kindString": "Constructor", - "flags": {}, - "signatures": [ - { - "id": 103, - "name": "new Foo", - "kind": 16384, - "kindString": "Constructor signature", - "flags": {}, - "type": { - "type": "reference", - "id": 101, - "name": "Foo" - } - } - ] - } - ], - "groups": [ - { - "title": "Constructors", - "kind": 512, - "children": [ - 102 - ] - } - ], - "extendedBy": [ - { - "type": "reference", - "id": 106, - "name": "Bar" - } - ] - } - ], - "groups": [ - { - "title": "Namespaces", - "kind": 2, - "children": [ - 104 - ] - }, - { - "title": "Classes", - "kind": 128, - "children": [ - 106, - 101 + 90 ] } ] }, { - "id": 109, + "id": 93, "name": "constructor-properties", "kind": 1, "kindString": "Module", "flags": {}, "children": [ { - "id": 110, + "id": 94, "name": "Vector2", "kind": 128, "kindString": "Class", @@ -1836,14 +1521,14 @@ }, "children": [ { - "id": 111, + "id": 95, "name": "constructor", "kind": 512, "kindString": "Constructor", "flags": {}, "signatures": [ { - "id": 112, + "id": 96, "name": "new Vector2", "kind": 16384, "kindString": "Constructor signature", @@ -1851,7 +1536,7 @@ "comment": {}, "parameters": [ { - "id": 113, + "id": 97, "name": "x", "kind": 32768, "kindString": "Parameter", @@ -1865,7 +1550,7 @@ } }, { - "id": 114, + "id": 98, "name": "y", "kind": 32768, "kindString": "Parameter", @@ -1879,7 +1564,7 @@ } }, { - "id": 115, + "id": 99, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -1895,14 +1580,14 @@ ], "type": { "type": "reference", - "id": 110, + "id": 94, "name": "Vector2" } } ] }, { - "id": 118, + "id": 102, "name": "name", "kind": 1024, "kindString": "Property", @@ -1915,7 +1600,7 @@ } }, { - "id": 116, + "id": 100, "name": "x", "kind": 1024, "kindString": "Property", @@ -1928,7 +1613,7 @@ } }, { - "id": 117, + "id": 101, "name": "y", "kind": 1024, "kindString": "Property", @@ -1946,29 +1631,29 @@ "title": "Constructors", "kind": 512, "children": [ - 111 + 95 ] }, { "title": "Properties", "kind": 1024, "children": [ - 118, - 116, - 117 + 102, + 100, + 101 ] } ], "extendedBy": [ { "type": "reference", - "id": 119, + "id": 103, "name": "Vector3" } ] }, { - "id": 119, + "id": 103, "name": "Vector3", "kind": 128, "kindString": "Class", @@ -1978,14 +1663,14 @@ }, "children": [ { - "id": 120, + "id": 104, "name": "constructor", "kind": 512, "kindString": "Constructor", "flags": {}, "signatures": [ { - "id": 121, + "id": 105, "name": "new Vector3", "kind": 16384, "kindString": "Constructor signature", @@ -1993,7 +1678,7 @@ "comment": {}, "parameters": [ { - "id": 122, + "id": 106, "name": "x", "kind": 32768, "kindString": "Parameter", @@ -2007,7 +1692,7 @@ } }, { - "id": 123, + "id": 107, "name": "y", "kind": 32768, "kindString": "Parameter", @@ -2021,7 +1706,7 @@ } }, { - "id": 124, + "id": 108, "name": "z", "kind": 32768, "kindString": "Parameter", @@ -2035,7 +1720,7 @@ } }, { - "id": 125, + "id": 109, "name": "name", "kind": 32768, "kindString": "Parameter", @@ -2051,24 +1736,24 @@ ], "type": { "type": "reference", - "id": 119, + "id": 103, "name": "Vector3" }, "overwrites": { "type": "reference", - "id": 112, + "id": 96, "name": "Vector2.constructor" } } ], "overwrites": { "type": "reference", - "id": 111, + "id": 95, "name": "Vector2.constructor" } }, { - "id": 128, + "id": 112, "name": "name", "kind": 1024, "kindString": "Property", @@ -2081,12 +1766,12 @@ }, "inheritedFrom": { "type": "reference", - "id": 118, + "id": 102, "name": "Vector2.name" } }, { - "id": 129, + "id": 113, "name": "x", "kind": 1024, "kindString": "Property", @@ -2099,12 +1784,12 @@ }, "inheritedFrom": { "type": "reference", - "id": 116, + "id": 100, "name": "Vector2.x" } }, { - "id": 126, + "id": 110, "name": "y", "kind": 1024, "kindString": "Property", @@ -2117,12 +1802,12 @@ }, "inheritedFrom": { "type": "reference", - "id": 117, + "id": 101, "name": "Vector2.y" } }, { - "id": 127, + "id": 111, "name": "z", "kind": 1024, "kindString": "Property", @@ -2140,24 +1825,24 @@ "title": "Constructors", "kind": 512, "children": [ - 120 + 104 ] }, { "title": "Properties", "kind": 1024, "children": [ - 128, - 129, - 126, - 127 + 112, + 113, + 110, + 111 ] } ], "extendedTypes": [ { "type": "reference", - "id": 110, + "id": 94, "name": "Vector2" } ] @@ -2168,21 +1853,21 @@ "title": "Classes", "kind": 128, "children": [ - 110, - 119 + 94, + 103 ] } ] }, { - "id": 130, + "id": 114, "name": "decorators", "kind": 1, "kindString": "Module", "flags": {}, "children": [ { - "id": 144, + "id": 128, "name": "DecoratedClass", "kind": 128, "kindString": "Class", @@ -2195,7 +1880,7 @@ "name": "decoratorWithOptions", "type": { "type": "reference", - "id": 139, + "id": 123, "name": "decoratorWithOptions" }, "arguments": { @@ -2205,28 +1890,28 @@ ], "children": [ { - "id": 145, + "id": 129, "name": "constructor", "kind": 512, "kindString": "Constructor", "flags": {}, "signatures": [ { - "id": 146, + "id": 130, "name": "new DecoratedClass", "kind": 16384, "kindString": "Constructor signature", "flags": {}, "type": { "type": "reference", - "id": 144, + "id": 128, "name": "DecoratedClass" } } ] }, { - "id": 147, + "id": 131, "name": "decoratedMethod", "kind": 2048, "kindString": "Method", @@ -2236,7 +1921,7 @@ "name": "decoratorAtom", "type": { "type": "reference", - "id": 131, + "id": 115, "name": "decoratorAtom" } }, @@ -2244,7 +1929,7 @@ "name": "decoratorWithParam", "type": { "type": "reference", - "id": 136, + "id": 120, "name": "decoratorWithParam" }, "arguments": { @@ -2254,7 +1939,7 @@ ], "signatures": [ { - "id": 148, + "id": 132, "name": "decoratedMethod", "kind": 4096, "kindString": "Call signature", @@ -2275,20 +1960,20 @@ "title": "Constructors", "kind": 512, "children": [ - 145 + 129 ] }, { "title": "Methods", "kind": 2048, "children": [ - 147 + 131 ] } ] }, { - "id": 131, + "id": 115, "name": "decoratorAtom", "kind": 64, "kindString": "Function", @@ -2296,13 +1981,13 @@ "decorates": [ { "type": "reference", - "id": 147, + "id": 131, "name": "decoratedMethod" } ], "signatures": [ { - "id": 132, + "id": 116, "name": "decoratorAtom", "kind": 4096, "kindString": "Call signature", @@ -2312,7 +1997,7 @@ }, "parameters": [ { - "id": 133, + "id": 117, "name": "target", "kind": 32768, "kindString": "Parameter", @@ -2323,7 +2008,7 @@ } }, { - "id": 134, + "id": 118, "name": "propertyKey", "kind": 32768, "kindString": "Parameter", @@ -2343,7 +2028,7 @@ } }, { - "id": 135, + "id": 119, "name": "descriptor", "kind": 32768, "kindString": "Parameter", @@ -2368,7 +2053,7 @@ ] }, { - "id": 139, + "id": 123, "name": "decoratorWithOptions", "kind": 64, "kindString": "Function", @@ -2376,13 +2061,13 @@ "decorates": [ { "type": "reference", - "id": 144, + "id": 128, "name": "DecoratedClass" } ], "signatures": [ { - "id": 140, + "id": 124, "name": "decoratorWithOptions", "kind": 4096, "kindString": "Call signature", @@ -2392,7 +2077,7 @@ }, "parameters": [ { - "id": 141, + "id": 125, "name": "options", "kind": 32768, "kindString": "Parameter", @@ -2403,14 +2088,14 @@ "type": { "type": "reflection", "declaration": { - "id": 142, + "id": 126, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "children": [ { - "id": 143, + "id": 127, "name": "name", "kind": 1024, "kindString": "Property", @@ -2429,7 +2114,7 @@ "title": "Properties", "kind": 1024, "children": [ - 143 + 127 ] } ] @@ -2445,7 +2130,7 @@ ] }, { - "id": 136, + "id": 120, "name": "decoratorWithParam", "kind": 64, "kindString": "Function", @@ -2453,13 +2138,13 @@ "decorates": [ { "type": "reference", - "id": 147, + "id": 131, "name": "decoratedMethod" } ], "signatures": [ { - "id": 137, + "id": 121, "name": "decoratorWithParam", "kind": 4096, "kindString": "Call signature", @@ -2469,7 +2154,7 @@ }, "parameters": [ { - "id": 138, + "id": 122, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -2496,57 +2181,57 @@ "title": "Classes", "kind": 128, "children": [ - 144 + 128 ] }, { "title": "Functions", "kind": 64, "children": [ - 131, - 139, - 136 + 115, + 123, + 120 ] } ] }, { - "id": 176, + "id": 160, "name": "events", "kind": 1, "kindString": "Module", "flags": {}, "children": [ { - "id": 177, + "id": 161, "name": "EventDispatcher", "kind": 128, "kindString": "Class", "flags": {}, "children": [ { - "id": 179, + "id": 163, "name": "constructor", "kind": 512, "kindString": "Constructor", "flags": {}, "signatures": [ { - "id": 180, + "id": 164, "name": "new EventDispatcher", "kind": 16384, "kindString": "Constructor signature", "flags": {}, "type": { "type": "reference", - "id": 177, + "id": 161, "name": "EventDispatcher" } } ] }, { - "id": 178, + "id": 162, "name": "EVENT_CLICK", "kind": 8388608, "kindString": "Event", @@ -2568,14 +2253,14 @@ "title": "Constructors", "kind": 512, "children": [ - 179 + 163 ] }, { "title": "Events", "kind": 8388608, "children": [ - 178 + 162 ] } ] @@ -2586,20 +2271,20 @@ "title": "Classes", "kind": 128, "children": [ - 177 + 161 ] } ] }, { - "id": 149, + "id": 133, "name": "events-overloads", "kind": 1, "kindString": "Module", "flags": {}, "children": [ { - "id": 150, + "id": 134, "name": "Test", "kind": 256, "kindString": "Interface", @@ -2615,14 +2300,14 @@ }, "children": [ { - "id": 151, + "id": 135, "name": "on", "kind": 8388608, "kindString": "Event", "flags": {}, "signatures": [ { - "id": 152, + "id": 136, "name": "on", "kind": 8388608, "kindString": "Event", @@ -2632,7 +2317,7 @@ }, "parameters": [ { - "id": 153, + "id": 137, "name": "event", "kind": 32768, "kindString": "Parameter", @@ -2646,7 +2331,7 @@ } }, { - "id": 154, + "id": 138, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -2657,21 +2342,21 @@ "type": { "type": "reflection", "declaration": { - "id": 155, + "id": 139, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 156, + "id": 140, "name": "__type", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 157, + "id": 141, "name": "e", "kind": 32768, "kindString": "Parameter", @@ -2698,7 +2383,7 @@ } }, { - "id": 158, + "id": 142, "name": "on", "kind": 8388608, "kindString": "Event", @@ -2708,7 +2393,7 @@ }, "parameters": [ { - "id": 159, + "id": 143, "name": "event", "kind": 32768, "kindString": "Parameter", @@ -2722,7 +2407,7 @@ } }, { - "id": 160, + "id": 144, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -2733,21 +2418,21 @@ "type": { "type": "reflection", "declaration": { - "id": 161, + "id": 145, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 162, + "id": 146, "name": "__type", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 163, + "id": 147, "name": "e", "kind": 32768, "kindString": "Parameter", @@ -2774,7 +2459,7 @@ } }, { - "id": 164, + "id": 148, "name": "on", "kind": 8388608, "kindString": "Event", @@ -2784,7 +2469,7 @@ }, "parameters": [ { - "id": 165, + "id": 149, "name": "event", "kind": 32768, "kindString": "Parameter", @@ -2798,7 +2483,7 @@ } }, { - "id": 166, + "id": 150, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -2809,21 +2494,21 @@ "type": { "type": "reflection", "declaration": { - "id": 167, + "id": 151, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 168, + "id": 152, "name": "__type", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 169, + "id": 153, "name": "e", "kind": 32768, "kindString": "Parameter", @@ -2850,7 +2535,7 @@ } }, { - "id": 170, + "id": 154, "name": "on", "kind": 8388608, "kindString": "Event", @@ -2860,7 +2545,7 @@ }, "parameters": [ { - "id": 171, + "id": 155, "name": "event", "kind": 32768, "kindString": "Parameter", @@ -2874,7 +2559,7 @@ } }, { - "id": 172, + "id": 156, "name": "handler", "kind": 32768, "kindString": "Parameter", @@ -2885,21 +2570,21 @@ "type": { "type": "reflection", "declaration": { - "id": 173, + "id": 157, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 174, + "id": 158, "name": "__type", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 175, + "id": 159, "name": "e", "kind": 32768, "kindString": "Parameter", @@ -2933,7 +2618,7 @@ "title": "Events", "kind": 8388608, "children": [ - 151 + 135 ] } ] @@ -2944,20 +2629,20 @@ "title": "Interfaces", "kind": 256, "children": [ - 150 + 134 ] } ] }, { - "id": 181, + "id": 165, "name": "generic-class", "kind": 1, "kindString": "Module", "flags": {}, "children": [ { - "id": 182, + "id": 166, "name": "GenericClass", "kind": 128, "kindString": "Class", @@ -2967,14 +2652,14 @@ }, "children": [ { - "id": 183, + "id": 167, "name": "constructor", "kind": 512, "kindString": "Constructor", "flags": {}, "signatures": [ { - "id": 184, + "id": 168, "name": "new GenericClass", "kind": 16384, "kindString": "Constructor signature", @@ -2984,7 +2669,7 @@ }, "typeParameter": [ { - "id": 185, + "id": 169, "name": "T", "kind": 131072, "kindString": "Type parameter", @@ -2993,7 +2678,7 @@ ], "parameters": [ { - "id": 186, + "id": 170, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -3009,7 +2694,7 @@ ], "type": { "type": "reference", - "id": 182, + "id": 166, "typeArguments": [ { "type": "reference", @@ -3022,7 +2707,7 @@ ] }, { - "id": 187, + "id": 171, "name": "value", "kind": 1024, "kindString": "Property", @@ -3038,7 +2723,7 @@ } }, { - "id": 188, + "id": 172, "name": "values", "kind": 1024, "kindString": "Property", @@ -3057,14 +2742,14 @@ } }, { - "id": 189, + "id": 173, "name": "getValue", "kind": 2048, "kindString": "Method", "flags": {}, "signatures": [ { - "id": 190, + "id": 174, "name": "getValue", "kind": 4096, "kindString": "Call signature", @@ -3086,28 +2771,28 @@ "title": "Constructors", "kind": 512, "children": [ - 183 + 167 ] }, { "title": "Properties", "kind": 1024, "children": [ - 187, - 188 + 171, + 172 ] }, { "title": "Methods", "kind": 2048, "children": [ - 189 + 173 ] } ], "typeParameter": [ { - "id": 191, + "id": 175, "name": "T", "kind": 131072, "kindString": "Type parameter", @@ -3120,13 +2805,13 @@ "extendedBy": [ { "type": "reference", - "id": 192, + "id": 176, "name": "NonGenericClass" } ] }, { - "id": 192, + "id": 176, "name": "NonGenericClass", "kind": 128, "kindString": "Class", @@ -3136,14 +2821,14 @@ }, "children": [ { - "id": 193, + "id": 177, "name": "constructor", "kind": 512, "kindString": "Constructor", "flags": {}, "signatures": [ { - "id": 194, + "id": 178, "name": "new NonGenericClass", "kind": 16384, "kindString": "Constructor signature", @@ -3153,7 +2838,7 @@ }, "parameters": [ { - "id": 195, + "id": 179, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -3169,24 +2854,24 @@ ], "type": { "type": "reference", - "id": 192, + "id": 176, "name": "NonGenericClass" }, "inheritedFrom": { "type": "reference", - "id": 184, + "id": 168, "name": "GenericClass.constructor" } } ], "inheritedFrom": { "type": "reference", - "id": 183, + "id": 167, "name": "GenericClass.constructor" } }, { - "id": 196, + "id": 180, "name": "value", "kind": 1024, "kindString": "Property", @@ -3202,12 +2887,12 @@ }, "inheritedFrom": { "type": "reference", - "id": 187, + "id": 171, "name": "GenericClass.value" } }, { - "id": 197, + "id": 181, "name": "values", "kind": 1024, "kindString": "Property", @@ -3226,19 +2911,19 @@ }, "inheritedFrom": { "type": "reference", - "id": 188, + "id": 172, "name": "GenericClass.values" } }, { - "id": 198, + "id": 182, "name": "getValue", "kind": 2048, "kindString": "Method", "flags": {}, "signatures": [ { - "id": 199, + "id": 183, "name": "getValue", "kind": 4096, "kindString": "Call signature", @@ -3253,14 +2938,14 @@ }, "inheritedFrom": { "type": "reference", - "id": 190, + "id": 174, "name": "GenericClass.getValue" } } ], "inheritedFrom": { "type": "reference", - "id": 189, + "id": 173, "name": "GenericClass.getValue" } } @@ -3270,29 +2955,29 @@ "title": "Constructors", "kind": 512, "children": [ - 193 + 177 ] }, { "title": "Properties", "kind": 1024, "children": [ - 196, - 197 + 180, + 181 ] }, { "title": "Methods", "kind": 2048, "children": [ - 198 + 182 ] } ], "extendedTypes": [ { "type": "reference", - "id": 182, + "id": 166, "typeArguments": [ { "type": "intrinsic", @@ -3309,49 +2994,49 @@ "title": "Classes", "kind": 128, "children": [ - 182, - 192 + 166, + 176 ] } ] }, { - "id": 200, + "id": 184, "name": "getter-setter", "kind": 1, "kindString": "Module", "flags": {}, "children": [ { - "id": 201, + "id": 185, "name": "GetterSetter", "kind": 128, "kindString": "Class", "flags": {}, "children": [ { - "id": 202, + "id": 186, "name": "constructor", "kind": 512, "kindString": "Constructor", "flags": {}, "signatures": [ { - "id": 203, + "id": 187, "name": "new GetterSetter", "kind": 16384, "kindString": "Constructor signature", "flags": {}, "type": { "type": "reference", - "id": 201, + "id": 185, "name": "GetterSetter" } } ] }, { - "id": 204, + "id": 188, "name": "_name", "kind": 1024, "kindString": "Property", @@ -3364,14 +3049,14 @@ } }, { - "id": 205, + "id": 189, "name": "name", "kind": 262144, "kindString": "Accessor", "flags": {}, "getSignature": [ { - "id": 206, + "id": 190, "name": "name", "kind": 524288, "kindString": "Get signature", @@ -3384,14 +3069,14 @@ ], "setSignature": [ { - "id": 207, + "id": 191, "name": "name", "kind": 1048576, "kindString": "Set signature", "flags": {}, "parameters": [ { - "id": 208, + "id": 192, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -3410,14 +3095,14 @@ ] }, { - "id": 209, + "id": 193, "name": "readOnlyName", "kind": 262144, "kindString": "Accessor", "flags": {}, "getSignature": [ { - "id": 210, + "id": 194, "name": "readOnlyName", "kind": 524288, "kindString": "Get signature", @@ -3430,21 +3115,21 @@ ] }, { - "id": 211, + "id": 195, "name": "writeOnlyName", "kind": 262144, "kindString": "Accessor", "flags": {}, "setSignature": [ { - "id": 212, + "id": 196, "name": "writeOnlyName", "kind": 1048576, "kindString": "Set signature", "flags": {}, "parameters": [ { - "id": 213, + "id": 197, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -3468,23 +3153,23 @@ "title": "Constructors", "kind": 512, "children": [ - 202 + 186 ] }, { "title": "Properties", "kind": 1024, "children": [ - 204 + 188 ] }, { "title": "Accessors", "kind": 262144, "children": [ - 205, - 209, - 211 + 189, + 193, + 195 ] } ] @@ -3495,20 +3180,20 @@ "title": "Classes", "kind": 128, "children": [ - 201 + 185 ] } ] }, { - "id": 214, + "id": 198, "name": "this", "kind": 1, "kindString": "Module", "flags": {}, "children": [ { - "id": 215, + "id": 199, "name": "ChainClass", "kind": 128, "kindString": "Class", @@ -3519,28 +3204,28 @@ }, "children": [ { - "id": 216, + "id": 200, "name": "constructor", "kind": 512, "kindString": "Constructor", "flags": {}, "signatures": [ { - "id": 217, + "id": 201, "name": "new ChainClass", "kind": 16384, "kindString": "Constructor signature", "flags": {}, "type": { "type": "reference", - "id": 215, + "id": 199, "name": "ChainClass" } } ] }, { - "id": 218, + "id": 202, "name": "chain", "kind": 2048, "kindString": "Method", @@ -3549,7 +3234,7 @@ }, "signatures": [ { - "id": 219, + "id": 203, "name": "chain", "kind": 4096, "kindString": "Call signature", @@ -3559,7 +3244,7 @@ }, "type": { "type": "reference", - "id": 215, + "id": 199, "name": "ChainClass" } } @@ -3571,14 +3256,14 @@ "title": "Constructors", "kind": 512, "children": [ - 216 + 200 ] }, { "title": "Methods", "kind": 2048, "children": [ - 218 + 202 ] } ] @@ -3589,41 +3274,41 @@ "title": "Classes", "kind": 128, "children": [ - 215 + 199 ] } ] }, { - "id": 220, + "id": 204, "name": "type-operator", "kind": 1, "kindString": "Module", "flags": {}, "children": [ { - "id": 226, + "id": 210, "name": "GenericClass", "kind": 128, "kindString": "Class", "flags": {}, "children": [ { - "id": 227, + "id": 211, "name": "constructor", "kind": 512, "kindString": "Constructor", "flags": {}, "signatures": [ { - "id": 228, + "id": 212, "name": "new GenericClass", "kind": 16384, "kindString": "Constructor signature", "flags": {}, "typeParameter": [ { - "id": 229, + "id": 213, "name": "T", "kind": 131072, "kindString": "Type parameter", @@ -3633,7 +3318,7 @@ "operator": "keyof", "target": { "type": "reference", - "id": 221, + "id": 205, "name": "TestClass" } } @@ -3641,7 +3326,7 @@ ], "type": { "type": "reference", - "id": 226, + "id": 210, "typeArguments": [ { "type": "reference", @@ -3654,7 +3339,7 @@ ] }, { - "id": 230, + "id": 214, "name": "c", "kind": 1024, "kindString": "Property", @@ -3670,20 +3355,20 @@ "title": "Constructors", "kind": 512, "children": [ - 227 + 211 ] }, { "title": "Properties", "kind": 1024, "children": [ - 230 + 214 ] } ], "typeParameter": [ { - "id": 231, + "id": 215, "name": "T", "kind": 131072, "kindString": "Type parameter", @@ -3693,7 +3378,7 @@ "operator": "keyof", "target": { "type": "reference", - "id": 221, + "id": 205, "name": "TestClass" } } @@ -3701,7 +3386,7 @@ ] }, { - "id": 221, + "id": 205, "name": "TestClass", "kind": 128, "kindString": "Class", @@ -3718,28 +3403,28 @@ }, "children": [ { - "id": 222, + "id": 206, "name": "constructor", "kind": 512, "kindString": "Constructor", "flags": {}, "signatures": [ { - "id": 223, + "id": 207, "name": "new TestClass", "kind": 16384, "kindString": "Constructor signature", "flags": {}, "type": { "type": "reference", - "id": 221, + "id": 205, "name": "TestClass" } } ] }, { - "id": 224, + "id": 208, "name": "a", "kind": 1024, "kindString": "Property", @@ -3750,7 +3435,7 @@ } }, { - "id": 225, + "id": 209, "name": "b", "kind": 1024, "kindString": "Property", @@ -3766,15 +3451,15 @@ "title": "Constructors", "kind": 512, "children": [ - 222 + 206 ] }, { "title": "Properties", "kind": 1024, "children": [ - 224, - 225 + 208, + 209 ] } ] @@ -3785,8 +3470,8 @@ "title": "Classes", "kind": 128, "children": [ - 226, - 221 + 210, + 205 ] } ] @@ -3799,15 +3484,14 @@ "children": [ 1, 21, - 100, - 109, - 130, - 176, - 149, - 181, - 200, - 214, - 220 + 93, + 114, + 160, + 133, + 165, + 184, + 198, + 204 ] } ] diff --git a/src/test/converter/comment/comment.ts b/src/test/converter/comment/comment.ts index c666640cb..2281daf3f 100644 --- a/src/test/converter/comment/comment.ts +++ b/src/test/converter/comment/comment.ts @@ -82,24 +82,3 @@ export class CommentedClass { */ ignoredprop: string; } - -/** Function description - * - * @param scope {@link CommentedClass} Test description. - * @returns Test description. - */ -export function gh1164(scope: string) { - return scope; -} - -export interface GH1490 { - /** With comment */ - optionalMethod?(): void; -} - -export declare namespace GH1522 { - /** @category cat */ - export function over(): string; - /** @category cat */ - export function over(x: number): number; -} diff --git a/src/test/converter/comment/specs.json b/src/test/converter/comment/specs.json index 0cce80ea6..f4ccc95e9 100644 --- a/src/test/converter/comment/specs.json +++ b/src/test/converter/comment/specs.json @@ -15,79 +15,7 @@ }, "children": [ { - "id": 32, - "name": "GH1522", - "kind": 2, - "kindString": "Namespace", - "flags": {}, - "children": [ - { - "id": 33, - "name": "over", - "kind": 64, - "kindString": "Function", - "flags": {}, - "signatures": [ - { - "id": 34, - "name": "over", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "comment": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 35, - "name": "over", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "comment": {}, - "parameters": [ - { - "id": 36, - "name": "x", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - } - ] - } - ], - "groups": [ - { - "title": "Functions", - "kind": 64, - "children": [ - 33 - ], - "categories": [ - { - "title": "cat", - "children": [ - 33 - ] - } - ] - } - ] - }, - { - "id": 5, + "id": 2, "name": "CommentedClass", "kind": 128, "kindString": "Class", @@ -108,28 +36,28 @@ }, "children": [ { - "id": 6, + "id": 3, "name": "constructor", "kind": 512, "kindString": "Constructor", "flags": {}, "signatures": [ { - "id": 7, + "id": 4, "name": "new CommentedClass", "kind": 16384, "kindString": "Constructor signature", "flags": {}, "type": { "type": "reference", - "id": 5, + "id": 2, "name": "CommentedClass" } } ] }, { - "id": 8, + "id": 5, "name": "prop", "kind": 1024, "kindString": "Property", @@ -143,14 +71,14 @@ } }, { - "id": 22, + "id": 19, "name": "mixedHidden", "kind": 2048, "kindString": "Method", "flags": {}, "signatures": [ { - "id": 25, + "id": 22, "name": "mixedHidden", "kind": 4096, "kindString": "Call signature", @@ -160,7 +88,7 @@ }, "parameters": [ { - "id": 26, + "id": 23, "name": "arg1", "kind": 32768, "kindString": "Parameter", @@ -171,7 +99,7 @@ } }, { - "id": 27, + "id": 24, "name": "arg2", "kind": 32768, "kindString": "Parameter", @@ -195,134 +123,30 @@ "title": "Constructors", "kind": 512, "children": [ - 6 + 3 ] }, { "title": "Properties", "kind": 1024, "children": [ - 8 + 5 ] }, { "title": "Methods", "kind": 2048, "children": [ - 22 - ] - } - ] - }, - { - "id": 29, - "name": "GH1490", - "kind": 256, - "kindString": "Interface", - "flags": {}, - "children": [ - { - "id": 30, - "name": "optionalMethod", - "kind": 2048, - "kindString": "Method", - "flags": { - "isOptional": true - }, - "signatures": [ - { - "id": 31, - "name": "optionalMethod", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "comment": { - "shortText": "With comment" - }, - "type": { - "type": "intrinsic", - "name": "void" - } - } - ] - } - ], - "groups": [ - { - "title": "Methods", - "kind": 2048, - "children": [ - 30 + 19 ] } ] - }, - { - "id": 2, - "name": "gh1164", - "kind": 64, - "kindString": "Function", - "flags": {}, - "signatures": [ - { - "id": 3, - "name": "gh1164", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "comment": { - "shortText": "Function description", - "returns": "Test description.\n" - }, - "parameters": [ - { - "id": 4, - "name": "scope", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "comment": { - "text": "{@link CommentedClass} Test description." - }, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ] } ], "groups": [ - { - "title": "Namespaces", - "kind": 2, - "children": [ - 32 - ] - }, { "title": "Classes", "kind": 128, - "children": [ - 5 - ] - }, - { - "title": "Interfaces", - "kind": 256, - "children": [ - 29 - ] - }, - { - "title": "Functions", - "kind": 64, "children": [ 2 ] @@ -330,7 +154,7 @@ ] }, { - "id": 37, + "id": 26, "name": "comment2", "kind": 1, "kindString": "Module", @@ -341,21 +165,21 @@ }, "children": [ { - "id": 38, + "id": 27, "name": "multiply", "kind": 64, "kindString": "Function", "flags": {}, "signatures": [ { - "id": 39, + "id": 28, "name": "multiply", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 40, + "id": 29, "name": "a", "kind": 32768, "kindString": "Parameter", @@ -366,7 +190,7 @@ } }, { - "id": 41, + "id": 30, "name": "b", "kind": 32768, "kindString": "Parameter", @@ -390,13 +214,13 @@ "title": "Functions", "kind": 64, "children": [ - 38 + 27 ] } ] }, { - "id": 42, + "id": 31, "name": "comment3", "kind": 1, "kindString": "Module", @@ -406,21 +230,21 @@ }, "children": [ { - "id": 43, + "id": 32, "name": "multiply", "kind": 64, "kindString": "Function", "flags": {}, "signatures": [ { - "id": 44, + "id": 33, "name": "multiply", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 45, + "id": 34, "name": "a", "kind": 32768, "kindString": "Parameter", @@ -431,7 +255,7 @@ } }, { - "id": 46, + "id": 35, "name": "b", "kind": 32768, "kindString": "Parameter", @@ -455,13 +279,13 @@ "title": "Functions", "kind": 64, "children": [ - 43 + 32 ] } ] }, { - "id": 47, + "id": 36, "name": "comment4", "kind": 1, "kindString": "Module", @@ -471,21 +295,21 @@ }, "children": [ { - "id": 48, + "id": 37, "name": "multiply", "kind": 64, "kindString": "Function", "flags": {}, "signatures": [ { - "id": 49, + "id": 38, "name": "multiply", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 50, + "id": 39, "name": "a", "kind": 32768, "kindString": "Parameter", @@ -496,7 +320,7 @@ } }, { - "id": 51, + "id": 40, "name": "b", "kind": 32768, "kindString": "Parameter", @@ -520,7 +344,7 @@ "title": "Functions", "kind": 64, "children": [ - 48 + 37 ] } ] @@ -532,9 +356,9 @@ "kind": 1, "children": [ 1, - 37, - 42, - 47 + 26, + 31, + 36 ] } ] diff --git a/src/test/converter/declaration/declaration.d.ts b/src/test/converter/declaration/declaration.d.ts index 9104ed1f6..f74a17094 100644 --- a/src/test/converter/declaration/declaration.d.ts +++ b/src/test/converter/declaration/declaration.d.ts @@ -3,8 +3,3 @@ export declare class Decl { } export declare const x: number; - -export namespace GH1524 { - export function nullable(opt: ?string): void; - export function nonNullable(opt: !string): void; -} diff --git a/src/test/converter/declaration/specs.json b/src/test/converter/declaration/specs.json index b1d56e341..64413574b 100644 --- a/src/test/converter/declaration/specs.json +++ b/src/test/converter/declaration/specs.json @@ -11,100 +11,6 @@ "kindString": "Module", "flags": {}, "children": [ - { - "id": 7, - "name": "GH1524", - "kind": 2, - "kindString": "Namespace", - "flags": {}, - "children": [ - { - "id": 11, - "name": "nonNullable", - "kind": 64, - "kindString": "Function", - "flags": {}, - "signatures": [ - { - "id": 12, - "name": "nonNullable", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 13, - "name": "opt", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "intrinsic", - "name": "void" - } - } - ] - }, - { - "id": 8, - "name": "nullable", - "kind": 64, - "kindString": "Function", - "flags": {}, - "signatures": [ - { - "id": 9, - "name": "nullable", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 10, - "name": "opt", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "literal", - "value": null - } - ] - } - } - ], - "type": { - "type": "intrinsic", - "name": "void" - } - } - ] - } - ], - "groups": [ - { - "title": "Functions", - "kind": 64, - "children": [ - 11, - 8 - ] - } - ] - }, { "id": 2, "name": "Decl", @@ -177,13 +83,6 @@ } ], "groups": [ - { - "title": "Namespaces", - "kind": 2, - "children": [ - 7 - ] - }, { "title": "Classes", "kind": 128, @@ -201,35 +100,35 @@ ] }, { - "id": 14, + "id": 7, "name": "export-declaration", "kind": 1, "kindString": "Module", "flags": {}, "children": [ { - "id": 15, + "id": 8, "name": "Exported", "kind": 128, "kindString": "Class", "flags": {}, "children": [ { - "id": 16, + "id": 9, "name": "constructor", "kind": 512, "kindString": "Constructor", "flags": {}, "signatures": [ { - "id": 17, + "id": 10, "name": "new Exported", "kind": 16384, "kindString": "Constructor signature", "flags": {}, "type": { "type": "reference", - "id": 15, + "id": 8, "name": "Exported" } } @@ -241,34 +140,34 @@ "title": "Constructors", "kind": 512, "children": [ - 16 + 9 ] } ] }, { - "id": 18, + "id": 11, "name": "NotExported", "kind": 128, "kindString": "Class", "flags": {}, "children": [ { - "id": 19, + "id": 12, "name": "constructor", "kind": 512, "kindString": "Constructor", "flags": {}, "signatures": [ { - "id": 20, + "id": 13, "name": "new NotExported", "kind": 16384, "kindString": "Constructor signature", "flags": {}, "type": { "type": "reference", - "id": 18, + "id": 11, "name": "NotExported" } } @@ -280,7 +179,7 @@ "title": "Constructors", "kind": 512, "children": [ - 19 + 12 ] } ] @@ -291,193 +190,8 @@ "title": "Classes", "kind": 128, "children": [ - 15, - 18 - ] - } - ] - }, - { - "id": 21, - "name": "global-fn", - "kind": 1, - "kindString": "Module", - "flags": {}, - "children": [ - { - "id": 22, - "name": "gh1436", - "kind": 64, - "kindString": "Function", - "flags": {}, - "signatures": [ - { - "id": 23, - "name": "gh1436", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "void" - } - } - ] - } - ], - "groups": [ - { - "title": "Functions", - "kind": 64, - "children": [ - 22 - ] - } - ] - }, - { - "id": 24, - "name": "namespaces", - "kind": 1, - "kindString": "Module", - "flags": {}, - "children": [ - { - "id": 29, - "name": "GH1124", - "kind": 2, - "kindString": "Namespace", - "flags": {}, - "children": [ - { - "id": 30, - "name": "PrimitiveType", - "kind": 4194304, - "kindString": "Type alias", - "flags": {}, - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "boolean" - }, - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "number" - }, - { - "type": "reference", - "name": "Date" - } - ] - } - }, - { - "id": 31, - "name": "Value", - "kind": 32, - "kindString": "Variable", - "flags": { - "isConst": true - }, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "groups": [ - { - "title": "Type aliases", - "kind": 4194304, - "children": [ - 30 - ] - }, - { - "title": "Variables", - "kind": 32, - "children": [ - 31 - ] - } - ] - }, - { - "id": 27, - "name": "GH1366", - "kind": 2, - "kindString": "Namespace", - "flags": {}, - "children": [ - { - "id": 28, - "name": "Foo", - "kind": 16777216, - "kindString": "Reference", - "flags": {}, - "target": 25 - } - ], - "groups": [ - { - "title": "References", - "kind": 16777216, - "children": [ - 28 - ] - } - ] - }, - { - "id": 25, - "name": "Foo", - "kind": 256, - "kindString": "Interface", - "flags": {}, - "children": [ - { - "id": 26, - "name": "prop", - "kind": 1024, - "kindString": "Property", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [ - 26 - ] - } - ] - } - ], - "groups": [ - { - "title": "Namespaces", - "kind": 2, - "children": [ - 29, - 27 - ] - }, - { - "title": "Interfaces", - "kind": 256, - "children": [ - 25 + 8, + 11 ] } ] @@ -489,9 +203,7 @@ "kind": 1, "children": [ 1, - 14, - 21, - 24 + 7 ] } ] diff --git a/src/test/converter/exports/export.ts b/src/test/converter/exports/export.ts index bb6cbb7fe..6b4d65124 100644 --- a/src/test/converter/exports/export.ts +++ b/src/test/converter/exports/export.ts @@ -30,14 +30,3 @@ export namespace GH1453 { export type Foo = import("./mod").GH1453Helper; } - -export namespace GH1462 { - const sideEffects = { - /** method docs */ - method() {}, - /** prop docs */ - prop: 1, - }; - - export const { method: METHOD, prop: PROP } = sideEffects; -} diff --git a/src/test/converter/exports/specs.json b/src/test/converter/exports/specs.json index 7eb1e1f32..6f396bd3a 100644 --- a/src/test/converter/exports/specs.json +++ b/src/test/converter/exports/specs.json @@ -12,23 +12,23 @@ "flags": {}, "children": [ { - "id": 50, + "id": 46, "name": "GH1453Helper", "kind": 16777216, "kindString": "Reference", "flags": {}, - "target": 41 + "target": 37 }, { - "id": 43, + "id": 39, "name": "Mod", "kind": 16777216, "kindString": "Reference", "flags": {}, - "target": 33 + "target": 29 }, { - "id": 45, + "id": 41, "name": "Mod2", "kind": 16777216, "kindString": "Reference", @@ -36,34 +36,34 @@ "comment": { "shortText": "This is a comment for Mod that overwrites the one specified in \"mod\"" }, - "target": 33 + "target": 29 }, { - "id": 44, + "id": 40, "name": "ModDefault", "kind": 16777216, "kindString": "Reference", "flags": {}, - "target": 34 + "target": 30 }, { - "id": 49, + "id": 45, "name": "ThisModule", "kind": 16777216, "kindString": "Reference", "flags": {}, - "target": 40 + "target": 36 }, { - "id": 46, + "id": 42, "name": "a", "kind": 16777216, "kindString": "Reference", "flags": {}, - "target": 36 + "target": 32 }, { - "id": 47, + "id": 43, "name": "b", "kind": 16777216, "kindString": "Reference", @@ -71,15 +71,15 @@ "comment": { "shortText": "An export of a local under a different name." }, - "target": 37 + "target": 33 }, { - "id": 42, + "id": 38, "name": "c", "kind": 16777216, "kindString": "Reference", "flags": {}, - "target": 36 + "target": 32 }, { "id": 23, @@ -96,7 +96,7 @@ "flags": {}, "type": { "type": "reference", - "id": 33, + "id": 29, "name": "GH1453Helper" } }, @@ -124,7 +124,7 @@ }, "type": { "type": "reference", - "id": 33, + "id": 29, "name": "__module" }, "defaultValue": "..." @@ -139,7 +139,7 @@ }, "type": { "type": "reference", - "id": 33, + "id": 29, "name": "a" }, "defaultValue": "..." @@ -154,7 +154,7 @@ }, "type": { "type": "reference", - "id": 33, + "id": 29, "name": "__module" }, "defaultValue": "..." @@ -180,65 +180,6 @@ } ] }, - { - "id": 29, - "name": "GH1462", - "kind": 2, - "kindString": "Namespace", - "flags": {}, - "children": [ - { - "id": 32, - "name": "PROP", - "kind": 32, - "kindString": "Variable", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 30, - "name": "METHOD", - "kind": 64, - "kindString": "Function", - "flags": {}, - "signatures": [ - { - "id": 31, - "name": "METHOD", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "comment": { - "shortText": "method docs" - }, - "type": { - "type": "intrinsic", - "name": "void" - } - } - ] - } - ], - "groups": [ - { - "title": "Variables", - "kind": 32, - "children": [ - 32 - ] - }, - { - "title": "Functions", - "kind": 64, - "children": [ - 30 - ] - } - ] - }, { "id": 18, "name": "add", @@ -322,22 +263,21 @@ "title": "References", "kind": 16777216, "children": [ - 50, - 43, - 45, - 44, - 49, 46, - 47, - 42 + 39, + 41, + 40, + 45, + 42, + 43, + 38 ] }, { "title": "Namespaces", "kind": 2, "children": [ - 23, - 29 + 23 ] }, { @@ -528,7 +468,7 @@ ] }, { - "id": 33, + "id": 29, "name": "mod", "kind": 1, "kindString": "Module", @@ -538,15 +478,15 @@ }, "children": [ { - "id": 40, + "id": 36, "name": "ThisModule", "kind": 16777216, "kindString": "Reference", "flags": {}, - "target": 33 + "target": 29 }, { - "id": 37, + "id": 33, "name": "b", "kind": 16777216, "kindString": "Reference", @@ -554,10 +494,10 @@ "comment": { "shortText": "An export of a local under a different name." }, - "target": 36 + "target": 32 }, { - "id": 38, + "id": 34, "name": "c", "kind": 16777216, "kindString": "Reference", @@ -565,10 +505,10 @@ "comment": { "shortText": "An export with a module specifier that comes from this file." }, - "target": 36 + "target": 32 }, { - "id": 41, + "id": 37, "name": "GH1453Helper", "kind": 4194304, "kindString": "Type alias", @@ -579,7 +519,7 @@ } }, { - "id": 36, + "id": 32, "name": "a", "kind": 32, "kindString": "Variable", @@ -596,14 +536,14 @@ "defaultValue": "1" }, { - "id": 34, + "id": 30, "name": "default", "kind": 64, "kindString": "Function", "flags": {}, "signatures": [ { - "id": 35, + "id": 31, "name": "default", "kind": 4096, "kindString": "Call signature", @@ -624,30 +564,30 @@ "title": "References", "kind": 16777216, "children": [ - 40, - 37, - 38 + 36, + 33, + 34 ] }, { "title": "Type aliases", "kind": 4194304, "children": [ - 41 + 37 ] }, { "title": "Variables", "kind": 32, "children": [ - 36 + 32 ] }, { "title": "Functions", "kind": 64, "children": [ - 34 + 30 ] } ] @@ -662,7 +602,7 @@ 1, 6, 8, - 33 + 29 ] } ] diff --git a/src/test/converter/function/function.ts b/src/test/converter/function/function.ts index 212d1f069..8ee508e85 100644 --- a/src/test/converter/function/function.ts +++ b/src/test/converter/function/function.ts @@ -207,5 +207,3 @@ export function boolOrUndef(x: number) { export function merged() {} merged.nsFn = function () {}; - -export function gh1534(rt: readonly [number, string]) {} diff --git a/src/test/converter/function/specs.json b/src/test/converter/function/specs.json index c95b480fe..62543c024 100644 --- a/src/test/converter/function/specs.json +++ b/src/test/converter/function/specs.json @@ -141,42 +141,42 @@ ] }, { - "id": 67, + "id": 64, "name": "Predicates", "kind": 128, "kindString": "Class", "flags": {}, "children": [ { - "id": 74, + "id": 71, "name": "constructor", "kind": 512, "kindString": "Constructor", "flags": {}, "signatures": [ { - "id": 75, + "id": 72, "name": "new Predicates", "kind": 16384, "kindString": "Constructor signature", "flags": {}, "type": { "type": "reference", - "id": 67, + "id": 64, "name": "Predicates" } } ] }, { - "id": 78, + "id": 75, "name": "assertString", "kind": 2048, "kindString": "Method", "flags": {}, "signatures": [ { - "id": 79, + "id": 76, "name": "assertString", "kind": 4096, "kindString": "Call signature", @@ -194,14 +194,14 @@ ] }, { - "id": 76, + "id": 73, "name": "isString", "kind": 2048, "kindString": "Method", "flags": {}, "signatures": [ { - "id": 77, + "id": 74, "name": "isString", "kind": 4096, "kindString": "Call signature", @@ -219,7 +219,7 @@ ] }, { - "id": 71, + "id": 68, "name": "assert", "kind": 2048, "kindString": "Method", @@ -228,14 +228,14 @@ }, "signatures": [ { - "id": 72, + "id": 69, "name": "assert", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 73, + "id": 70, "name": "x", "kind": 32768, "kindString": "Parameter", @@ -255,7 +255,7 @@ ] }, { - "id": 68, + "id": 65, "name": "isString", "kind": 2048, "kindString": "Method", @@ -264,14 +264,14 @@ }, "signatures": [ { - "id": 69, + "id": 66, "name": "isString", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 70, + "id": 67, "name": "x", "kind": 32768, "kindString": "Parameter", @@ -300,23 +300,23 @@ "title": "Constructors", "kind": 512, "children": [ - 74 + 71 ] }, { "title": "Methods", "kind": 2048, "children": [ - 78, - 76, - 71, - 68 + 75, + 73, + 68, + 65 ] } ] }, { - "id": 80, + "id": 77, "name": "all", "kind": 64, "kindString": "Function", @@ -325,7 +325,7 @@ }, "signatures": [ { - "id": 81, + "id": 78, "name": "all", "kind": 4096, "kindString": "Call signature", @@ -336,7 +336,7 @@ }, "typeParameter": [ { - "id": 82, + "id": 79, "name": "T", "kind": 131072, "kindString": "Type parameter", @@ -345,7 +345,7 @@ ], "parameters": [ { - "id": 83, + "id": 80, "name": "fn", "kind": 32768, "kindString": "Parameter", @@ -353,21 +353,21 @@ "type": { "type": "reflection", "declaration": { - "id": 84, + "id": 81, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 85, + "id": 82, "name": "__type", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 86, + "id": 83, "name": "item", "kind": 32768, "kindString": "Parameter", @@ -388,7 +388,7 @@ } }, { - "id": 87, + "id": 84, "name": "iterator", "kind": 32768, "kindString": "Parameter", @@ -411,7 +411,7 @@ } }, { - "id": 88, + "id": 85, "name": "all", "kind": 4096, "kindString": "Call signature", @@ -422,7 +422,7 @@ }, "typeParameter": [ { - "id": 89, + "id": 86, "name": "T", "kind": 131072, "kindString": "Type parameter", @@ -431,7 +431,7 @@ ], "parameters": [ { - "id": 90, + "id": 87, "name": "fn", "kind": 32768, "kindString": "Parameter", @@ -439,21 +439,21 @@ "type": { "type": "reflection", "declaration": { - "id": 91, + "id": 88, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 92, + "id": 89, "name": "__type", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 93, + "id": 90, "name": "item", "kind": 32768, "kindString": "Parameter", @@ -477,21 +477,21 @@ "type": { "type": "reflection", "declaration": { - "id": 94, + "id": 91, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 95, + "id": 92, "name": "__type", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 96, + "id": 93, "name": "iterator", "kind": 32768, "kindString": "Parameter", @@ -1003,52 +1003,6 @@ } ] }, - { - "id": 61, - "name": "gh1534", - "kind": 64, - "kindString": "Function", - "flags": {}, - "signatures": [ - { - "id": 62, - "name": "gh1534", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 63, - "name": "rt", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "typeOperator", - "operator": "readonly", - "target": { - "type": "tuple", - "elements": [ - { - "type": "intrinsic", - "name": "number" - }, - { - "type": "intrinsic", - "name": "string" - } - ] - } - } - } - ], - "type": { - "type": "intrinsic", - "name": "void" - } - } - ] - }, { "id": 49, "name": "isNonNull", @@ -1275,7 +1229,7 @@ ] }, { - "id": 64, + "id": 61, "name": "variableFunction", "kind": 64, "kindString": "Function", @@ -1284,7 +1238,7 @@ }, "signatures": [ { - "id": 65, + "id": 62, "name": "variableFunction", "kind": 4096, "kindString": "Call signature", @@ -1295,7 +1249,7 @@ }, "parameters": [ { - "id": 66, + "id": 63, "name": "someParam", "kind": 32768, "kindString": "Parameter", @@ -1330,14 +1284,14 @@ "title": "Classes", "kind": 128, "children": [ - 67 + 64 ] }, { "title": "Functions", "kind": 64, "children": [ - 80, + 77, 45, 39, 53, @@ -1347,32 +1301,31 @@ 9, 4, 20, - 61, 49, 56, 30, 23, - 64 + 61 ] } ] }, { - "id": 97, + "id": 94, "name": "generic-function", "kind": 1, "kindString": "Module", "flags": {}, "children": [ { - "id": 102, + "id": 99, "name": "functionWithGenericArrayParameter", "kind": 64, "kindString": "Function", "flags": {}, "signatures": [ { - "id": 103, + "id": 100, "name": "functionWithGenericArrayParameter", "kind": 4096, "kindString": "Call signature", @@ -1383,7 +1336,7 @@ }, "typeParameter": [ { - "id": 104, + "id": 101, "name": "T", "kind": 131072, "kindString": "Type parameter", @@ -1392,7 +1345,7 @@ ], "parameters": [ { - "id": 105, + "id": 102, "name": "param", "kind": 32768, "kindString": "Parameter", @@ -1406,7 +1359,7 @@ } }, { - "id": 106, + "id": 103, "name": "params", "kind": 32768, "kindString": "Parameter", @@ -1434,14 +1387,14 @@ ] }, { - "id": 107, + "id": 104, "name": "functionWithTemplate", "kind": 64, "kindString": "Function", "flags": {}, "signatures": [ { - "id": 108, + "id": 105, "name": "functionWithTemplate", "kind": 4096, "kindString": "Call signature", @@ -1449,7 +1402,7 @@ "comment": {}, "typeParameter": [ { - "id": 109, + "id": 106, "name": "T", "kind": 131072, "kindString": "Type parameter", @@ -1461,7 +1414,7 @@ ], "parameters": [ { - "id": 110, + "id": 107, "name": "param", "kind": 32768, "kindString": "Parameter", @@ -1483,14 +1436,14 @@ ] }, { - "id": 98, + "id": 95, "name": "genericFunction", "kind": 64, "kindString": "Function", "flags": {}, "signatures": [ { - "id": 99, + "id": 96, "name": "genericFunction", "kind": 4096, "kindString": "Call signature", @@ -1501,7 +1454,7 @@ }, "typeParameter": [ { - "id": 100, + "id": 97, "name": "T", "kind": 131072, "kindString": "Type parameter", @@ -1517,7 +1470,7 @@ ], "parameters": [ { - "id": 101, + "id": 98, "name": "value", "kind": 32768, "kindString": "Parameter", @@ -1544,29 +1497,29 @@ "title": "Functions", "kind": 64, "children": [ - 102, - 107, - 98 + 99, + 104, + 95 ] } ] }, { - "id": 111, + "id": 108, "name": "implicit-types", "kind": 1, "kindString": "Module", "flags": {}, "children": [ { - "id": 120, + "id": 117, "name": "BreakpointRange", "kind": 256, "kindString": "Interface", "flags": {}, "children": [ { - "id": 122, + "id": 119, "name": "end", "kind": 1024, "kindString": "Property", @@ -1577,7 +1530,7 @@ } }, { - "id": 121, + "id": 118, "name": "start", "kind": 1024, "kindString": "Property", @@ -1593,21 +1546,21 @@ "title": "Properties", "kind": 1024, "children": [ - 122, - 121 + 119, + 118 ] } ] }, { - "id": 112, + "id": 109, "name": "getBreakpoints", "kind": 64, "kindString": "Function", "flags": {}, "signatures": [ { - "id": 113, + "id": 110, "name": "getBreakpoints", "kind": 4096, "kindString": "Call signature", @@ -1615,69 +1568,69 @@ "type": { "type": "reflection", "declaration": { - "id": 114, + "id": 111, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "children": [ { - "id": 117, + "id": 114, "name": "large", "kind": 1024, "kindString": "Property", "flags": {}, "type": { "type": "reference", - "id": 120, + "id": 117, "name": "BreakpointRange" } }, { - "id": 116, + "id": 113, "name": "medium", "kind": 1024, "kindString": "Property", "flags": {}, "type": { "type": "reference", - "id": 120, + "id": 117, "name": "BreakpointRange" } }, { - "id": 115, + "id": 112, "name": "small", "kind": 1024, "kindString": "Property", "flags": {}, "type": { "type": "reference", - "id": 120, + "id": 117, "name": "BreakpointRange" } }, { - "id": 118, + "id": 115, "name": "xlarge", "kind": 1024, "kindString": "Property", "flags": {}, "type": { "type": "reference", - "id": 120, + "id": 117, "name": "BreakpointRange" } }, { - "id": 119, + "id": 116, "name": "xxlarge", "kind": 1024, "kindString": "Property", "flags": {}, "type": { "type": "reference", - "id": 120, + "id": 117, "name": "BreakpointRange" } } @@ -1687,11 +1640,11 @@ "title": "Properties", "kind": 1024, "children": [ - 117, - 116, + 114, + 113, + 112, 115, - 118, - 119 + 116 ] } ] @@ -1706,14 +1659,14 @@ "title": "Interfaces", "kind": 256, "children": [ - 120 + 117 ] }, { "title": "Functions", "kind": 64, "children": [ - 112 + 109 ] } ] @@ -1725,8 +1678,8 @@ "kind": 1, "children": [ 1, - 97, - 111 + 94, + 108 ] } ] diff --git a/src/test/converter/js/index.js b/src/test/converter/js/index.js index bdafaac81..3f03f11bf 100644 --- a/src/test/converter/js/index.js +++ b/src/test/converter/js/index.js @@ -59,7 +59,3 @@ export const ColumnType = { STRING: "string", NUMBER: "number", }; - -export class GH1481 {} -/** static docs */ -GH1481.static = function () {}; diff --git a/src/test/converter/js/specs.json b/src/test/converter/js/specs.json index 06e93eb21..c7b757d8e 100644 --- a/src/test/converter/js/specs.json +++ b/src/test/converter/js/specs.json @@ -6,237 +6,6 @@ "children": [ { "id": 1, - "name": "declaration-merging", - "kind": 1, - "kindString": "Module", - "flags": {}, - "children": [ - { - "id": 9, - "name": "gh1483", - "kind": 2, - "kindString": "Namespace", - "flags": {}, - "children": [ - { - "id": 10, - "name": "namespaceExport", - "kind": 64, - "kindString": "Function", - "flags": {}, - "signatures": [ - { - "id": 11, - "name": "namespaceExport", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "void" - } - } - ] - } - ], - "groups": [ - { - "title": "Functions", - "kind": 64, - "children": [ - 10 - ] - } - ] - }, - { - "id": 2, - "name": "GH1481", - "kind": 128, - "kindString": "Class", - "flags": {}, - "children": [ - { - "id": 5, - "name": "constructor", - "kind": 512, - "kindString": "Constructor", - "flags": {}, - "signatures": [ - { - "id": 6, - "name": "new GH1481", - "kind": 16384, - "kindString": "Constructor signature", - "flags": {}, - "type": { - "type": "reference", - "id": 2, - "name": "GH1481" - } - } - ] - }, - { - "id": 3, - "name": "static", - "kind": 2048, - "kindString": "Method", - "flags": { - "isStatic": true - }, - "signatures": [ - { - "id": 4, - "name": "static", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "comment": { - "shortText": "static docs" - }, - "type": { - "type": "intrinsic", - "name": "void" - } - } - ] - } - ], - "groups": [ - { - "title": "Constructors", - "kind": 512, - "children": [ - 5 - ] - }, - { - "title": "Methods", - "kind": 2048, - "children": [ - 3 - ] - } - ] - }, - { - "id": 12, - "name": "gh1483_2", - "kind": 128, - "kindString": "Class", - "flags": {}, - "children": [ - { - "id": 15, - "name": "constructor", - "kind": 512, - "kindString": "Constructor", - "flags": {}, - "signatures": [ - { - "id": 16, - "name": "new gh1483_2", - "kind": 16384, - "kindString": "Constructor signature", - "flags": {}, - "comment": {}, - "type": { - "type": "reference", - "id": 12, - "name": "gh1483_2" - } - } - ] - }, - { - "id": 13, - "name": "staticMethod", - "kind": 2048, - "kindString": "Method", - "flags": { - "isStatic": true - }, - "signatures": [ - { - "id": 14, - "name": "staticMethod", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "void" - } - } - ] - } - ], - "groups": [ - { - "title": "Constructors", - "kind": 512, - "children": [ - 15 - ] - }, - { - "title": "Methods", - "kind": 2048, - "children": [ - 13 - ] - } - ] - }, - { - "id": 7, - "name": "gh1483", - "kind": 64, - "kindString": "Function", - "flags": {}, - "signatures": [ - { - "id": 8, - "name": "gh1483", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "void" - } - } - ] - } - ], - "groups": [ - { - "title": "Namespaces", - "kind": 2, - "children": [ - 9 - ] - }, - { - "title": "Classes", - "kind": 128, - "children": [ - 2, - 12 - ] - }, - { - "title": "Functions", - "kind": 64, - "children": [ - 7 - ] - } - ] - }, - { - "id": 17, "name": "export-eq-type", "kind": 1, "kindString": "Module", @@ -244,7 +13,7 @@ "comment": {}, "children": [ { - "id": 21, + "id": 5, "name": "Foo", "kind": 4194304, "kindString": "Type alias", @@ -255,7 +24,7 @@ } }, { - "id": 18, + "id": 2, "name": "export=", "kind": 64, "kindString": "Function", @@ -264,7 +33,7 @@ }, "signatures": [ { - "id": 19, + "id": 3, "name": "export=", "kind": 4096, "kindString": "Call signature", @@ -272,7 +41,7 @@ "comment": {}, "parameters": [ { - "id": 20, + "id": 4, "name": "x", "kind": 32768, "kindString": "Parameter", @@ -297,20 +66,20 @@ "title": "Type aliases", "kind": 4194304, "children": [ - 21 + 5 ] }, { "title": "Functions", "kind": 64, "children": [ - 18 + 2 ] } ] }, { - "id": 22, + "id": 6, "name": "index", "kind": 1, "kindString": "Module", @@ -318,78 +87,7 @@ "comment": {}, "children": [ { - "id": 31, - "name": "GH1481", - "kind": 128, - "kindString": "Class", - "flags": {}, - "children": [ - { - "id": 34, - "name": "constructor", - "kind": 512, - "kindString": "Constructor", - "flags": {}, - "signatures": [ - { - "id": 35, - "name": "new GH1481", - "kind": 16384, - "kindString": "Constructor signature", - "flags": {}, - "type": { - "type": "reference", - "id": 31, - "name": "GH1481" - } - } - ] - }, - { - "id": 32, - "name": "static", - "kind": 2048, - "kindString": "Method", - "flags": { - "isStatic": true - }, - "signatures": [ - { - "id": 33, - "name": "static", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "comment": { - "shortText": "static docs" - }, - "type": { - "type": "intrinsic", - "name": "void" - } - } - ] - } - ], - "groups": [ - { - "title": "Constructors", - "kind": 512, - "children": [ - 34 - ] - }, - { - "title": "Methods", - "kind": 2048, - "children": [ - 32 - ] - } - ] - }, - { - "id": 38, + "id": 17, "name": "AlsoInterfaceIsh", "kind": 256, "kindString": "Interface", @@ -399,7 +97,7 @@ }, "children": [ { - "id": 40, + "id": 19, "name": "bar", "kind": 1024, "kindString": "Property", @@ -413,7 +111,7 @@ } }, { - "id": 39, + "id": 18, "name": "foo", "kind": 1024, "kindString": "Property", @@ -432,21 +130,21 @@ "title": "Properties", "kind": 1024, "children": [ - 40, - 39 + 19, + 18 ] } ] }, { - "id": 36, + "id": 15, "name": "InterfaceIsh", "kind": 256, "kindString": "Interface", "flags": {}, "children": [ { - "id": 37, + "id": 16, "name": "foo", "kind": 1024, "kindString": "Property", @@ -465,13 +163,13 @@ "title": "Properties", "kind": 1024, "children": [ - 37 + 16 ] } ] }, { - "id": 30, + "id": 14, "name": "ColumnType", "kind": 4194304, "kindString": "Type alias", @@ -482,7 +180,7 @@ } }, { - "id": 65, + "id": 44, "name": "Foo", "kind": 4194304, "kindString": "Type alias", @@ -490,21 +188,21 @@ "type": { "type": "reflection", "declaration": { - "id": 66, + "id": 45, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 67, + "id": 46, "name": "__type", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 68, + "id": 47, "name": "args", "kind": 32768, "kindString": "Parameter", @@ -530,7 +228,7 @@ } }, { - "id": 51, + "id": 30, "name": "HasReturnTag", "kind": 4194304, "kindString": "Type alias", @@ -538,14 +236,14 @@ "type": { "type": "reflection", "declaration": { - "id": 52, + "id": 31, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 53, + "id": 32, "name": "__type", "kind": 4096, "kindString": "Call signature", @@ -560,7 +258,7 @@ } }, { - "id": 63, + "id": 42, "name": "Identity", "kind": 4194304, "kindString": "Type alias", @@ -570,7 +268,7 @@ }, "typeParameter": [ { - "id": 64, + "id": 43, "name": "T", "kind": 131072, "kindString": "Type parameter", @@ -586,14 +284,14 @@ } }, { - "id": 54, + "id": 33, "name": "IdentityFn", "kind": 4194304, "kindString": "Type alias", "flags": {}, "typeParameter": [ { - "id": 58, + "id": 37, "name": "T", "kind": 131072, "kindString": "Type parameter", @@ -603,21 +301,21 @@ "type": { "type": "reflection", "declaration": { - "id": 55, + "id": 34, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 56, + "id": 35, "name": "__type", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 57, + "id": 36, "name": "data", "kind": 32768, "kindString": "Parameter", @@ -638,7 +336,7 @@ } }, { - "id": 43, + "id": 22, "name": "IntersectionType", "kind": 4194304, "kindString": "Type alias", @@ -652,14 +350,14 @@ { "type": "reflection", "declaration": { - "id": 44, + "id": 23, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "children": [ { - "id": 45, + "id": 24, "name": "x", "kind": 1024, "kindString": "Property", @@ -675,7 +373,7 @@ "title": "Properties", "kind": 1024, "children": [ - 45 + 24 ] } ] @@ -684,14 +382,14 @@ { "type": "reflection", "declaration": { - "id": 46, + "id": 25, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "children": [ { - "id": 47, + "id": 26, "name": "y", "kind": 1024, "kindString": "Property", @@ -707,7 +405,7 @@ "title": "Properties", "kind": 1024, "children": [ - 47 + 26 ] } ] @@ -717,7 +415,7 @@ } }, { - "id": 48, + "id": 27, "name": "NoReturnTag", "kind": 4194304, "kindString": "Type alias", @@ -725,14 +423,14 @@ "type": { "type": "reflection", "declaration": { - "id": 49, + "id": 28, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 50, + "id": 29, "name": "__type", "kind": 4096, "kindString": "Call signature", @@ -747,7 +445,7 @@ } }, { - "id": 41, + "id": 20, "name": "ObjectAlias", "kind": 4194304, "kindString": "Type alias", @@ -761,7 +459,7 @@ } }, { - "id": 59, + "id": 38, "name": "OptionalArg", "kind": 4194304, "kindString": "Type alias", @@ -769,21 +467,21 @@ "type": { "type": "reflection", "declaration": { - "id": 60, + "id": 39, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "signatures": [ { - "id": 61, + "id": 40, "name": "__type", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 62, + "id": 41, "name": "data", "kind": 32768, "kindString": "Parameter", @@ -806,7 +504,7 @@ } }, { - "id": 42, + "id": 21, "name": "UnionType", "kind": 4194304, "kindString": "Type alias", @@ -829,7 +527,7 @@ } }, { - "id": 26, + "id": 10, "name": "ColumnType", "kind": 32, "kindString": "Variable", @@ -840,14 +538,14 @@ "type": { "type": "reflection", "declaration": { - "id": 27, + "id": 11, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "children": [ { - "id": 29, + "id": 13, "name": "NUMBER", "kind": 1024, "kindString": "Property", @@ -859,7 +557,7 @@ "defaultValue": "\"number\"" }, { - "id": 28, + "id": 12, "name": "STRING", "kind": 1024, "kindString": "Property", @@ -876,8 +574,8 @@ "title": "Properties", "kind": 1024, "children": [ - 29, - 28 + 13, + 12 ] } ] @@ -886,7 +584,7 @@ "defaultValue": "..." }, { - "id": 23, + "id": 7, "name": "usedFoo", "kind": 64, "kindString": "Function", @@ -895,7 +593,7 @@ }, "signatures": [ { - "id": 24, + "id": 8, "name": "usedFoo", "kind": 4096, "kindString": "Call signature", @@ -903,7 +601,7 @@ "comment": {}, "parameters": [ { - "id": 25, + "id": 9, "name": "args", "kind": 32768, "kindString": "Parameter", @@ -934,49 +632,42 @@ } ], "groups": [ - { - "title": "Classes", - "kind": 128, - "children": [ - 31 - ] - }, { "title": "Interfaces", "kind": 256, "children": [ - 38, - 36 + 17, + 15 ] }, { "title": "Type aliases", "kind": 4194304, "children": [ + 14, + 44, 30, - 65, - 51, - 63, - 54, - 43, - 48, - 41, - 59, - 42 + 42, + 33, + 22, + 27, + 20, + 38, + 21 ] }, { "title": "Variables", "kind": 32, "children": [ - 26 + 10 ] }, { "title": "Functions", "kind": 64, "children": [ - 23 + 7 ] } ] @@ -988,8 +679,7 @@ "kind": 1, "children": [ 1, - 17, - 22 + 6 ] } ] diff --git a/src/test/converter/types/specs.json b/src/test/converter/types/specs.json index c6b627228..1926662a2 100644 --- a/src/test/converter/types/specs.json +++ b/src/test/converter/types/specs.json @@ -569,7 +569,7 @@ "flags": {}, "children": [ { - "id": 44, + "id": 40, "name": "LeadingRest", "kind": 4194304, "kindString": "Type alias", @@ -595,7 +595,7 @@ } }, { - "id": 36, + "id": 32, "name": "NamedTuple", "kind": 4194304, "kindString": "Type alias", @@ -625,7 +625,7 @@ } }, { - "id": 42, + "id": 38, "name": "WithOptionalElements", "kind": 4194304, "kindString": "Type alias", @@ -655,7 +655,7 @@ } }, { - "id": 38, + "id": 34, "name": "WithRestType", "kind": 4194304, "kindString": "Type alias", @@ -681,7 +681,7 @@ } }, { - "id": 40, + "id": 36, "name": "WithRestTypeNames", "kind": 4194304, "kindString": "Type alias", @@ -714,7 +714,7 @@ } }, { - "id": 45, + "id": 41, "name": "leadingRest", "kind": 32, "kindString": "Variable", @@ -743,7 +743,7 @@ "defaultValue": "..." }, { - "id": 37, + "id": 33, "name": "namedTuple", "kind": 32, "kindString": "Variable", @@ -776,7 +776,7 @@ "defaultValue": "..." }, { - "id": 43, + "id": 39, "name": "withOptionalElements", "kind": 32, "kindString": "Variable", @@ -809,7 +809,7 @@ "defaultValue": "..." }, { - "id": 39, + "id": 35, "name": "withRestType", "kind": 32, "kindString": "Variable", @@ -838,7 +838,7 @@ "defaultValue": "..." }, { - "id": 41, + "id": 37, "name": "withRestTypeNames", "kind": 32, "kindString": "Variable", @@ -875,71 +875,6 @@ ] }, "defaultValue": "..." - }, - { - "id": 32, - "name": "gh1449", - "kind": 64, - "kindString": "Function", - "flags": {}, - "signatures": [ - { - "id": 33, - "name": "gh1449", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "typeParameter": [ - { - "id": 34, - "name": "T", - "kind": 131072, - "kindString": "Type parameter", - "flags": {}, - "type": { - "type": "tuple", - "elements": [ - { - "type": "named-tuple-member", - "name": "foo", - "isOptional": false, - "element": { - "type": "intrinsic", - "name": "any" - } - }, - { - "type": "named-tuple-member", - "name": "bar", - "isOptional": true, - "element": { - "type": "intrinsic", - "name": "any" - } - } - ] - } - } - ], - "parameters": [ - { - "id": 35, - "name": "a", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "reference", - "name": "T" - } - } - ], - "type": { - "type": "reference", - "name": "T" - } - } - ] } ], "groups": [ @@ -947,42 +882,35 @@ "title": "Type aliases", "kind": 4194304, "children": [ - 44, - 36, - 42, + 40, + 32, 38, - 40 + 34, + 36 ] }, { "title": "Variables", "kind": 32, "children": [ - 45, - 37, - 43, + 41, + 33, 39, - 41 - ] - }, - { - "title": "Functions", - "kind": 64, - "children": [ - 32 + 35, + 37 ] } ] }, { - "id": 46, + "id": 42, "name": "type-operator", "kind": 1, "kindString": "Module", "flags": {}, "children": [ { - "id": 48, + "id": 44, "name": "B", "kind": 4194304, "kindString": "Type alias", @@ -1000,7 +928,7 @@ } }, { - "id": 49, + "id": 45, "name": "C", "kind": 4194304, "kindString": "Type alias", @@ -1008,14 +936,14 @@ "type": { "type": "reflection", "declaration": { - "id": 50, + "id": 46, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, "children": [ { - "id": 51, + "id": 47, "name": "prop1", "kind": 1024, "kindString": "Property", @@ -1026,7 +954,7 @@ } }, { - "id": 52, + "id": 48, "name": "prop2", "kind": 1024, "kindString": "Property", @@ -1042,8 +970,8 @@ "title": "Properties", "kind": 1024, "children": [ - 51, - 52 + 47, + 48 ] } ] @@ -1051,7 +979,7 @@ } }, { - "id": 53, + "id": 49, "name": "D", "kind": 4194304, "kindString": "Type alias", @@ -1061,13 +989,13 @@ "operator": "keyof", "target": { "type": "reference", - "id": 49, + "id": 45, "name": "C" } } }, { - "id": 47, + "id": 43, "name": "a", "kind": 32, "kindString": "Variable", @@ -1090,29 +1018,29 @@ "title": "Type aliases", "kind": 4194304, "children": [ - 48, - 49, - 53 + 44, + 45, + 49 ] }, { "title": "Variables", "kind": 32, "children": [ - 47 + 43 ] } ] }, { - "id": 54, + "id": 50, "name": "union-or-intersection", "kind": 1, "kindString": "Module", "flags": {}, "children": [ { - "id": 55, + "id": 51, "name": "FirstType", "kind": 256, "kindString": "Interface", @@ -1122,7 +1050,7 @@ }, "children": [ { - "id": 56, + "id": 52, "name": "firstProperty", "kind": 1024, "kindString": "Property", @@ -1141,13 +1069,13 @@ "title": "Properties", "kind": 1024, "children": [ - 56 + 52 ] } ] }, { - "id": 57, + "id": 53, "name": "SecondType", "kind": 256, "kindString": "Interface", @@ -1157,7 +1085,7 @@ }, "children": [ { - "id": 58, + "id": 54, "name": "secondProperty", "kind": 1024, "kindString": "Property", @@ -1176,13 +1104,13 @@ "title": "Properties", "kind": 1024, "children": [ - 58 + 54 ] } ] }, { - "id": 59, + "id": 55, "name": "ThirdType", "kind": 256, "kindString": "Interface", @@ -1192,7 +1120,7 @@ }, "children": [ { - "id": 62, + "id": 58, "name": "thirdComplexProperty", "kind": 1024, "kindString": "Property", @@ -1216,12 +1144,12 @@ "types": [ { "type": "reference", - "id": 55, + "id": 51, "name": "FirstType" }, { "type": "reference", - "id": 57, + "id": 53, "name": "SecondType" } ] @@ -1232,7 +1160,7 @@ } }, { - "id": 61, + "id": 57, "name": "thirdIntersectionProperty", "kind": 1024, "kindString": "Property", @@ -1245,19 +1173,19 @@ "types": [ { "type": "reference", - "id": 55, + "id": 51, "name": "FirstType" }, { "type": "reference", - "id": 59, + "id": 55, "name": "ThirdType" } ] } }, { - "id": 60, + "id": 56, "name": "thirdUnionProperty", "kind": 1024, "kindString": "Property", @@ -1270,12 +1198,12 @@ "types": [ { "type": "reference", - "id": 55, + "id": 51, "name": "FirstType" }, { "type": "reference", - "id": 57, + "id": 53, "name": "SecondType" } ] @@ -1287,9 +1215,9 @@ "title": "Properties", "kind": 1024, "children": [ - 62, - 61, - 60 + 58, + 57, + 56 ] } ] @@ -1300,9 +1228,9 @@ "title": "Interfaces", "kind": 256, "children": [ - 55, - 57, - 59 + 51, + 53, + 55 ] } ] @@ -1318,8 +1246,8 @@ 24, 28, 31, - 46, - 54 + 42, + 50 ] } ] diff --git a/src/test/converter/types/tuple.ts b/src/test/converter/types/tuple.ts index 96fd3219d..dcfc704f7 100644 --- a/src/test/converter/types/tuple.ts +++ b/src/test/converter/types/tuple.ts @@ -2,10 +2,6 @@ export type NamedTuple = [name: string, optionalName?: number]; export const namedTuple = returnMapped(); -export function gh1449(a: T): T { - return a; -} - export type WithRestType = [1, ...2[]]; export const withRestType = returnMapped(); diff --git a/src/test/converter/variables/literal.ts b/src/test/converter/variables/literal.ts index 1fced9691..54eb2c4ef 100644 --- a/src/test/converter/variables/literal.ts +++ b/src/test/converter/variables/literal.ts @@ -56,10 +56,3 @@ export const callbackReturn = { }; export { objectLiteral }; - -export const gh1475 = { - get getIt(): number { - return 1; - }, - set setIt(n: number) {}, -}; diff --git a/src/test/converter/variables/specs.json b/src/test/converter/variables/specs.json index 8ef615804..c0306a8e5 100644 --- a/src/test/converter/variables/specs.json +++ b/src/test/converter/variables/specs.json @@ -743,91 +743,6 @@ }, "defaultValue": "..." }, - { - "id": 92, - "name": "gh1475", - "kind": 32, - "kindString": "Variable", - "flags": { - "isConst": true - }, - "type": { - "type": "reflection", - "declaration": { - "id": 93, - "name": "__type", - "kind": 65536, - "kindString": "Type literal", - "flags": {}, - "children": [ - { - "id": 94, - "name": "getIt", - "kind": 262144, - "kindString": "Accessor", - "flags": {}, - "getSignature": [ - { - "id": 95, - "name": "getIt", - "kind": 524288, - "kindString": "Get signature", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - } - } - ] - }, - { - "id": 96, - "name": "setIt", - "kind": 262144, - "kindString": "Accessor", - "flags": {}, - "setSignature": [ - { - "id": 97, - "name": "setIt", - "kind": 1048576, - "kindString": "Set signature", - "flags": {}, - "parameters": [ - { - "id": 98, - "name": "n", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "type": { - "type": "intrinsic", - "name": "void" - } - } - ] - } - ], - "groups": [ - { - "title": "Accessors", - "kind": 262144, - "children": [ - 94, - 96 - ] - } - ] - } - }, - "defaultValue": "..." - }, { "id": 70, "name": "objectLiteral", @@ -1365,7 +1280,6 @@ "kind": 32, "children": [ 50, - 92, 70, 31 ] @@ -1373,86 +1287,14 @@ ] }, { - "id": 99, - "name": "symbols", - "kind": 1, - "kindString": "Module", - "flags": {}, - "children": [ - { - "id": 101, - "name": "ComputedUniqueName", - "kind": 256, - "kindString": "Interface", - "flags": {}, - "children": [ - { - "id": 102, - "name": "[UNIQUE_SYMBOL]", - "kind": 1024, - "kindString": "Property", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [ - 102 - ] - } - ] - }, - { - "id": 100, - "name": "UNIQUE_SYMBOL", - "kind": 32, - "kindString": "Variable", - "flags": { - "isConst": true - }, - "type": { - "type": "query", - "queryType": { - "type": "reference", - "id": 100, - "name": "UNIQUE_SYMBOL" - } - }, - "defaultValue": "..." - } - ], - "groups": [ - { - "title": "Interfaces", - "kind": 256, - "children": [ - 101 - ] - }, - { - "title": "Variables", - "kind": 32, - "children": [ - 100 - ] - } - ] - }, - { - "id": 103, + "id": 92, "name": "variable", "kind": 1, "kindString": "Module", "flags": {}, "children": [ { - "id": 104, + "id": 93, "name": "myConst", "kind": 32, "kindString": "Variable", @@ -1466,7 +1308,7 @@ "defaultValue": "15" }, { - "id": 105, + "id": 94, "name": "myLet", "kind": 32, "kindString": "Variable", @@ -1480,7 +1322,7 @@ "defaultValue": "15" }, { - "id": 106, + "id": 95, "name": "myVar", "kind": 32, "kindString": "Variable", @@ -1492,7 +1334,7 @@ "defaultValue": "15" }, { - "id": 107, + "id": 96, "name": "x", "kind": 32, "kindString": "Variable", @@ -1505,7 +1347,7 @@ } }, { - "id": 108, + "id": 97, "name": "y", "kind": 32, "kindString": "Variable", @@ -1524,7 +1366,7 @@ } }, { - "id": 109, + "id": 98, "name": "z", "kind": 32, "kindString": "Variable", @@ -1548,12 +1390,12 @@ "title": "Variables", "kind": 32, "children": [ - 104, - 105, - 106, - 107, - 108, - 109 + 93, + 94, + 95, + 96, + 97, + 98 ] } ] @@ -1567,8 +1409,7 @@ 1, 15, 30, - 99, - 103 + 92 ] } ] diff --git a/src/test/converter/variables/specs.nodoc.json b/src/test/converter/variables/specs.nodoc.json index 0a3809261..90695da35 100644 --- a/src/test/converter/variables/specs.nodoc.json +++ b/src/test/converter/variables/specs.nodoc.json @@ -414,13 +414,6 @@ }, { "id": 24, - "name": "symbols", - "kind": 1, - "kindString": "Module", - "flags": {} - }, - { - "id": 25, "name": "variable", "kind": 1, "kindString": "Module", @@ -435,8 +428,7 @@ 1, 15, 19, - 24, - 25 + 24 ] } ] diff --git a/src/test/converter2.test.ts b/src/test/converter2.test.ts new file mode 100644 index 000000000..894ad12a4 --- /dev/null +++ b/src/test/converter2.test.ts @@ -0,0 +1,226 @@ +import { join } from "path"; +import { existsSync } from "fs"; +import { Application, TSConfigReader } from ".."; +import * as ts from "typescript"; +import { deepStrictEqual as equal, ok } from "assert"; +import { + DeclarationReflection, + ProjectReflection, + ReflectionKind, +} from "../lib/models"; + +function query(project: ProjectReflection, name: string) { + const reflection = project.getChildByName(name); + ok(reflection instanceof DeclarationReflection, `Failed to find ${name}`); + return reflection; +} + +const issueTests: Record void> = { + gh869(project) { + const classFoo = project.children?.find( + (r) => r.name === "Foo" && r.kind === ReflectionKind.Class + ); + ok(classFoo instanceof DeclarationReflection); + equal( + classFoo.children?.find((r) => r.name === "x"), + undefined + ); + + const nsFoo = project.children?.find( + (r) => r.name === "Foo" && r.kind === ReflectionKind.Namespace + ); + ok(nsFoo instanceof DeclarationReflection); + ok(nsFoo.children?.find((r) => r.name === "x")); + }, + + gh1124(project) { + equal( + project.children?.length, + 1, + "Namespace with type and value converted twice" + ); + }, + + gh1150(project) { + const refl = query(project, "IntersectFirst"); + equal(refl?.kind, ReflectionKind.TypeAlias); + equal(refl.type?.type, "indexedAccess"); + }, + + gh1164(project) { + const refl = query(project, "gh1164"); + equal( + refl.signatures?.[0]?.parameters?.[0]?.comment?.text, + "{@link CommentedClass} Test description." + ); + equal(refl.signatures?.[0]?.comment?.returns, "Test description.\n"); + }, + + gh1330(project) { + const example = query(project, "ExampleParam"); + equal(example?.type?.type, "reference"); + equal(example.type.toString(), "Example"); + }, + + gh1366(project) { + const foo = query(project, "GH1366.Foo"); + equal(foo.kind, ReflectionKind.Reference); + }, + + gh1408(project) { + const foo = query(project, "foo"); + const type = foo?.signatures?.[0]?.typeParameters?.[0].type; + equal(type?.type, "array"); + equal(type?.toString(), "unknown[]"); + }, + + gh1436(project) { + equal( + project.children?.map((c) => c.name), + ["gh1436"] + ); + }, + + gh1449(project) { + const refl = query(project, "gh1449").signatures?.[0]; + equal( + refl?.typeParameters?.[0].type?.toString(), + "[foo: any, bar?: any]" + ); + }, + + gh1454(project) { + const foo = query(project, "foo"); + const fooRet = foo?.signatures?.[0]?.type; + equal(fooRet?.type, "reference"); + equal(fooRet?.toString(), "Foo"); + + const bar = query(project, "bar"); + const barRet = bar?.signatures?.[0]?.type; + equal(barRet?.type, "reference"); + equal(barRet?.toString(), "Bar"); + }, + + gh1462(project) { + const prop = query(project, "PROP"); + equal(prop.type?.toString(), "number"); + + // Would be nice to get this to work someday + equal(prop.comment?.shortText, void 0); + + const method = query(project, "METHOD"); + equal(method.signatures?.[0].comment?.shortText, "method docs"); + }, + + gh1481(project) { + const signature = query(project, "GH1481.static").signatures?.[0]; + equal(signature?.comment?.shortText, "static docs"); + equal(signature?.type?.toString(), "void"); + }, + + gh1483(project) { + equal( + query(project, "gh1483.namespaceExport").kind, + ReflectionKind.Function + ); + equal( + query(project, "gh1483_2.staticMethod").kind, + ReflectionKind.Method + ); + }, + + gh1490(project) { + const refl = query(project, "GH1490.optionalMethod"); + equal(refl.signatures?.[0]?.comment?.shortText, "With comment"); + }, + + gh1509(project) { + const pFoo = query(project, "PartialFoo.foo"); + equal(pFoo.flags.isOptional, true); + + const rFoo = query(project, "ReadonlyFoo.foo"); + equal(rFoo.flags.isReadonly, true); + equal(rFoo.flags.isOptional, true); + }, + + gh1514(project) { + // Not ideal. Really we want to handle these names nicer... + query(project, "ComputedUniqueName.[UNIQUE_SYMBOL]"); + }, + + gh1522(project) { + equal( + project.groups?.map((g) => g.categories?.map((c) => c.title)), + [["cat"]] + ); + }, + + gh1524(project) { + const nullableParam = query(project, "nullable").signatures?.[0] + ?.parameters?.[0]; + equal(nullableParam?.type?.toString(), "string | null"); + + const nonNullableParam = query(project, "nonNullable").signatures?.[0] + ?.parameters?.[0]; + equal(nonNullableParam?.type?.toString(), "string"); + }, + + gh1534(project) { + const func = query(project, "gh1534"); + equal( + func.signatures?.[0]?.parameters?.[0]?.type?.toString(), + "readonly [number, string]" + ); + }, + + gh1547(project) { + equal( + project.children?.map((c) => c.name), + ["Test", "ThingA", "ThingB"] + ); + }, +}; + +describe("Converter2", () => { + const base = join(__dirname, "converter2"); + const app = new Application(); + app.options.addReader(new TSConfigReader()); + app.bootstrap({ + name: "typedoc", + excludeExternals: true, + disableSources: true, + tsconfig: join(base, "tsconfig.json"), + }); + + let program: ts.Program; + it("Compiles", () => { + program = ts.createProgram( + app.options.getFileNames(), + app.options.getCompilerOptions() + ); + + const errors = ts.getPreEmitDiagnostics(program); + equal(errors, []); + }); + + for (const [entry, check] of Object.entries(issueTests)) { + const link = `https://github.com/TypeStrong/typedoc/issues/${entry.substr( + 2 + )}`; + + it(`Issue ${entry.substr(2).padEnd(4)} (${link})`, () => { + const entryPoint = [ + join(base, "issues", `${entry}.ts`), + join(base, "issues", `${entry}.d.ts`), + join(base, "issues", `${entry}.tsx`), + join(base, "issues", `${entry}.js`), + join(base, "issues", entry), + ].find(existsSync); + + ok(entryPoint, `No entry point found for ${entry}`); + + const project = app.converter.convert([entryPoint], program); + check(project); + }); + } +}); diff --git a/src/test/converter/declaration/namespaces.d.ts b/src/test/converter2/issues/gh1124.d.ts similarity index 51% rename from src/test/converter/declaration/namespaces.d.ts rename to src/test/converter2/issues/gh1124.d.ts index 2495bd1b5..89b92c7db 100644 --- a/src/test/converter/declaration/namespaces.d.ts +++ b/src/test/converter2/issues/gh1124.d.ts @@ -1,12 +1,3 @@ -export interface Foo { - prop: number; -} - -export namespace GH1366 { - // This is only allowed in an ambient context. - export { Foo }; -} - export namespace GH1124 { export type PrimitiveType = boolean | string | number | Date; } diff --git a/src/test/converter2/issues/gh1150.ts b/src/test/converter2/issues/gh1150.ts new file mode 100644 index 000000000..48604a183 --- /dev/null +++ b/src/test/converter2/issues/gh1150.ts @@ -0,0 +1,19 @@ +/** + * Conditional type with infer + */ +export type PopFront = ((...args: T) => any) extends ( + a: any, + ...r: infer R +) => any + ? R + : never; + +export type IntersectFirst = { + 0: R; + 1: IntersectFirst< + PopFront, + { + [K in keyof R | keyof T[0]]: K extends keyof R ? R[K] : T[0][K]; + } + >; +}[T["length"] extends 0 ? 0 : 1]; diff --git a/src/test/converter2/issues/gh1164.ts b/src/test/converter2/issues/gh1164.ts new file mode 100644 index 000000000..f8e62ca8c --- /dev/null +++ b/src/test/converter2/issues/gh1164.ts @@ -0,0 +1,8 @@ +/** Function description + * + * @param scope {@link CommentedClass} Test description. + * @returns Test description. + */ +export function gh1164(scope: string) { + return scope; +} diff --git a/src/test/converter2/issues/gh1330.ts b/src/test/converter2/issues/gh1330.ts new file mode 100644 index 000000000..e08d79ab3 --- /dev/null +++ b/src/test/converter2/issues/gh1330.ts @@ -0,0 +1,14 @@ +export type ExampleParam = Example; +export interface Example {} + +declare const makeExample: () => Example; +declare const makeExample2: () => ExampleParam; + +// Recursive type when we don't have a type node. +export const testValue = makeExample(); +export const testValue2 = makeExample2(); + +export type HasProp = { key: T }; + +declare const makeProp: (x: T) => HasProp; +export const testValue3 = makeProp(1); diff --git a/src/test/converter2/issues/gh1366.d.ts b/src/test/converter2/issues/gh1366.d.ts new file mode 100644 index 000000000..cd8810a54 --- /dev/null +++ b/src/test/converter2/issues/gh1366.d.ts @@ -0,0 +1,8 @@ +export interface Foo { + prop: number; +} + +export namespace GH1366 { + // This is only allowed in an ambient context. + export { Foo }; +} diff --git a/src/test/converter2/issues/gh1408.ts b/src/test/converter2/issues/gh1408.ts new file mode 100644 index 000000000..ead6481af --- /dev/null +++ b/src/test/converter2/issues/gh1408.ts @@ -0,0 +1 @@ +export declare function foo(): T; diff --git a/src/test/converter/declaration/global-fn.d.ts b/src/test/converter2/issues/gh1436.d.ts similarity index 100% rename from src/test/converter/declaration/global-fn.d.ts rename to src/test/converter2/issues/gh1436.d.ts diff --git a/src/test/converter2/issues/gh1449.ts b/src/test/converter2/issues/gh1449.ts new file mode 100644 index 000000000..32b880776 --- /dev/null +++ b/src/test/converter2/issues/gh1449.ts @@ -0,0 +1,3 @@ +export function gh1449(a: T): T { + return a; +} diff --git a/src/test/converter2/issues/gh1454.ts b/src/test/converter2/issues/gh1454.ts new file mode 100644 index 000000000..75efd60cd --- /dev/null +++ b/src/test/converter2/issues/gh1454.ts @@ -0,0 +1,5 @@ +export type Foo = string | number; +export type Bar = string | number; + +export declare function bar(x: Bar): Bar; +export declare function foo(x: Foo): Foo; diff --git a/src/test/converter2/issues/gh1462.ts b/src/test/converter2/issues/gh1462.ts new file mode 100644 index 000000000..7a9c5a913 --- /dev/null +++ b/src/test/converter2/issues/gh1462.ts @@ -0,0 +1,8 @@ +const sideEffects = { + /** method docs */ + method() {}, + /** prop docs */ + prop: 1, +}; + +export const { method: METHOD, prop: PROP } = sideEffects; diff --git a/src/test/converter2/issues/gh1481.js b/src/test/converter2/issues/gh1481.js new file mode 100644 index 000000000..7b5549c5f --- /dev/null +++ b/src/test/converter2/issues/gh1481.js @@ -0,0 +1,5 @@ +class GH1481 {} +/** static docs */ +GH1481.static = function () {}; + +exports.GH1481 = GH1481; diff --git a/src/test/converter/js/declaration-merging.js b/src/test/converter2/issues/gh1483.js similarity index 67% rename from src/test/converter/js/declaration-merging.js rename to src/test/converter2/issues/gh1483.js index a9dcd32c8..16426c69d 100644 --- a/src/test/converter/js/declaration-merging.js +++ b/src/test/converter2/issues/gh1483.js @@ -1,9 +1,3 @@ -class GH1481 {} -/** static docs */ -GH1481.static = function () {}; - -exports.GH1481 = GH1481; - function gh1483() {} gh1483.namespaceExport = function () {}; exports.gh1483 = gh1483; diff --git a/src/test/converter2/issues/gh1490.ts b/src/test/converter2/issues/gh1490.ts new file mode 100644 index 000000000..80b65a85e --- /dev/null +++ b/src/test/converter2/issues/gh1490.ts @@ -0,0 +1,4 @@ +export interface GH1490 { + /** With comment */ + optionalMethod?(): void; +} diff --git a/src/test/converter2/issues/gh1509.ts b/src/test/converter2/issues/gh1509.ts new file mode 100644 index 000000000..4defc3998 --- /dev/null +++ b/src/test/converter2/issues/gh1509.ts @@ -0,0 +1,6 @@ +export interface Foo { + foo: number; +} + +export interface PartialFoo extends Partial {} +export interface ReadonlyFoo extends Readonly> {} diff --git a/src/test/converter/variables/symbols.ts b/src/test/converter2/issues/gh1514.ts similarity index 87% rename from src/test/converter/variables/symbols.ts rename to src/test/converter2/issues/gh1514.ts index 83363d85c..cc58b7a56 100644 --- a/src/test/converter/variables/symbols.ts +++ b/src/test/converter2/issues/gh1514.ts @@ -1,6 +1,5 @@ export const UNIQUE_SYMBOL = Symbol(); export interface ComputedUniqueName { - // GH#1514 [UNIQUE_SYMBOL]: string; } diff --git a/src/test/converter2/issues/gh1522.ts b/src/test/converter2/issues/gh1522.ts new file mode 100644 index 000000000..0ef1093a4 --- /dev/null +++ b/src/test/converter2/issues/gh1522.ts @@ -0,0 +1,4 @@ +/** @category cat */ +export declare function over(): string; +/** @category cat */ +export declare function over(x: number): number; diff --git a/src/test/converter2/issues/gh1524.d.ts b/src/test/converter2/issues/gh1524.d.ts new file mode 100644 index 000000000..5af4b7a23 --- /dev/null +++ b/src/test/converter2/issues/gh1524.d.ts @@ -0,0 +1,2 @@ +export function nullable(opt: ?string): void; +export function nonNullable(opt: !string): void; diff --git a/src/test/converter2/issues/gh1534.ts b/src/test/converter2/issues/gh1534.ts new file mode 100644 index 000000000..6cab45f5c --- /dev/null +++ b/src/test/converter2/issues/gh1534.ts @@ -0,0 +1 @@ +export function gh1534(rt: readonly [number, string]) {} diff --git a/src/test/converter2/issues/gh1547.ts b/src/test/converter2/issues/gh1547.ts new file mode 100644 index 000000000..972100b89 --- /dev/null +++ b/src/test/converter2/issues/gh1547.ts @@ -0,0 +1,25 @@ +export interface ThingA { + type: "ThingA"; +} + +export interface ThingB { + type: "ThingB"; +} + +type Things = ThingA | ThingB; + +type ValueOrArray = T | Array>; + +/** + * Test. + */ +export class Test { + /** + * Log a thing. + * + * @param things - Array of things or a thing. + */ + log_thing(things: ValueOrArray): void { + console.log(things); + } +} diff --git a/src/test/converter2/issues/gh869.ts b/src/test/converter2/issues/gh869.ts new file mode 100644 index 000000000..813dfd31f --- /dev/null +++ b/src/test/converter2/issues/gh869.ts @@ -0,0 +1,6 @@ +export class Foo {} +export namespace Foo { + export const x = 1; +} + +export class Bar extends Foo {} diff --git a/src/test/converter2/tsconfig.json b/src/test/converter2/tsconfig.json new file mode 100644 index 000000000..9b0acb858 --- /dev/null +++ b/src/test/converter2/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "strict": true, + "module": "CommonJS", + "allowJs": true, + "outDir": "dist", + "target": "ESNext", + + // See #1524. We might force this to false eventually. + "skipLibCheck": true + } +} diff --git a/tsconfig.json b/tsconfig.json index bffc45ac1..977ba12ee 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -30,6 +30,7 @@ "include": ["src/**/*.ts"], "exclude": [ "src/test/converter/**/*.ts", + "src/test/converter2/**/*.ts", "src/test/renderer/specs", "src/test/.dot/**/*.ts", "src/test/module/**/*.ts"