diff --git a/.gitignore b/.gitignore index 7e867f6bc..ed6e9f1fe 100644 --- a/.gitignore +++ b/.gitignore @@ -7,18 +7,10 @@ yarn.lock .nyc_output yarn-error.log -/src/typings/typescript/typescript.js - -/tmp/ -/etc/ /examples/*/doc /examples/basic/json.json -/examples/definitely-typed/src/ -/examples/plottable/src/ -/examples/doppio/src/ /node_modules/ -/typescript/ /coverage/ /dist/ -typedoc*.tgz \ No newline at end of file +typedoc*.tgz diff --git a/examples/basic/src/access.ts b/examples/basic/src/access.ts index 230dffa79..663daea2b 100644 --- a/examples/basic/src/access.ts +++ b/examples/basic/src/access.ts @@ -2,13 +2,14 @@ * A variable that is made private via comment. * @private */ +// tslint:disable-next-line:no-var-keyword export var fakePrivateVariable = 'test'; /** * A variable that is made protected via comment. * @protected */ -export var fakeProtectedVariable = 'test'; +export let fakeProtectedVariable = 'test'; /** * A function that is made private via comment. @@ -26,19 +27,18 @@ export function fakeProtectedFunction() {} * A class that is documented as being private. * @private */ -export class PrivateClass -{ +export class PrivateClass { /** * A variable that is made private via comment. * @private */ - fakePrivateVariable:string; + fakePrivateVariable: string; /** * A variable that is made protected via comment. * @protected */ - fakeProtectedVariable:string; + fakeProtectedVariable: string; /** * A function that is made private via comment. @@ -57,7 +57,6 @@ export class PrivateClass * A module that is documented as being private. * @private */ -export module PrivateModule -{ +export module PrivateModule { export function functionInsidePrivateModule() {} -} \ No newline at end of file +} diff --git a/examples/basic/src/classes.ts b/examples/basic/src/classes.ts index 353d55430..ad445cd79 100644 --- a/examples/basic/src/classes.ts +++ b/examples/basic/src/classes.ts @@ -1,86 +1,78 @@ /** * This is a simple interface. */ -export interface INameInterface -{ +export interface NameInterface { /** * This is a interface member of INameInterface. * * It should be inherited by all subinterfaces. */ - name:string; + name: string; /** * This is a interface function of INameInterface. * * It should be inherited by all subinterfaces. */ - getName():string; + getName(): string; } - /** * This is a simple interface. */ -export interface IPrintInterface -{ +export interface PrintInterface { /** * This is a interface function of IPrintInterface * * It should be inherited by all subinterfaces. */ - print(value:string):void; + print(value: string): void; } - /** * This is a interface inheriting from two other interfaces. */ -export interface IPrintNameInterface extends INameInterface, IPrintInterface -{ +export interface PrintNameInterface extends NameInterface, PrintInterface { /** * This is a interface function of IPrintNameInterface */ - printName():void; + printName(): void; } - /** * This is a simple base class. * * [[include:class-example.md]] */ -export abstract class BaseClass implements INameInterface -{ +export abstract class BaseClass implements NameInterface { /** * This is a simple public member. */ - public name:string; + public name: string; /** * This is a simple protected member. */ - protected kind:number; + protected kind: number; /** * This is a static member. * * Static members should not be inherited. */ - static instance:BaseClass; - static instances:BaseClass[]; + static instance: BaseClass; + static instances: BaseClass[]; /** * This is an instance member of an internal class. */ - private internalClass:InternalClass; + private internalClass: InternalClass; - - constructor(name:string); - constructor(source:BaseClass); + constructor(name: string); + constructor(source: BaseClass); constructor() { if (arguments.length > 0) { - if (typeof arguments[0] == 'string') { + if (typeof arguments[0] === 'string') { this.name = arguments[0]; } else if (arguments[0] instanceof BaseClass) { this.name = arguments[0].name; @@ -100,11 +92,10 @@ export abstract class BaseClass implements INameInterface * * @returns Return the name. */ - public getName():string { + public getName(): string { return this.name; } - /** * This is a simple static member function. * @@ -113,11 +104,10 @@ export abstract class BaseClass implements INameInterface * * @returns Return the name. */ - static getName():string { + static getName(): string { return 'A name'; } - /** * This is a simple member function. * @@ -125,12 +115,11 @@ export abstract class BaseClass implements INameInterface * * @param name The new name. */ - public setName(name:string) { + public setName(name: string) { this.name = name; this.checkName(); } - /** * This is a simple fat arrow function. * @@ -139,8 +128,7 @@ export abstract class BaseClass implements INameInterface * @see https://github.com/sebastian-lenz/typedoc/issues/37 */ public arrowFunction = (param2: string, param1: number): void => { - }; - + } /** * This is a private function. @@ -149,7 +137,6 @@ export abstract class BaseClass implements INameInterface return true; } - /** * This is a static function. * @@ -157,22 +144,21 @@ export abstract class BaseClass implements INameInterface * * @returns An instance of BaseClass. */ - static getInstance():BaseClass { + static getInstance(): BaseClass { return BaseClass.instance; } - /** * @see https://github.com/sebastian-lenz/typedoc/issues/42 */ - public static caTest(originalValues:BaseClass, newRecord: any, fieldNames:string[], mandatoryFields:string[]): string { - var returnval = ""; - var updates: string[] = []; - var allFields: string[] = fieldNames; - for (var j = 0; j < allFields.length; j++) { - var field = allFields[j]; - var oldValue = originalValues[field]; - var newValue = newRecord[field]; + public static caTest(originalValues: BaseClass, newRecord: any, fieldNames: string[], mandatoryFields: string[]): string { + let returnval = ''; + let updates: string[] = []; + let allFields: string[] = fieldNames; + for (let j = 0; j < allFields.length; j++) { + let field = allFields[j]; + let oldValue = originalValues[field]; + let newValue = newRecord[field]; } return returnval; } @@ -181,9 +167,8 @@ export abstract class BaseClass implements INameInterface /** * This is an internal class, it is not exported. */ -class InternalClass -{ - constructor(options:{name:string}) { +class InternalClass { + constructor(options: {name: string}) { } } @@ -194,19 +179,18 @@ class InternalClass * This class has no own constructor, so its constructor should be inherited * from BaseClass. */ -export class SubClassA extends BaseClass implements IPrintNameInterface -{ - public name:string; +export class SubClassA extends BaseClass implements PrintNameInterface { + public name: string; /** * This is a simple interface function. */ - public print(value:string):void { } + public print(value: string): void { } /** * @inheritdoc */ - public printName():void { + public printName(): void { this.print(this.getName()); } @@ -215,7 +199,7 @@ export class SubClassA extends BaseClass implements IPrintNameInterface * * @returns The return value. */ - public get nameProperty():string { + public get nameProperty(): string { return this.name; } @@ -225,7 +209,7 @@ export class SubClassA extends BaseClass implements IPrintNameInterface * @param value The new name. * @returns The return value. */ - public set nameProperty(value:string) { + public set nameProperty(value: string) { this.name = value; } @@ -234,7 +218,7 @@ export class SubClassA extends BaseClass implements IPrintNameInterface * * @returns The return value. */ - public get readOnlyNameProperty():string { + public get readOnlyNameProperty(): string { return this.name; } @@ -244,7 +228,7 @@ export class SubClassA extends BaseClass implements IPrintNameInterface * @param value The new name. * @returns The return value. */ - public set writeOnlyNameProperty(value:string) { + public set writeOnlyNameProperty(value: string) { this.name = value; } @@ -258,11 +242,10 @@ export class SubClassA extends BaseClass implements IPrintNameInterface * * The constructor of the original class should be overwritten. */ -export class SubClassB extends BaseClass -{ +export class SubClassB extends BaseClass { public name: string; - constructor(name:string) { + constructor(name: string) { super(name); } @@ -270,7 +253,7 @@ export class SubClassB extends BaseClass } - doSomething(value:[string, SubClassA, SubClassB]) { + doSomething(value: [string, SubClassA, SubClassB]) { } } @@ -279,9 +262,8 @@ export class SubClassB extends BaseClass * * @param T This a type parameter. */ -export class GenericClass -{ - public value:T; +export class GenericClass { + public value: T; /** * Constructor short text. @@ -292,17 +274,17 @@ export class GenericClass * @param p4 Public implicit any property * @param p5 Readonly property */ - constructor(p1, protected p2:T, public p3:number, private p4:number, readonly p5: string) { + constructor(p1, protected p2: T, public p3: number, private p4: number, readonly p5: string) { } /** * @param value [[getValue]] is the counterpart. */ - public setValue(value:T) { + public setValue(value: T) { this.value = value; } - public getValue():T { + public getValue(): T { return this.value; } } diff --git a/examples/basic/src/default-export.ts b/examples/basic/src/default-export.ts index d03cce192..ac17549c9 100644 --- a/examples/basic/src/default-export.ts +++ b/examples/basic/src/default-export.ts @@ -1,34 +1,30 @@ /** * This class is exported under a different name. The exported name is * "ExportedClassName" - * + * * ```JavaScript * export {NotExportedClassName as ExportedClassName}; * ``` */ -class NotExportedClassName -{ +class NotExportedClassName { /** * Property of NotExportedClassName class. */ - public notExportedProperty:string; - + public notExportedProperty: string; /** * This is the constructor of the NotExportedClassName class. */ constructor() { } - /** * Method of NotExportedClassName class. */ - public getNotExportedProperty():string { + public getNotExportedProperty(): string { return this.notExportedProperty; } } - /** * This class is exported via es6 export syntax. * @@ -36,27 +32,24 @@ class NotExportedClassName * export default class DefaultExportedClass * ``` */ -export default class DefaultExportedClass -{ +export default class DefaultExportedClass { /** * Property of default exported class. */ - public exportedProperty:string; - + public exportedProperty: string; /** * This is the constructor of the default exported class. */ constructor() { } - /** * Method of default exported class. */ - public getExportedProperty():string { + public getExportedProperty(): string { return this.exportedProperty; } } // Rename class on export -export {NotExportedClassName as ExportedClassName}; \ No newline at end of file +export { NotExportedClassName as ExportedClassName }; diff --git a/examples/basic/src/enumerations.ts b/examples/basic/src/enumerations.ts index ab1a6e453..99ff393d7 100644 --- a/examples/basic/src/enumerations.ts +++ b/examples/basic/src/enumerations.ts @@ -1,8 +1,7 @@ /** * This is a simple Enumeration. */ -export enum Directions -{ +export enum Directions { /** * A simple enum member. */ @@ -34,14 +33,12 @@ export enum Directions TopRight = Top | Right } - /** * This is a enumeration extended by a module. * * You should see both the enum members and the module members. */ -export enum Size -{ +export enum Size { /** * A simple enum member. */ @@ -58,17 +55,14 @@ export enum Size Large } - /** * This comment is ignored, as the enumeration is already defined. */ -export module Size -{ +export module Size { /** * A variable that is attached to an enumeration. */ - var defaultSize:Size = Size.Medium; - + let defaultSize: Size = Size.Medium; /** * A function that is attached to an enumeration. @@ -76,7 +70,7 @@ export module Size * @param value The value that should be tested. * @returns TRUE when the given value equals Size.Small. */ - function isSmall(value:Size):boolean { - return value == Size.Small; + function isSmall(value: Size): boolean { + return value === Size.Small; } -} \ No newline at end of file +} diff --git a/examples/basic/src/flattened.ts b/examples/basic/src/flattened.ts index 84d3979c7..381e7b687 100644 --- a/examples/basic/src/flattened.ts +++ b/examples/basic/src/flattened.ts @@ -1,8 +1,7 @@ /** * A class that contains members with flattened properties. */ -class flattenedClass -{ +class FlattenedClass { /** * A member that accepts an option object defined inline. * @@ -11,11 +10,11 @@ class flattenedClass * @param options.moreOptions A typed child object of the options object. * @param options.moreOptions.moreValues A value of the typed child object. */ - options:{ - value?:string; - anotherValue?:string; - moreOptions?:{ - moreValues:number; + options: { + value?: string; + anotherValue?: string; + moreOptions?: { + moreValues: number; }; }; @@ -25,7 +24,7 @@ class flattenedClass * @param callback.param A parameter of the typed function callback. * @param callback.optionalParam An optional parameter of the typed function callback. */ - callback:(param:number, optionalParam?:string) => string; + callback: (param: number, optionalParam?: string) => string; /** * A member that holds an index signature. @@ -33,9 +32,9 @@ class flattenedClass * @param indexed.index The index property comment. * @param indexed.test A property of the index signature instance. */ - indexed:{ - [index:number]:{name:string; value?:number;}; - test:string; + indexed: { + [index: number]: {name: string; value?: number; }; + test: string; }; /** @@ -53,10 +52,9 @@ class flattenedClass * @param value The desired value. * @returns The calling Foo. */ - (value:number):flattenedClass; + (value: number): FlattenedClass; }; - /** * A constructor that accepts an option object defined inline. * @@ -66,16 +64,15 @@ class flattenedClass * @param options.moreOptions A typed child object of the options object. * @param options.moreOptions.moreValues A value of the typed child object. */ - constructor(options:{ - value?:string; - anotherValue?:string; - moreOptions?:{ - moreValues:number; + constructor(options: { + value?: string; + anotherValue?: string; + moreOptions?: { + moreValues: number; }; }) { } } - /** * A function that has a parameter that requires a typed function callback. * @@ -83,8 +80,7 @@ class flattenedClass * @param callback.param A parameter of the typed function callback. * @param callback.optionalParam An optional parameter of the typed function callback. */ -function flattenedCallback(callback:(param:number, optionalParam?:string) => string) { } - +function flattenedCallback(callback: (param: number, optionalParam?: string) => string) { } /** * A function that accepts an option object defined inline. @@ -95,16 +91,15 @@ function flattenedCallback(callback:(param:number, optionalParam?:string) => str * @param options.moreOptions A typed child object of the options object. * @param options.moreOptions.moreValues A value of the typed child object. */ -function flattenedParameter(options:{ - [name:string]:any; - value?:string; - anotherValue?:string; - moreOptions?:{ - moreValues:number; +function flattenedParameter(options: { + [name: string]: any; + value?: string; + anotherValue?: string; + moreOptions?: { + moreValues: number; }; }) { } - /** * A function that accepts an index signature parameter. * @@ -112,7 +107,7 @@ function flattenedParameter(options:{ * @param indexed.index The index property comment. * @param indexed.test A property of the index signature instance. */ -function flattenedIndexSignature(indexed:{ - [index:number]:{name:string; value?:number;}; - test:string; -}) { } \ No newline at end of file +function flattenedIndexSignature(indexed: { + [index: number]: {name: string; value?: number; }; + test: string; +}) { } diff --git a/examples/basic/src/functions.ts b/examples/basic/src/functions.ts index 854fa416a..74f646656 100644 --- a/examples/basic/src/functions.ts +++ b/examples/basic/src/functions.ts @@ -3,14 +3,12 @@ import classes = require('./classes'); /** * This is an internal function. */ -function internalFunction():void { } - +function internalFunction(): void { } /** * This is a simple exported function. */ -export function exportedFunction():void { } - +export function exportedFunction(): void { } /** * This is a function with multiple arguments and a return value. @@ -27,11 +25,10 @@ export function exportedFunction():void { } * ~~~ * */ -var variableFunction = function(paramZ:string, paramG:any, paramA:classes.INameInterface):number { +let variableFunction = function(paramZ: string, paramG: any, paramA: classes.NameInterface): number { return 0; }; - /** * This is a function with multiple arguments and a return value. * @param paramZ This is a string parameter. @@ -47,19 +44,17 @@ var variableFunction = function(paramZ:string, paramG:any, paramA:classes.INameI * ~~~ * */ -export function functionWithArguments(paramZ:string, paramG:any, paramA:classes.INameInterface):number { +export function functionWithArguments(paramZ: string, paramG: any, paramA: classes.NameInterface): number { return 0; } - /** * This is a function with a parameter that is optional. * * @param requiredParam A normal parameter. * @param optionalParam An optional parameter. */ -export function functionWithOptionalValue(requiredParam:string, optionalParam?:string) { } - +export function functionWithOptionalValue(requiredParam: string, optionalParam?: string) { } /** * This is a function with a parameter that has a default value. @@ -68,33 +63,31 @@ export function functionWithOptionalValue(requiredParam:string, optionalParam?:s * @returns The input value or the default value. */ export function functionWithDefaults( - valueA:string = 'defaultValue', - valueB:number = 100, - valueC:number = Number.NaN, - valueD:boolean = true, - valueE:boolean = false -):string { + valueA: string = 'defaultValue', + valueB: number = 100, + valueC: number = Number.NaN, + valueD: boolean = true, + valueE: boolean = false +): string { return valueA; } - /** * This is a function with rest parameter. * * @param rest Multiple strings. * @returns The combined string. */ -function functionWithRest(...rest:string[]):string { +function functionWithRest(...rest: string[]): string { return rest.join(', '); } - /** * This is the first signature of a function with multiple signatures. * * @param value The name value. */ -export function multipleSignatures(value:string):string; +export function multipleSignatures(value: string): string; /** * This is the second signature of a function with multiple signatures. @@ -102,15 +95,15 @@ export function multipleSignatures(value:string):string; * @param value An object containing the name value. * @param value.name A value of the object. */ -export function multipleSignatures(value:{name:string}):string; +export function multipleSignatures(value: {name: string}): string; /** * This is the actual implementation, this comment will not be visible * in the generated documentation. */ -export function multipleSignatures():string { +export function multipleSignatures(): string { if (arguments.length > 0) { - if (typeof arguments[0] == 'object') { + if (typeof arguments[0] === 'object') { return arguments[0].name; } else { return arguments[0]; @@ -120,7 +113,6 @@ export function multipleSignatures():string { return ''; } - /** * This is a generic function. * @@ -128,29 +120,25 @@ export function multipleSignatures():string { * @param value The typed value. * @return Returns the typed value. */ -export function genericFunction(value:T):T { +export function genericFunction(value: T): T { return value; } - /** * This is a function that is extended by a module. * * @param arg An argument. */ -export function moduleFunction(arg:string):string { return ''; } - +export function moduleFunction(arg: string): string { return ''; } /** * This is the module extending the function moduleFunction(). */ -export module moduleFunction -{ +export module moduleFunction { /** * This variable is appended to a function. */ - var functionVariable:string; - + let functionVariable: string; /** * This function is appended to another function. @@ -167,7 +155,6 @@ export module moduleFunction } } - /** * A function that returns an object. * Also no type information is given, the object should be correctly reflected. @@ -175,12 +162,11 @@ export module moduleFunction export function createSomething() { return { foo: 'bar', - doSomething: (a:number) => a + 1, + doSomething: (a: number) => a + 1, doAnotherThing: () => {} }; } - /** * See {@linkcode INameInterface} and [INameInterface's name property]{@link INameInterface.name}. * Also, check out {@link https://www.google.com|Google} and @@ -188,4 +174,4 @@ export function createSomething() { * * Taken from http://usejsdoc.org/tags-inline-link.html. */ -export function functionWithDocLink():void { } \ No newline at end of file +export function functionWithDocLink(): void { } diff --git a/examples/basic/src/modules.ts b/examples/basic/src/modules.ts index 9f345a4a8..612fdb3bd 100644 --- a/examples/basic/src/modules.ts +++ b/examples/basic/src/modules.ts @@ -5,12 +5,11 @@ /** * This is a module. */ -export module MyModule -{ +export module MyModule { /** * This is an object literal. */ - export var object = { + export let object = { /** * An object literal value. */ @@ -19,69 +18,65 @@ export module MyModule /** * An object literal function. */ - print: function(value:string) { } + print: function(value: string) { } }; - /** * This is a submodule. */ - export module MySubmodule - { - var a:string; + export module MySubmodule { + let a: string; } + export let exportedModuleVariable = 'foo'; - export var exportedModuleVariable = 'foo'; - - var moduleVariable = [100, 200]; + let moduleVariable = [100, 200]; - var moduleVariable2:number[]; + let moduleVariable2: number[]; } /** * This is a submodule with the preferred comment. * @preferred */ -export module MyModule.MySubmodule -{ - var b:string; +export module MyModule.MySubmodule { + let b: string; } /** * An exported global variable. */ -export var exportedGlobalVariable = 'foo'; +export let exportedGlobalVariable = 'foo'; /** * A non-exported global variable. */ -var globalVariable = 'foo'; +let globalVariable = 'foo'; /** * An object literal. */ -var objectLiteral = { +let objectLiteral = { valueZ: 'foo', valueY: function() { return 'foo'; }, valueX: { valueZ: 'foo', - valueY: (z:string) => { return {a:'test', b:z}; }, + valueY: (z: string) => { return {a: 'test', b: z}; }, valueA: [100, 200, 300] }, valueA: 100, valueB: true }; -var typeLiteral:{ - ():string; - valueZ:string; - valueY:{():string;}; - valueX:{ - valueZ:string; - valueY:{(z:string):{a:string; b:string}; }; - valueA:number[]; +let typeLiteral: { + (): string; + valueZ: string; + valueY: {(): string; }; + valueX: { + valueZ: string; + valueY: {(z: string): {a: string; b: string}; }; + valueA: number[]; }; - valueA?:number; - valueB?:boolean; -}; \ No newline at end of file + valueA?: number; + valueB?: boolean; +}; diff --git a/examples/basic/src/single-export.ts b/examples/basic/src/single-export.ts index b96eaab1d..4561f189c 100644 --- a/examples/basic/src/single-export.ts +++ b/examples/basic/src/single-export.ts @@ -1,29 +1,25 @@ /** * This class is not exported. */ -class NotExportedClass -{ +class NotExportedClass { /** * Property of not exported class. */ - public notExportedProperty:string; - + public notExportedProperty: string; /** * This is the constructor of the not exported class. */ constructor() { } - /** * Method of not exported class. */ - public getNotExportedProperty():string { + public getNotExportedProperty(): string { return this.notExportedProperty; } } - /** * This class is exported by being assigned to ´export´. * @@ -31,30 +27,26 @@ class NotExportedClass * export = SingleExportedClass; * ~~~ */ -class SingleExportedClass -{ +class SingleExportedClass { /** * Property of exported class. */ - public exportedProperty:string; - + public exportedProperty: string; /** * This is the constructor of the exported class. */ constructor() { } - /** * Method of exported class. */ - public getExportedProperty():string { + public getExportedProperty(): string { return this.exportedProperty; } } - /** * The export statement. */ -export = SingleExportedClass; \ No newline at end of file +export = SingleExportedClass; diff --git a/examples/basic/src/typescript-1.3.ts b/examples/basic/src/typescript-1.3.ts deleted file mode 100644 index 69da09312..000000000 --- a/examples/basic/src/typescript-1.3.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * A class with protected members. - */ -class ClassWithProtectedMembers -{ - /** - * A public property. - */ - public publicProperty:string; - - /** - * A protected property. - */ - protected protectedProperty:string; - - /** - * A private property. - */ - private privateProperty:[boolean,string,string]; - - /** - * A public property. - */ - public publicMethod() {} - - /** - * A protected property. - */ - protected protectedMethod() {} - - /** - * A private property. - */ - private privateMethod() {} -} - - -/** - * A subclass with inherited protected members. - */ -class SubclassWithProtectedMembers extends ClassWithProtectedMembers { - -} - - -/** - * A variable with a tuple type. - */ -var tupleType:[string,ClassWithProtectedMembers] = ['test', new ClassWithProtectedMembers()]; \ No newline at end of file diff --git a/examples/basic/src/typescript-1.4.ts b/examples/basic/src/typescript-1.4.ts deleted file mode 100644 index bd045de63..000000000 --- a/examples/basic/src/typescript-1.4.ts +++ /dev/null @@ -1,104 +0,0 @@ -/** - * Examples of features added in TypeScript 1.4. - * - * @see https://blogs.msdn.com/b/typescript/archive/2014/11/18/what-s-new-in-the-typescript-type-system.aspx - */ - -/** - * A simple interface holding a member with an union type. - */ -interface RunOptions { - program: string; - commandline: string[]|string; -} - - -/** - * A type alias describing an array. - */ -type PrimitiveArray = Array; - - -/** - * A type alias describing a primitive value. - */ -type MyNumber = number; - - -/** - * A type alias describing a reference type. - */ -type MyRunOptions = RunOptions; - - -/** - * A type alias of for a callback function. - * - * @param Callback.parameters The rest parameter. - */ -type Callback = (...parameters:string[]) => string; - - -/** - * A type alias of for a generic callback function. - * - * @param GenericCallback.T Some type argument. - * @param GenericCallback.val Some generic value. - * @param GenericCallback.index Some index value. - * @param GenericCallback.arr A generic array. - * @return Some return value. - */ -export type GenericCallback = (val: T, index: number, arr: Array) => any; - - -/** - * A variable defined using an union type. - */ -var interfaceOrString:RunOptions|string; - - -/** - * A variable pointing to a type alias. - */ -var callback:Callback; - - -/** - * A function that has parameters pointing to type aliases and returns a type alias. - */ -function functionUsingTypes(aliasData:PrimitiveArray, callback:Callback):MyNumber { - return 10; -} - - -/** - * A generic function using a generic type alias. - * - * @param T Some type argument. - * @param arr A generic array. - * @param callback Some generic type alias callback. - * @returns Some return value. - */ -function functionWithGenericCallback(arr: Array, callback: GenericCallback): any { - return 0; -} - -/** - * A simple text class. - */ -class SimpleClass -{ - /** - * A generic function using a generic type alias. - * - * Uses [[GenericCallback]] instead of [[Callback]]. - * - * @param T Some type argument. - * @param arr A generic array. - * @param callback Some generic type alias callback. - * @returns Some return value. - */ - public someFunction(arr: Array, callback: GenericCallback): any { - return 0; - } -} \ No newline at end of file diff --git a/examples/basic/src/typescript-1.5.ts b/examples/basic/src/typescript-1.5.ts deleted file mode 100644 index d9574e2f4..000000000 --- a/examples/basic/src/typescript-1.5.ts +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Destructuring objects. - */ -var {destructObjectA, destructObjectB, destructObjectC} = {destructObjectA:0, destructObjectB:'string', destructObjectC:0}; - - -/** - * Destructuring arrays. - */ -var [destructArrayA, destructArrayB, destructArrayC = 10] = [0, 'string', 0]; - -/** - * Array Destructuring with rest - */ -var [destructArrayWithRestA, destructArrayWithRestB, ...destructArrayWithRest] = [1, 2, 3, 4]; - -/** - * Array Destructuring with ignores - */ -var [destructArrayWithIgnoresA, , ...destructArrayWithIgnoresRest] = [1, 2, 3, 4]; - -/** - * Destructuring function parameters. - * - * @param text This is the text - * @param location This is the location - * @param bold Should it be bold? - */ -function drawText({text = "", location:[x, y] = [0, 0], bold = false}) { -} \ No newline at end of file diff --git a/examples/basic/src/variables.ts b/examples/basic/src/variables.ts deleted file mode 100644 index 43dc46ac1..000000000 --- a/examples/basic/src/variables.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * A const variable - */ -export const constVariable = 'const'; - -/** - * A let variable - */ -export let letVariable = 'let'; - -/** - * A var variable - */ -export var varVariable= 'var'; diff --git a/examples/definitely-typed/run.bat b/examples/definitely-typed/run.bat deleted file mode 100644 index 9d4b08a81..000000000 --- a/examples/definitely-typed/run.bat +++ /dev/null @@ -1,7 +0,0 @@ -@echo off -set curr_dir=%cd% -chdir /D "%~dp0" - -node run.js --includeDeclarations --module commonjs --name "Definitely Typed" --readme none --out doc\ src\ - -chdir /D "%curr_dir%" \ No newline at end of file diff --git a/examples/definitely-typed/run.js b/examples/definitely-typed/run.js deleted file mode 100644 index 27d12e3b8..000000000 --- a/examples/definitely-typed/run.js +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env node - -var TypeDoc = require('../../bin/typedoc.js'); -var Util = require('util'); -var Path = require('path'); -var FS = require('fs'); - -var app = new TypeDoc.Application(); -if (app.settings.readFromCommandline(app)) { - app.settings.theme = Path.resolve('../../bin/themes/default'); - console.log(Path.resolve('../../bin/themes/default')); - app.settings.inputFiles.forEach(function(path) { - var stat = FS.statSync(path); - if (!stat.isDirectory()) { - app.log(Util.format('%s is not a directory.', path), TypeDoc.LogLevel.Warn); - return; - } - - FS.readdirSync(path).forEach(function(moduleName) { - var modulePath = Path.join(path, moduleName); - stat = FS.statSync(modulePath); - if (!stat.isDirectory()) { - return; - } - - var definitionFile; - FS.readdirSync(modulePath).forEach(function(fileName) { - if (fileName.substr(-5) != '.d.ts') return; - if (!definitionFile || fileName.length < definitionFile.length) { - definitionFile = fileName; - } - }); - - if (definitionFile) { - console.log(Util.format('Generating docs for %s', moduleName)); - app.generate( - [Path.join(modulePath, definitionFile)], - Path.join(app.settings.outputDirectory, moduleName) - ); - } - }); - }); -} \ No newline at end of file diff --git a/examples/es6/run b/examples/es6/run deleted file mode 100755 index 68bc6e20f..000000000 --- a/examples/es6/run +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -cd ${0%/*} -node ../../bin/typedoc --target ES6 --out doc/ src/ diff --git a/examples/es6/run.bat b/examples/es6/run.bat deleted file mode 100644 index 477211f3e..000000000 --- a/examples/es6/run.bat +++ /dev/null @@ -1,7 +0,0 @@ -@echo off -set curr_dir=%cd% -chdir /D "%~dp0" - -node ..\..\bin\typedoc --module commonjs --target ES6 --out doc\ src\ - -chdir /D "%curr_dir%" \ No newline at end of file diff --git a/examples/es6/src/controllers.ts b/examples/es6/src/controllers.ts deleted file mode 100644 index 98f7fe2b8..000000000 --- a/examples/es6/src/controllers.ts +++ /dev/null @@ -1,9 +0,0 @@ -import BaseModel from './models'; - -export default class ControllerBase { - protected model:BaseModel; - - constructor(model:BaseModel = new BaseModel()) { - this.model = model; - } -} \ No newline at end of file diff --git a/examples/es6/src/es6.ts b/examples/es6/src/es6.ts deleted file mode 100644 index e71e2dc0f..000000000 --- a/examples/es6/src/es6.ts +++ /dev/null @@ -1,31 +0,0 @@ -function f() { - let total = 0; - let x = 5; - for (let x = 1; x < 10; x++) { - total += x; - } - console.log(x); -} - -var rectangle = { height: 20, width: 10 }; -var areaMessage = `Rectangle area is ${rectangle.height * rectangle.width}`; - - -class Foo -{ - /** - * A function that returns an object. - * Also no type information is given, the object should be correctly reflected. - */ - createSomething() { - return { - foo: 'bar', - doSomething(a:number) { return a + 1}, - doAnotherThing() {} - }; - } -} - - -export default class DataService { -} \ No newline at end of file diff --git a/examples/es6/src/models.ts b/examples/es6/src/models.ts deleted file mode 100644 index 386cf7085..000000000 --- a/examples/es6/src/models.ts +++ /dev/null @@ -1,14 +0,0 @@ -export default class BaseModel { - public id:number; -} - - -export class SubModelA extends BaseModel { - public name:string; -} - - -export class SubModelB extends BaseModel { - public mail:string; - public password:string; -} \ No newline at end of file diff --git a/examples/mixin/src/mixin.ts b/examples/mixin/src/mixin.ts index 7606a74b8..6b595291d 100644 --- a/examples/mixin/src/mixin.ts +++ b/examples/mixin/src/mixin.ts @@ -1,97 +1,97 @@ +// tslint:disable:variable-name + +// Note: This is a copy of the mixin test case for the converter. + /** * Any function */ -export type AnyFunction = (...input: any[]) => A +export type AnyFunction = (...input: any[]) => A; /** * Any constructor function */ -export type AnyConstructor = new (...input: any[]) => A +export type AnyConstructor = new (...input: any[]) => A; /** * Mixin type helper */ -export type Mixin = InstanceType> +export type Mixin = InstanceType>; /** * Base class */ export class Base { - baseProperty : string = 'init' + baseProperty = 'init'; - baseMethod () : number { - return 42 + baseMethod (): number { + return 42; } } /** * The "mixin function" of the Mixin1 */ -export const Mixin1Func = >(base : T) => +export const Mixin1Func = >(base: T) => /** * Internal class of the Mixin1 */ class Mixin1Class extends base { - property1 : string = 'init' - + property1 = 'init'; - method1 (arg : Mixin1Type) : Mixin1Type[] { - return [ arg, this ] + method1 (arg: Mixin1Type): Mixin1Type[] { + return [ arg, this ]; } -} +}; /** * The "instance type" of the Mixin1 using the interface notation (supports recursive type definition) */ export interface Mixin1Type extends Mixin {} - /** * The "mixin function" of the Mixin2 */ -export const Mixin2 = >(base : T) => +export const Mixin2 = >(base: T) => /** * Internal class of the Mixin2 */ class Mixin2 extends base { - property2 : string = 'init' + property2 = 'init'; - - method2 (arg : Mixin2) : Mixin2[] { - return [ arg, this ] + method2 (arg: Mixin2): Mixin2[] { + return [ arg, this ]; } -} +}; /** * The "instance type" of the Mixin2 using the interface notation (supports recursive type definition) */ export interface Mixin2 extends Mixin {} - /** * The "mixin function" of the Mixin3 */ -export const Mixin3 = >(base : T) => +export const Mixin3 = >(base: T) => /** * Internal class of the Mixin3 */ class Mixin3 extends base { -} +}; /** * The "instance type" of the Mixin3 using the regular type notation (does not work well for recursive type definition) * Is not well supported by the TypeDoc */ -export type Mixin3 = Mixin +export type Mixin3 = Mixin; /** * Class that inherits from Base and consumes Mixin1 and Mixin2, in order. */ export class SomeClassWithMixin extends Mixin2(Mixin1Func(Base)) { - classWithMixinProperty : string = 'init' + classWithMixinProperty = 'init'; - classWithMixinMethod () : string { - return '42' + classWithMixinMethod (): string { + return '42'; } } diff --git a/examples/plottable/run b/examples/plottable/run deleted file mode 100755 index 2a50dea30..000000000 --- a/examples/plottable/run +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -cd ${0%/*} -node ../../bin/typedoc --mode file --includeDeclarations src/typings/d3/d3.d.ts src/plottable.d.ts --out doc/ diff --git a/examples/plottable/run.bat b/examples/plottable/run.bat deleted file mode 100644 index 4df914a5e..000000000 --- a/examples/plottable/run.bat +++ /dev/null @@ -1,7 +0,0 @@ -@echo off -set curr_dir=%cd% -chdir /D "%~dp0" - -node ..\..\bin\typedoc --mode file --includeDeclarations src/typings/d3/d3.d.ts src/plottable.d.ts --out doc/ - -chdir /D "%curr_dir%" \ No newline at end of file diff --git a/src/lib/utils/options/declaration.ts b/src/lib/utils/options/declaration.ts index 1c9d05e19..1a2400b2f 100644 --- a/src/lib/utils/options/declaration.ts +++ b/src/lib/utils/options/declaration.ts @@ -39,7 +39,7 @@ export interface TypeDocOptionMap { tsconfig: string; inputFiles: string[]; - mode: typeof SourceFileMode; + mode: { file: SourceFileMode.File, modules: SourceFileMode.Modules }; includeDeclarations: boolean; entryPoint: string; exclude: string[]; diff --git a/src/test/converter/access/specs.json b/src/test/converter/access/specs.json deleted file mode 100644 index aa0491bb7..000000000 --- a/src/test/converter/access/specs.json +++ /dev/null @@ -1,345 +0,0 @@ -{ - "id": 0, - "name": "typedoc", - "kind": 0, - "flags": {}, - "children": [ - { - "id": 1, - "name": "\"access\"", - "kind": 1, - "kindString": "External module", - "flags": { - "isExported": true - }, - "originalName": "%BASE%/access/access.ts", - "children": [ - { - "id": 2, - "name": "PrivateClass", - "kind": 128, - "kindString": "Class", - "flags": { - "isPrivate": true, - "isExported": true - }, - "comment": { - "shortText": "A class that is documented as being private." - }, - "children": [ - { - "id": 3, - "name": "fakePrivateVariable", - "kind": 1024, - "kindString": "Property", - "flags": { - "isPrivate": true, - "isExported": true - }, - "comment": { - "shortText": "A variable that is made private via comment." - }, - "sources": [ - { - "fileName": "access.ts", - "line": 35, - "character": 23 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 4, - "name": "fakeProtectedVariable", - "kind": 1024, - "kindString": "Property", - "flags": { - "isProtected": true, - "isExported": true - }, - "comment": { - "shortText": "A variable that is made protected via comment." - }, - "sources": [ - { - "fileName": "access.ts", - "line": 41, - "character": 25 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 5, - "name": "fakePrivateFunction", - "kind": 2048, - "kindString": "Method", - "flags": { - "isPrivate": true, - "isExported": true - }, - "signatures": [ - { - "id": 6, - "name": "fakePrivateFunction", - "kind": 4096, - "kindString": "Call signature", - "flags": { - "isPrivate": true, - "isExported": true - }, - "comment": { - "shortText": "A function that is made private via comment." - }, - "type": { - "type": "intrinsic", - "name": "void" - } - } - ], - "sources": [ - { - "fileName": "access.ts", - "line": 47, - "character": 23 - } - ] - }, - { - "id": 7, - "name": "fakeProtectedFunction", - "kind": 2048, - "kindString": "Method", - "flags": { - "isProtected": true, - "isExported": true - }, - "signatures": [ - { - "id": 8, - "name": "fakeProtectedFunction", - "kind": 4096, - "kindString": "Call signature", - "flags": { - "isProtected": true, - "isExported": true - }, - "comment": { - "shortText": "A function that is made protected via comment." - }, - "type": { - "type": "intrinsic", - "name": "void" - } - } - ], - "sources": [ - { - "fileName": "access.ts", - "line": 53, - "character": 25 - } - ] - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [ - 3, - 4 - ] - }, - { - "title": "Methods", - "kind": 2048, - "children": [ - 5, - 7 - ] - } - ], - "sources": [ - { - "fileName": "access.ts", - "line": 29, - "character": 25 - } - ] - }, - { - "id": 9, - "name": "fakePrivateVariable", - "kind": 32, - "kindString": "Variable", - "flags": { - "isPrivate": true, - "isExported": true, - "isConst": true - }, - "comment": { - "shortText": "A variable that is made private via comment." - }, - "sources": [ - { - "fileName": "access.ts", - "line": 5, - "character": 32 - } - ], - "type": { - "type": "stringLiteral", - "value": "test" - }, - "defaultValue": "\"test\"" - }, - { - "id": 10, - "name": "fakeProtectedVariable", - "kind": 32, - "kindString": "Variable", - "flags": { - "isProtected": true, - "isExported": true, - "isConst": true - }, - "comment": { - "shortText": "A variable that is made protected via comment." - }, - "sources": [ - { - "fileName": "access.ts", - "line": 11, - "character": 34 - } - ], - "type": { - "type": "stringLiteral", - "value": "test" - }, - "defaultValue": "\"test\"" - }, - { - "id": 11, - "name": "fakePrivateFunction", - "kind": 64, - "kindString": "Function", - "flags": { - "isPrivate": true, - "isExported": true - }, - "signatures": [ - { - "id": 12, - "name": "fakePrivateFunction", - "kind": 4096, - "kindString": "Call signature", - "flags": { - "isPrivate": true, - "isExported": true - }, - "comment": { - "shortText": "A function that is made private via comment." - }, - "type": { - "type": "intrinsic", - "name": "void" - } - } - ], - "sources": [ - { - "fileName": "access.ts", - "line": 17, - "character": 35 - } - ] - }, - { - "id": 13, - "name": "fakeProtectedFunction", - "kind": 64, - "kindString": "Function", - "flags": { - "isProtected": true, - "isExported": true - }, - "signatures": [ - { - "id": 14, - "name": "fakeProtectedFunction", - "kind": 4096, - "kindString": "Call signature", - "flags": { - "isProtected": true, - "isExported": true - }, - "comment": { - "shortText": "A function that is made protected via comment." - }, - "type": { - "type": "intrinsic", - "name": "void" - } - } - ], - "sources": [ - { - "fileName": "access.ts", - "line": 23, - "character": 37 - } - ] - } - ], - "groups": [ - { - "title": "Classes", - "kind": 128, - "children": [ - 2 - ] - }, - { - "title": "Variables", - "kind": 32, - "children": [ - 9, - 10 - ] - }, - { - "title": "Functions", - "kind": 64, - "children": [ - 11, - 13 - ] - } - ], - "sources": [ - { - "fileName": "access.ts", - "line": 1, - "character": 0 - } - ] - } - ], - "groups": [ - { - "title": "External modules", - "kind": 1, - "children": [ - 1 - ] - } - ] -} \ No newline at end of file diff --git a/src/test/converter/alias/specs.json b/src/test/converter/alias/specs.json index 0009bdc42..cb302bdae 100644 --- a/src/test/converter/alias/specs.json +++ b/src/test/converter/alias/specs.json @@ -61,6 +61,39 @@ ], "type": { "type": "indexedAccess", + "indexType": { + "type": "conditional", + "checkType": { + "type": "indexedAccess", + "indexType": { + "type": "stringLiteral", + "value": "length" + }, + "objectType": { + "type": "typeParameter", + "name": "T", + "constraint": { + "type": "array", + "elementType": { + "type": "intrinsic", + "name": "any" + } + } + } + }, + "extendsType": { + "type": "unknown", + "name": "0" + }, + "trueType": { + "type": "unknown", + "name": "0" + }, + "falseType": { + "type": "unknown", + "name": "1" + } + }, "objectType": { "type": "reflection", "declaration": { @@ -109,12 +142,10 @@ ], "type": { "type": "reference", - "name": "HorribleRecursiveTypeThatShouldNotBeUsedByAnyone", "id": 22, "typeArguments": [ { "type": "reference", - "name": "PopFront", "id": 13, "typeArguments": [ { @@ -128,7 +159,8 @@ } } } - ] + ], + "name": "PopFront" }, { "type": "reflection", @@ -149,7 +181,8 @@ ] } } - ] + ], + "name": "HorribleRecursiveTypeThatShouldNotBeUsedByAnyone" } } ], @@ -171,39 +204,6 @@ } ] } - }, - "indexType": { - "type": "conditional", - "checkType": { - "type": "indexedAccess", - "objectType": { - "type": "typeParameter", - "name": "T", - "constraint": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "any" - } - } - }, - "indexType": { - "type": "stringLiteral", - "value": "length" - } - }, - "extendsType": { - "type": "unknown", - "name": "0" - }, - "trueType": { - "type": "unknown", - "name": "0" - }, - "falseType": { - "type": "unknown", - "name": "1" - } } } }, @@ -461,13 +461,13 @@ }, "extendsType": { "type": "reference", - "name": "PromiseLike", "typeArguments": [ { "type": "inferred", "name": "U" } - ] + ], + "name": "PromiseLike" }, "trueType": { "type": "typeParameter", diff --git a/src/test/converter/category/category.ts b/src/test/converter/category/category.ts deleted file mode 100644 index bc3e43d01..000000000 --- a/src/test/converter/category/category.ts +++ /dev/null @@ -1,115 +0,0 @@ -/** - * TestClass comment short text. - * - * TestClass comment text. - * - * @see [[TestClass]] @ fixtures - * @category Test - */ -export class TestClass { - - /** - * publicProperty short text. - * @category Test - */ - public publicProperty: string; - - /** - * privateProperty short text. - */ - private privateProperty: number[]; - - /** - * privateProperty short text. - */ - static staticProperty: TestClass; - - /** - * Constructor short text. - */ - constructor() { } - - /** - * publicMethod short text. - * @category Test - */ - public publicMethod() {} - - /** - * protectedMethod short text. - * @category Test - */ - protected protectedMethod() {} - - /** - * privateMethod short text. - */ - private privateMethod() {} - - /** - * staticMethod short text. - */ - static staticMethod() {} -} - -export class TestSubClass extends TestClass { - /** - * publicMethod short text. - */ - public publicMethod() {} - - /** - * protectedMethod short text. - */ - protected protectedMethod() {} - - /** - * Constructor short text. - * - * @param p1 Constructor param - * @param p2 Private string property - * @param p3 Public number property - * @param p4 Public implicit any property - */ - constructor(p1, private p2: string, public p3: number, public p4) { - super(); - } -} - -export abstract class TestAbstractClass { - abstract myAbstractProperty: string; - - protected abstract myAbstractMethod(): void; -} - -export class TestAbstractClassImplementation extends TestAbstractClass { - myAbstractProperty: string; - - protected myAbstractMethod(): void { } -} - -export interface TestSubClass { - /** - * mergedMethod short text. - */ - mergedMethod(); -} - -export module TestSubClass { - /** - * staticMergedMethod short text. - */ - export function staticMergedMethod() { } -} - -/** - * This class will not appear when `excludeNotExported=true` - */ -abstract class NotExportedClass { - /** - * Adds two numbers - */ - add(a: number, b: number) { - a + b; - } -} diff --git a/src/test/converter/category/specs-with-lump-categories.json b/src/test/converter/category/specs-with-lump-categories.json deleted file mode 100644 index 356922611..000000000 --- a/src/test/converter/category/specs-with-lump-categories.json +++ /dev/null @@ -1,1232 +0,0 @@ -{ - "id": 0, - "name": "typedoc", - "kind": 0, - "flags": {}, - "children": [ - { - "id": 1, - "name": "\"category\"", - "kind": 1, - "kindString": "External module", - "flags": { - "isExported": true - }, - "originalName": "%BASE%/category/category.ts", - "children": [ - { - "id": 44, - "name": "NotExportedClass", - "kind": 128, - "kindString": "Class", - "flags": { - "isAbstract": true - }, - "comment": { - "shortText": "This class will not appear when `excludeNotExported=true`" - }, - "children": [ - { - "id": 45, - "name": "add", - "kind": 2048, - "kindString": "Method", - "flags": {}, - "signatures": [ - { - "id": 46, - "name": "add", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "comment": { - "shortText": "Adds two numbers" - }, - "parameters": [ - { - "id": 47, - "name": "a", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 48, - "name": "b", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "type": { - "type": "intrinsic", - "name": "void" - } - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 112, - "character": 7 - } - ] - } - ], - "groups": [ - { - "title": "Methods", - "kind": 2048, - "children": [ - 45 - ] - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 108, - "character": 31 - } - ] - }, - { - "id": 34, - "name": "TestAbstractClass", - "kind": 128, - "kindString": "Class", - "flags": { - "isExported": true, - "isAbstract": true - }, - "children": [ - { - "id": 35, - "name": "myAbstractProperty", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true, - "isAbstract": true - }, - "sources": [ - { - "fileName": "category.ts", - "line": 80, - "character": 31 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 36, - "name": "myAbstractMethod", - "kind": 2048, - "kindString": "Method", - "flags": { - "isProtected": true, - "isExported": true, - "isAbstract": true - }, - "signatures": [ - { - "id": 37, - "name": "myAbstractMethod", - "kind": 4096, - "kindString": "Call signature", - "flags": { - "isExported": true - }, - "type": { - "type": "intrinsic", - "name": "void" - } - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 82, - "character": 39 - } - ] - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [ - 35 - ] - }, - { - "title": "Methods", - "kind": 2048, - "children": [ - 36 - ] - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 79, - "character": 39 - } - ], - "extendedBy": [ - { - "type": "reference", - "name": "TestAbstractClassImplementation", - "id": 38 - } - ] - }, - { - "id": 38, - "name": "TestAbstractClassImplementation", - "kind": 128, - "kindString": "Class", - "flags": { - "isExported": true - }, - "children": [ - { - "id": 39, - "name": "myAbstractProperty", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "category.ts", - "line": 86, - "character": 22 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - }, - "overwrites": { - "type": "reference", - "name": "TestAbstractClass.myAbstractProperty", - "id": 35 - } - }, - { - "id": 40, - "name": "myAbstractMethod", - "kind": 2048, - "kindString": "Method", - "flags": { - "isProtected": true, - "isExported": true - }, - "signatures": [ - { - "id": 41, - "name": "myAbstractMethod", - "kind": 4096, - "kindString": "Call signature", - "flags": { - "isExported": true - }, - "type": { - "type": "intrinsic", - "name": "void" - }, - "overwrites": { - "type": "reference", - "name": "TestAbstractClass.myAbstractMethod", - "id": 36 - } - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 88, - "character": 30 - } - ], - "overwrites": { - "type": "reference", - "name": "TestAbstractClass.myAbstractMethod", - "id": 36 - } - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [ - 39 - ] - }, - { - "title": "Methods", - "kind": 2048, - "children": [ - 40 - ] - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 85, - "character": 44 - } - ], - "extendedTypes": [ - { - "type": "reference", - "name": "TestAbstractClass", - "id": 34 - } - ] - }, - { - "id": 2, - "name": "TestClass", - "kind": 128, - "kindString": "Class", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "TestClass comment short text.", - "text": "TestClass comment text.\n", - "tags": [ - { - "tag": "see", - "text": "[[TestClass]] @ fixtures" - } - ] - }, - "children": [ - { - "id": 6, - "name": "constructor", - "kind": 512, - "kindString": "Constructor", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "Constructor short text." - }, - "signatures": [ - { - "id": 7, - "name": "new TestClass", - "kind": 16384, - "kindString": "Constructor signature", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "Constructor short text." - }, - "type": { - "type": "reference", - "name": "TestClass", - "id": 2 - } - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 25, - "character": 37 - } - ] - }, - { - "id": 4, - "name": "privateProperty", - "kind": 1024, - "kindString": "Property", - "flags": { - "isPrivate": true, - "isExported": true - }, - "comment": { - "shortText": "privateProperty short text." - }, - "sources": [ - { - "fileName": "category.ts", - "line": 20, - "character": 27 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "number" - } - } - }, - { - "id": 3, - "name": "publicProperty", - "kind": 1024, - "kindString": "Property", - "flags": { - "isPublic": true, - "isExported": true - }, - "comment": { - "shortText": "publicProperty short text." - }, - "sources": [ - { - "fileName": "category.ts", - "line": 15, - "character": 25 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 5, - "name": "staticProperty", - "kind": 1024, - "kindString": "Property", - "flags": { - "isStatic": true, - "isExported": true - }, - "comment": { - "shortText": "privateProperty short text." - }, - "sources": [ - { - "fileName": "category.ts", - "line": 25, - "character": 25 - } - ], - "type": { - "type": "reference", - "name": "TestClass", - "id": 2 - } - }, - { - "id": 12, - "name": "privateMethod", - "kind": 2048, - "kindString": "Method", - "flags": { - "isPrivate": true, - "isExported": true - }, - "signatures": [ - { - "id": 13, - "name": "privateMethod", - "kind": 4096, - "kindString": "Call signature", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "privateMethod short text." - }, - "type": { - "type": "intrinsic", - "name": "void" - } - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 47, - "character": 25 - } - ] - }, - { - "id": 10, - "name": "protectedMethod", - "kind": 2048, - "kindString": "Method", - "flags": { - "isProtected": true, - "isExported": true - }, - "signatures": [ - { - "id": 11, - "name": "protectedMethod", - "kind": 4096, - "kindString": "Call signature", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "protectedMethod short text." - }, - "type": { - "type": "intrinsic", - "name": "void" - } - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 42, - "character": 29 - } - ] - }, - { - "id": 8, - "name": "publicMethod", - "kind": 2048, - "kindString": "Method", - "flags": { - "isPublic": true, - "isExported": true - }, - "signatures": [ - { - "id": 9, - "name": "publicMethod", - "kind": 4096, - "kindString": "Call signature", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "publicMethod short text." - }, - "type": { - "type": "intrinsic", - "name": "void" - } - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 36, - "character": 23 - } - ] - }, - { - "id": 14, - "name": "staticMethod", - "kind": 2048, - "kindString": "Method", - "flags": { - "isStatic": true, - "isExported": true - }, - "signatures": [ - { - "id": 15, - "name": "staticMethod", - "kind": 4096, - "kindString": "Call signature", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "staticMethod short text." - }, - "type": { - "type": "intrinsic", - "name": "void" - } - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 52, - "character": 23 - } - ] - } - ], - "groups": [ - { - "title": "Constructors", - "kind": 512, - "children": [ - 6 - ] - }, - { - "title": "Properties", - "kind": 1024, - "children": [ - 4, - 3, - 5 - ] - }, - { - "title": "Methods", - "kind": 2048, - "children": [ - 12, - 10, - 8, - 14 - ] - } - ], - "categories": [ - { - "title": "Other", - "children": [ - 6, - 4, - 5, - 12, - 14 - ] - }, - { - "title": "Test", - "children": [ - 3, - 10, - 8 - ] - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 9, - "character": 22 - } - ], - "extendedBy": [ - { - "type": "reference", - "name": "TestSubClass", - "id": 16 - } - ] - }, - { - "id": 16, - "name": "TestSubClass", - "kind": 128, - "kindString": "Class", - "flags": { - "isExported": true - }, - "children": [ - { - "id": 21, - "name": "constructor", - "kind": 512, - "kindString": "Constructor", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "Constructor short text." - }, - "signatures": [ - { - "id": 25, - "name": "new TestSubClass", - "kind": 16384, - "kindString": "Constructor signature", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "Constructor short text." - }, - "parameters": [ - { - "id": 26, - "name": "p1", - "kind": 32768, - "kindString": "Parameter", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "Constructor param" - }, - "type": { - "type": "intrinsic", - "name": "any" - } - }, - { - "id": 27, - "name": "p2", - "kind": 32768, - "kindString": "Parameter", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "Private string property" - }, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 28, - "name": "p3", - "kind": 32768, - "kindString": "Parameter", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "Public number property" - }, - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 29, - "name": "p4", - "kind": 32768, - "kindString": "Parameter", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "Public implicit any property\n" - }, - "type": { - "type": "intrinsic", - "name": "any" - } - } - ], - "type": { - "type": "reference", - "name": "TestSubClass", - "id": 16 - }, - "overwrites": { - "type": "reference", - "name": "TestClass.__constructor", - "id": 6 - } - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 64, - "character": 34 - } - ], - "overwrites": { - "type": "reference", - "name": "TestClass.__constructor", - "id": 6 - } - }, - { - "id": 22, - "name": "p2", - "kind": 1024, - "kindString": "Property", - "flags": { - "isPrivate": true, - "isExported": true, - "isConstructorProperty": true - }, - "comment": { - "shortText": "Private string property" - }, - "sources": [ - { - "fileName": "category.ts", - "line": 74, - "character": 30 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 23, - "name": "p3", - "kind": 1024, - "kindString": "Property", - "flags": { - "isPublic": true, - "isExported": true, - "isConstructorProperty": true - }, - "comment": { - "shortText": "Public number property" - }, - "sources": [ - { - "fileName": "category.ts", - "line": 74, - "character": 49 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 24, - "name": "p4", - "kind": 1024, - "kindString": "Property", - "flags": { - "isPublic": true, - "isExported": true, - "isConstructorProperty": true - }, - "comment": { - "shortText": "Public implicit any property\n" - }, - "sources": [ - { - "fileName": "category.ts", - "line": 74, - "character": 68 - } - ], - "type": { - "type": "intrinsic", - "name": "any" - } - }, - { - "id": 30, - "name": "publicProperty", - "kind": 1024, - "kindString": "Property", - "flags": { - "isPublic": true, - "isExported": true - }, - "comment": { - "shortText": "publicProperty short text." - }, - "sources": [ - { - "fileName": "category.ts", - "line": 15, - "character": 25 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - }, - "inheritedFrom": { - "type": "reference", - "name": "TestClass.publicProperty", - "id": 3 - } - }, - { - "id": 31, - "name": "staticProperty", - "kind": 1024, - "kindString": "Property", - "flags": { - "isStatic": true, - "isExported": true - }, - "comment": { - "shortText": "privateProperty short text." - }, - "sources": [ - { - "fileName": "category.ts", - "line": 25, - "character": 25 - } - ], - "type": { - "type": "reference", - "name": "TestClass", - "id": 2 - }, - "inheritedFrom": { - "type": "reference", - "name": "TestClass.staticProperty", - "id": 5 - } - }, - { - "id": 42, - "name": "mergedMethod", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true - }, - "signatures": [ - { - "id": 43, - "name": "mergedMethod", - "kind": 4096, - "kindString": "Call signature", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "mergedMethod short text." - }, - "type": { - "type": "intrinsic", - "name": "any" - } - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 95, - "character": 16 - } - ] - }, - { - "id": 19, - "name": "protectedMethod", - "kind": 2048, - "kindString": "Method", - "flags": { - "isProtected": true, - "isExported": true - }, - "signatures": [ - { - "id": 20, - "name": "protectedMethod", - "kind": 4096, - "kindString": "Call signature", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "protectedMethod short text." - }, - "type": { - "type": "intrinsic", - "name": "void" - }, - "overwrites": { - "type": "reference", - "name": "TestClass.protectedMethod", - "id": 10 - } - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 64, - "character": 29 - } - ], - "overwrites": { - "type": "reference", - "name": "TestClass.protectedMethod", - "id": 10 - } - }, - { - "id": 17, - "name": "publicMethod", - "kind": 2048, - "kindString": "Method", - "flags": { - "isPublic": true, - "isExported": true - }, - "signatures": [ - { - "id": 18, - "name": "publicMethod", - "kind": 4096, - "kindString": "Call signature", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "publicMethod short text." - }, - "type": { - "type": "intrinsic", - "name": "void" - }, - "overwrites": { - "type": "reference", - "name": "TestClass.publicMethod", - "id": 8 - } - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 59, - "character": 23 - } - ], - "overwrites": { - "type": "reference", - "name": "TestClass.publicMethod", - "id": 8 - } - }, - { - "id": 49, - "name": "staticMergedMethod", - "kind": 2048, - "kindString": "Method", - "flags": { - "isStatic": true, - "isExported": true - }, - "signatures": [ - { - "id": 50, - "name": "staticMergedMethod", - "kind": 4096, - "kindString": "Call signature", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "staticMergedMethod short text." - }, - "type": { - "type": "intrinsic", - "name": "void" - } - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 102, - "character": 38 - } - ] - }, - { - "id": 32, - "name": "staticMethod", - "kind": 2048, - "kindString": "Method", - "flags": { - "isStatic": true, - "isExported": true - }, - "signatures": [ - { - "id": 33, - "name": "staticMethod", - "kind": 4096, - "kindString": "Call signature", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "staticMethod short text." - }, - "type": { - "type": "intrinsic", - "name": "void" - }, - "inheritedFrom": { - "type": "reference", - "name": "TestClass.staticMethod", - "id": 14 - } - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 52, - "character": 23 - } - ], - "inheritedFrom": { - "type": "reference", - "name": "TestClass.staticMethod", - "id": 14 - } - } - ], - "groups": [ - { - "title": "Constructors", - "kind": 512, - "children": [ - 21 - ] - }, - { - "title": "Properties", - "kind": 1024, - "children": [ - 22, - 23, - 24, - 30, - 31 - ] - }, - { - "title": "Methods", - "kind": 2048, - "children": [ - 42, - 19, - 17, - 49, - 32 - ] - } - ], - "categories": [ - { - "title": "Other", - "children": [ - 21, - 22, - 23, - 24, - 31, - 42, - 19, - 17, - 49, - 32 - ] - }, - { - "title": "Test", - "children": [ - 30 - ] - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 55, - "character": 25 - }, - { - "fileName": "category.ts", - "line": 91, - "character": 29 - }, - { - "fileName": "category.ts", - "line": 98, - "character": 26 - } - ], - "extendedTypes": [ - { - "type": "reference", - "name": "TestClass", - "id": 2 - } - ] - } - ], - "groups": [ - { - "title": "Classes", - "kind": 128, - "children": [ - 44, - 34, - 38, - 2, - 16 - ] - } - ], - "categories": [ - { - "title": "Other", - "children": [ - 44, - 34, - 38, - 16 - ] - }, - { - "title": "Test", - "children": [ - 2 - ] - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 1, - "character": 0 - } - ] - } - ], - "groups": [ - { - "title": "External modules", - "kind": 1, - "children": [ - 1 - ] - } - ] -} \ No newline at end of file diff --git a/src/test/converter/category/specs.json b/src/test/converter/category/specs.json deleted file mode 100644 index 05e28f8f7..000000000 --- a/src/test/converter/category/specs.json +++ /dev/null @@ -1,1237 +0,0 @@ -{ - "id": 0, - "name": "typedoc", - "kind": 0, - "flags": {}, - "children": [ - { - "id": 1, - "name": "\"category\"", - "kind": 1, - "kindString": "External module", - "flags": { - "isExported": true - }, - "originalName": "%BASE%/category/category.ts", - "children": [ - { - "id": 44, - "name": "NotExportedClass", - "kind": 128, - "kindString": "Class", - "flags": { - "isAbstract": true - }, - "comment": { - "shortText": "This class will not appear when `excludeNotExported=true`" - }, - "children": [ - { - "id": 45, - "name": "add", - "kind": 2048, - "kindString": "Method", - "flags": {}, - "signatures": [ - { - "id": 46, - "name": "add", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "comment": { - "shortText": "Adds two numbers" - }, - "parameters": [ - { - "id": 47, - "name": "a", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 48, - "name": "b", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "type": { - "type": "intrinsic", - "name": "void" - } - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 112, - "character": 7 - } - ] - } - ], - "groups": [ - { - "title": "Methods", - "kind": 2048, - "children": [ - 45 - ] - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 108, - "character": 31 - } - ] - }, - { - "id": 34, - "name": "TestAbstractClass", - "kind": 128, - "kindString": "Class", - "flags": { - "isExported": true, - "isAbstract": true - }, - "children": [ - { - "id": 35, - "name": "myAbstractProperty", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true, - "isAbstract": true - }, - "sources": [ - { - "fileName": "category.ts", - "line": 80, - "character": 31 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 36, - "name": "myAbstractMethod", - "kind": 2048, - "kindString": "Method", - "flags": { - "isProtected": true, - "isExported": true, - "isAbstract": true - }, - "signatures": [ - { - "id": 37, - "name": "myAbstractMethod", - "kind": 4096, - "kindString": "Call signature", - "flags": { - "isExported": true - }, - "type": { - "type": "intrinsic", - "name": "void" - } - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 82, - "character": 39 - } - ] - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [ - 35 - ] - }, - { - "title": "Methods", - "kind": 2048, - "children": [ - 36 - ] - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 79, - "character": 39 - } - ], - "extendedBy": [ - { - "type": "reference", - "name": "TestAbstractClassImplementation", - "id": 38 - } - ] - }, - { - "id": 38, - "name": "TestAbstractClassImplementation", - "kind": 128, - "kindString": "Class", - "flags": { - "isExported": true - }, - "children": [ - { - "id": 39, - "name": "myAbstractProperty", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "category.ts", - "line": 86, - "character": 22 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - }, - "overwrites": { - "type": "reference", - "name": "TestAbstractClass.myAbstractProperty", - "id": 35 - } - }, - { - "id": 40, - "name": "myAbstractMethod", - "kind": 2048, - "kindString": "Method", - "flags": { - "isProtected": true, - "isExported": true - }, - "signatures": [ - { - "id": 41, - "name": "myAbstractMethod", - "kind": 4096, - "kindString": "Call signature", - "flags": { - "isExported": true - }, - "type": { - "type": "intrinsic", - "name": "void" - }, - "overwrites": { - "type": "reference", - "name": "TestAbstractClass.myAbstractMethod", - "id": 36 - } - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 88, - "character": 30 - } - ], - "overwrites": { - "type": "reference", - "name": "TestAbstractClass.myAbstractMethod", - "id": 36 - } - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [ - 39 - ] - }, - { - "title": "Methods", - "kind": 2048, - "children": [ - 40 - ] - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 85, - "character": 44 - } - ], - "extendedTypes": [ - { - "type": "reference", - "name": "TestAbstractClass", - "id": 34 - } - ] - }, - { - "id": 2, - "name": "TestClass", - "kind": 128, - "kindString": "Class", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "TestClass comment short text.", - "text": "TestClass comment text.\n", - "tags": [ - { - "tag": "see", - "text": "[[TestClass]] @ fixtures" - } - ] - }, - "children": [ - { - "id": 6, - "name": "constructor", - "kind": 512, - "kindString": "Constructor", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "Constructor short text." - }, - "signatures": [ - { - "id": 7, - "name": "new TestClass", - "kind": 16384, - "kindString": "Constructor signature", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "Constructor short text." - }, - "type": { - "type": "reference", - "name": "TestClass", - "id": 2 - } - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 25, - "character": 37 - } - ] - }, - { - "id": 4, - "name": "privateProperty", - "kind": 1024, - "kindString": "Property", - "flags": { - "isPrivate": true, - "isExported": true - }, - "comment": { - "shortText": "privateProperty short text." - }, - "sources": [ - { - "fileName": "category.ts", - "line": 20, - "character": 27 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "number" - } - } - }, - { - "id": 3, - "name": "publicProperty", - "kind": 1024, - "kindString": "Property", - "flags": { - "isPublic": true, - "isExported": true - }, - "comment": { - "shortText": "publicProperty short text." - }, - "sources": [ - { - "fileName": "category.ts", - "line": 15, - "character": 25 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 5, - "name": "staticProperty", - "kind": 1024, - "kindString": "Property", - "flags": { - "isStatic": true, - "isExported": true - }, - "comment": { - "shortText": "privateProperty short text." - }, - "sources": [ - { - "fileName": "category.ts", - "line": 25, - "character": 25 - } - ], - "type": { - "type": "reference", - "name": "TestClass", - "id": 2 - } - }, - { - "id": 12, - "name": "privateMethod", - "kind": 2048, - "kindString": "Method", - "flags": { - "isPrivate": true, - "isExported": true - }, - "signatures": [ - { - "id": 13, - "name": "privateMethod", - "kind": 4096, - "kindString": "Call signature", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "privateMethod short text." - }, - "type": { - "type": "intrinsic", - "name": "void" - } - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 47, - "character": 25 - } - ] - }, - { - "id": 10, - "name": "protectedMethod", - "kind": 2048, - "kindString": "Method", - "flags": { - "isProtected": true, - "isExported": true - }, - "signatures": [ - { - "id": 11, - "name": "protectedMethod", - "kind": 4096, - "kindString": "Call signature", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "protectedMethod short text." - }, - "type": { - "type": "intrinsic", - "name": "void" - } - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 42, - "character": 29 - } - ] - }, - { - "id": 8, - "name": "publicMethod", - "kind": 2048, - "kindString": "Method", - "flags": { - "isPublic": true, - "isExported": true - }, - "signatures": [ - { - "id": 9, - "name": "publicMethod", - "kind": 4096, - "kindString": "Call signature", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "publicMethod short text." - }, - "type": { - "type": "intrinsic", - "name": "void" - } - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 36, - "character": 23 - } - ] - }, - { - "id": 14, - "name": "staticMethod", - "kind": 2048, - "kindString": "Method", - "flags": { - "isStatic": true, - "isExported": true - }, - "signatures": [ - { - "id": 15, - "name": "staticMethod", - "kind": 4096, - "kindString": "Call signature", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "staticMethod short text." - }, - "type": { - "type": "intrinsic", - "name": "void" - } - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 52, - "character": 23 - } - ] - } - ], - "groups": [ - { - "title": "Constructors", - "kind": 512, - "children": [ - 6 - ] - }, - { - "title": "Properties", - "kind": 1024, - "children": [ - 4, - 3, - 5 - ], - "categories": [ - { - "title": "Other", - "children": [ - 4, - 5 - ] - }, - { - "title": "Test", - "children": [ - 3 - ] - } - ] - }, - { - "title": "Methods", - "kind": 2048, - "children": [ - 12, - 10, - 8, - 14 - ], - "categories": [ - { - "title": "Other", - "children": [ - 12, - 14 - ] - }, - { - "title": "Test", - "children": [ - 10, - 8 - ] - } - ] - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 9, - "character": 22 - } - ], - "extendedBy": [ - { - "type": "reference", - "name": "TestSubClass", - "id": 16 - } - ] - }, - { - "id": 16, - "name": "TestSubClass", - "kind": 128, - "kindString": "Class", - "flags": { - "isExported": true - }, - "children": [ - { - "id": 21, - "name": "constructor", - "kind": 512, - "kindString": "Constructor", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "Constructor short text." - }, - "signatures": [ - { - "id": 25, - "name": "new TestSubClass", - "kind": 16384, - "kindString": "Constructor signature", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "Constructor short text." - }, - "parameters": [ - { - "id": 26, - "name": "p1", - "kind": 32768, - "kindString": "Parameter", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "Constructor param" - }, - "type": { - "type": "intrinsic", - "name": "any" - } - }, - { - "id": 27, - "name": "p2", - "kind": 32768, - "kindString": "Parameter", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "Private string property" - }, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 28, - "name": "p3", - "kind": 32768, - "kindString": "Parameter", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "Public number property" - }, - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 29, - "name": "p4", - "kind": 32768, - "kindString": "Parameter", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "Public implicit any property\n" - }, - "type": { - "type": "intrinsic", - "name": "any" - } - } - ], - "type": { - "type": "reference", - "name": "TestSubClass", - "id": 16 - }, - "overwrites": { - "type": "reference", - "name": "TestClass.__constructor", - "id": 6 - } - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 64, - "character": 34 - } - ], - "overwrites": { - "type": "reference", - "name": "TestClass.__constructor", - "id": 6 - } - }, - { - "id": 22, - "name": "p2", - "kind": 1024, - "kindString": "Property", - "flags": { - "isPrivate": true, - "isExported": true, - "isConstructorProperty": true - }, - "comment": { - "shortText": "Private string property" - }, - "sources": [ - { - "fileName": "category.ts", - "line": 74, - "character": 30 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 23, - "name": "p3", - "kind": 1024, - "kindString": "Property", - "flags": { - "isPublic": true, - "isExported": true, - "isConstructorProperty": true - }, - "comment": { - "shortText": "Public number property" - }, - "sources": [ - { - "fileName": "category.ts", - "line": 74, - "character": 49 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 24, - "name": "p4", - "kind": 1024, - "kindString": "Property", - "flags": { - "isPublic": true, - "isExported": true, - "isConstructorProperty": true - }, - "comment": { - "shortText": "Public implicit any property\n" - }, - "sources": [ - { - "fileName": "category.ts", - "line": 74, - "character": 68 - } - ], - "type": { - "type": "intrinsic", - "name": "any" - } - }, - { - "id": 30, - "name": "publicProperty", - "kind": 1024, - "kindString": "Property", - "flags": { - "isPublic": true, - "isExported": true - }, - "comment": { - "shortText": "publicProperty short text." - }, - "sources": [ - { - "fileName": "category.ts", - "line": 15, - "character": 25 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - }, - "inheritedFrom": { - "type": "reference", - "name": "TestClass.publicProperty", - "id": 3 - } - }, - { - "id": 31, - "name": "staticProperty", - "kind": 1024, - "kindString": "Property", - "flags": { - "isStatic": true, - "isExported": true - }, - "comment": { - "shortText": "privateProperty short text." - }, - "sources": [ - { - "fileName": "category.ts", - "line": 25, - "character": 25 - } - ], - "type": { - "type": "reference", - "name": "TestClass", - "id": 2 - }, - "inheritedFrom": { - "type": "reference", - "name": "TestClass.staticProperty", - "id": 5 - } - }, - { - "id": 42, - "name": "mergedMethod", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true - }, - "signatures": [ - { - "id": 43, - "name": "mergedMethod", - "kind": 4096, - "kindString": "Call signature", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "mergedMethod short text." - }, - "type": { - "type": "intrinsic", - "name": "any" - } - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 95, - "character": 16 - } - ] - }, - { - "id": 19, - "name": "protectedMethod", - "kind": 2048, - "kindString": "Method", - "flags": { - "isProtected": true, - "isExported": true - }, - "signatures": [ - { - "id": 20, - "name": "protectedMethod", - "kind": 4096, - "kindString": "Call signature", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "protectedMethod short text." - }, - "type": { - "type": "intrinsic", - "name": "void" - }, - "overwrites": { - "type": "reference", - "name": "TestClass.protectedMethod", - "id": 10 - } - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 64, - "character": 29 - } - ], - "overwrites": { - "type": "reference", - "name": "TestClass.protectedMethod", - "id": 10 - } - }, - { - "id": 17, - "name": "publicMethod", - "kind": 2048, - "kindString": "Method", - "flags": { - "isPublic": true, - "isExported": true - }, - "signatures": [ - { - "id": 18, - "name": "publicMethod", - "kind": 4096, - "kindString": "Call signature", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "publicMethod short text." - }, - "type": { - "type": "intrinsic", - "name": "void" - }, - "overwrites": { - "type": "reference", - "name": "TestClass.publicMethod", - "id": 8 - } - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 59, - "character": 23 - } - ], - "overwrites": { - "type": "reference", - "name": "TestClass.publicMethod", - "id": 8 - } - }, - { - "id": 49, - "name": "staticMergedMethod", - "kind": 2048, - "kindString": "Method", - "flags": { - "isStatic": true, - "isExported": true - }, - "signatures": [ - { - "id": 50, - "name": "staticMergedMethod", - "kind": 4096, - "kindString": "Call signature", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "staticMergedMethod short text." - }, - "type": { - "type": "intrinsic", - "name": "void" - } - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 102, - "character": 38 - } - ] - }, - { - "id": 32, - "name": "staticMethod", - "kind": 2048, - "kindString": "Method", - "flags": { - "isStatic": true, - "isExported": true - }, - "signatures": [ - { - "id": 33, - "name": "staticMethod", - "kind": 4096, - "kindString": "Call signature", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "staticMethod short text." - }, - "type": { - "type": "intrinsic", - "name": "void" - }, - "inheritedFrom": { - "type": "reference", - "name": "TestClass.staticMethod", - "id": 14 - } - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 52, - "character": 23 - } - ], - "inheritedFrom": { - "type": "reference", - "name": "TestClass.staticMethod", - "id": 14 - } - } - ], - "groups": [ - { - "title": "Constructors", - "kind": 512, - "children": [ - 21 - ] - }, - { - "title": "Properties", - "kind": 1024, - "children": [ - 22, - 23, - 24, - 30, - 31 - ], - "categories": [ - { - "title": "Other", - "children": [ - 22, - 23, - 24, - 31 - ] - }, - { - "title": "Test", - "children": [ - 30 - ] - } - ] - }, - { - "title": "Methods", - "kind": 2048, - "children": [ - 42, - 19, - 17, - 49, - 32 - ] - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 55, - "character": 25 - }, - { - "fileName": "category.ts", - "line": 91, - "character": 29 - }, - { - "fileName": "category.ts", - "line": 98, - "character": 26 - } - ], - "extendedTypes": [ - { - "type": "reference", - "name": "TestClass", - "id": 2 - } - ] - } - ], - "groups": [ - { - "title": "Classes", - "kind": 128, - "children": [ - 44, - 34, - 38, - 2, - 16 - ], - "categories": [ - { - "title": "Other", - "children": [ - 44, - 34, - 38, - 16 - ] - }, - { - "title": "Test", - "children": [ - 2 - ] - } - ] - } - ], - "sources": [ - { - "fileName": "category.ts", - "line": 1, - "character": 0 - } - ] - } - ], - "groups": [ - { - "title": "External modules", - "kind": 1, - "children": [ - 1 - ] - } - ] -} \ No newline at end of file diff --git a/src/test/converter/access/access.ts b/src/test/converter/class/access.ts similarity index 90% rename from src/test/converter/access/access.ts rename to src/test/converter/class/access.ts index 929ce3412..bb01847d0 100644 --- a/src/test/converter/access/access.ts +++ b/src/test/converter/class/access.ts @@ -26,19 +26,18 @@ export function fakeProtectedFunction() {} * A class that is documented as being private. * @private */ -export class PrivateClass -{ +export class PrivateClass { /** * A variable that is made private via comment. * @private */ - fakePrivateVariable:string; + fakePrivateVariable: string; /** * A variable that is made protected via comment. * @protected */ - fakeProtectedVariable:string; + fakeProtectedVariable: string; /** * A function that is made private via comment. diff --git a/src/test/converter/class/class.ts b/src/test/converter/class/class.ts index 9347b27de..a86a8a387 100644 --- a/src/test/converter/class/class.ts +++ b/src/test/converter/class/class.ts @@ -29,11 +29,13 @@ export class TestClass { /** * publicMethod short text. + * @category Test */ public publicMethod() {} /** * protectedMethod short text. + * @category Test */ protected protectedMethod() {} diff --git a/src/test/converter/clodule-with-subclass/clodule-with-subclass.ts b/src/test/converter/class/clodule-with-subclass.ts similarity index 100% rename from src/test/converter/clodule-with-subclass/clodule-with-subclass.ts rename to src/test/converter/class/clodule-with-subclass.ts diff --git a/src/test/converter/constructor-properties/constructor-properties.ts b/src/test/converter/class/constructor-properties.ts similarity index 100% rename from src/test/converter/constructor-properties/constructor-properties.ts rename to src/test/converter/class/constructor-properties.ts diff --git a/src/test/converter/decorators/decorators.ts b/src/test/converter/class/decorators.ts similarity index 98% rename from src/test/converter/decorators/decorators.ts rename to src/test/converter/class/decorators.ts index a876d2814..88e105baf 100644 --- a/src/test/converter/decorators/decorators.ts +++ b/src/test/converter/class/decorators.ts @@ -42,4 +42,5 @@ function decoratorWithOptions(options: {name: string}): ClassDecorator { (target as any).options = options; }; } -export {} + +export {}; diff --git a/src/test/converter/events-overloads/events-overloads.ts b/src/test/converter/class/events-overloads.ts similarity index 100% rename from src/test/converter/events-overloads/events-overloads.ts rename to src/test/converter/class/events-overloads.ts diff --git a/src/test/converter/events/events.ts b/src/test/converter/class/events.ts similarity index 100% rename from src/test/converter/events/events.ts rename to src/test/converter/class/events.ts diff --git a/src/test/converter/generic-class/generic-class.ts b/src/test/converter/class/generic-class.ts similarity index 100% rename from src/test/converter/generic-class/generic-class.ts rename to src/test/converter/class/generic-class.ts diff --git a/src/test/converter/getter-setter/getter-setter.ts b/src/test/converter/class/getter-setter.ts similarity index 100% rename from src/test/converter/getter-setter/getter-setter.ts rename to src/test/converter/class/getter-setter.ts diff --git a/src/test/converter/class/specs-with-lump-categories.json b/src/test/converter/class/specs-with-lump-categories.json new file mode 100644 index 000000000..f63eac446 --- /dev/null +++ b/src/test/converter/class/specs-with-lump-categories.json @@ -0,0 +1,4167 @@ +{ + "id": 0, + "name": "typedoc", + "kind": 0, + "flags": {}, + "children": [ + { + "id": 1, + "name": "\"access\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/class/access.ts", + "children": [ + { + "id": 2, + "name": "PrivateClass", + "kind": 128, + "kindString": "Class", + "flags": { + "isPrivate": true, + "isExported": true + }, + "comment": { + "shortText": "A class that is documented as being private." + }, + "children": [ + { + "id": 3, + "name": "fakePrivateVariable", + "kind": 1024, + "kindString": "Property", + "flags": { + "isPrivate": true, + "isExported": true + }, + "comment": { + "shortText": "A variable that is made private via comment." + }, + "sources": [ + { + "fileName": "access.ts", + "line": 34, + "character": 23 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 4, + "name": "fakeProtectedVariable", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true, + "isExported": true + }, + "comment": { + "shortText": "A variable that is made protected via comment." + }, + "sources": [ + { + "fileName": "access.ts", + "line": 40, + "character": 25 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 5, + "name": "fakePrivateFunction", + "kind": 2048, + "kindString": "Method", + "flags": { + "isPrivate": true, + "isExported": true + }, + "signatures": [ + { + "id": 6, + "name": "fakePrivateFunction", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isPrivate": true, + "isExported": true + }, + "comment": { + "shortText": "A function that is made private via comment." + }, + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "access.ts", + "line": 46, + "character": 23 + } + ] + }, + { + "id": 7, + "name": "fakeProtectedFunction", + "kind": 2048, + "kindString": "Method", + "flags": { + "isProtected": true, + "isExported": true + }, + "signatures": [ + { + "id": 8, + "name": "fakeProtectedFunction", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isProtected": true, + "isExported": true + }, + "comment": { + "shortText": "A function that is made protected via comment." + }, + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "access.ts", + "line": 52, + "character": 25 + } + ] + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 3, + 4 + ] + }, + { + "title": "Methods", + "kind": 2048, + "children": [ + 5, + 7 + ] + } + ], + "sources": [ + { + "fileName": "access.ts", + "line": 29, + "character": 25 + } + ] + }, + { + "id": 9, + "name": "fakePrivateVariable", + "kind": 32, + "kindString": "Variable", + "flags": { + "isPrivate": true, + "isExported": true, + "isConst": true + }, + "comment": { + "shortText": "A variable that is made private via comment." + }, + "sources": [ + { + "fileName": "access.ts", + "line": 5, + "character": 32 + } + ], + "type": { + "type": "stringLiteral", + "value": "test" + }, + "defaultValue": "\"test\"" + }, + { + "id": 10, + "name": "fakeProtectedVariable", + "kind": 32, + "kindString": "Variable", + "flags": { + "isProtected": true, + "isExported": true, + "isConst": true + }, + "comment": { + "shortText": "A variable that is made protected via comment." + }, + "sources": [ + { + "fileName": "access.ts", + "line": 11, + "character": 34 + } + ], + "type": { + "type": "stringLiteral", + "value": "test" + }, + "defaultValue": "\"test\"" + }, + { + "id": 11, + "name": "fakePrivateFunction", + "kind": 64, + "kindString": "Function", + "flags": { + "isPrivate": true, + "isExported": true + }, + "signatures": [ + { + "id": 12, + "name": "fakePrivateFunction", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isPrivate": true, + "isExported": true + }, + "comment": { + "shortText": "A function that is made private via comment." + }, + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "access.ts", + "line": 17, + "character": 35 + } + ] + }, + { + "id": 13, + "name": "fakeProtectedFunction", + "kind": 64, + "kindString": "Function", + "flags": { + "isProtected": true, + "isExported": true + }, + "signatures": [ + { + "id": 14, + "name": "fakeProtectedFunction", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isProtected": true, + "isExported": true + }, + "comment": { + "shortText": "A function that is made protected via comment." + }, + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "access.ts", + "line": 23, + "character": 37 + } + ] + } + ], + "groups": [ + { + "title": "Classes", + "kind": 128, + "children": [ + 2 + ] + }, + { + "title": "Variables", + "kind": 32, + "children": [ + 9, + 10 + ] + }, + { + "title": "Functions", + "kind": 64, + "children": [ + 11, + 13 + ] + } + ], + "sources": [ + { + "fileName": "access.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 15, + "name": "\"class\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/class/class.ts", + "children": [ + { + "id": 67, + "name": "ComputedNames", + "kind": 128, + "kindString": "Class", + "flags": { + "isExported": true + }, + "children": [ + { + "id": 68, + "name": "[Symbol.toStringTag]", + "kind": 1024, + "kindString": "Property", + "flags": { + "isExported": true + }, + "sources": [ + { + "fileName": "class.ts", + "line": 123, + "character": 24 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "defaultValue": "\"computed\"" + }, + { + "id": 69, + "name": "[x]", + "kind": 1024, + "kindString": "Property", + "flags": { + "isExported": true + }, + "sources": [ + { + "fileName": "class.ts", + "line": 124, + "character": 7 + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + }, + "defaultValue": "true" + }, + { + "id": 70, + "name": "literal2", + "kind": 1024, + "kindString": "Property", + "flags": { + "isExported": true + }, + "sources": [ + { + "fileName": "class.ts", + "line": 125, + "character": 16 + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + }, + "defaultValue": "true" + }, + { + "id": 71, + "name": "y", + "kind": 1024, + "kindString": "Property", + "flags": { + "isExported": true + }, + "sources": [ + { + "fileName": "class.ts", + "line": 126, + "character": 5 + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + }, + "defaultValue": "false" + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 68, + 69, + 70, + 71 + ] + } + ], + "sources": [ + { + "fileName": "class.ts", + "line": 122, + "character": 26 + } + ] + }, + { + "id": 62, + "name": "NotExportedClass", + "kind": 128, + "kindString": "Class", + "flags": { + "isAbstract": true + }, + "comment": { + "shortText": "This class will not appear when `excludeNotExported=true`" + }, + "children": [ + { + "id": 63, + "name": "add", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "signatures": [ + { + "id": 64, + "name": "add", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Adds two numbers" + }, + "parameters": [ + { + "id": 65, + "name": "a", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 66, + "name": "b", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "number" + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "class.ts", + "line": 115, + "character": 7 + } + ] + } + ], + "groups": [ + { + "title": "Methods", + "kind": 2048, + "children": [ + 63 + ] + } + ], + "sources": [ + { + "fileName": "class.ts", + "line": 111, + "character": 31 + } + ] + }, + { + "id": 52, + "name": "TestAbstractClass", + "kind": 128, + "kindString": "Class", + "flags": { + "isExported": true, + "isAbstract": true + }, + "children": [ + { + "id": 53, + "name": "myAbstractProperty", + "kind": 1024, + "kindString": "Property", + "flags": { + "isExported": true, + "isAbstract": true + }, + "sources": [ + { + "fileName": "class.ts", + "line": 83, + "character": 31 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 54, + "name": "myAbstractMethod", + "kind": 2048, + "kindString": "Method", + "flags": { + "isProtected": true, + "isExported": true, + "isAbstract": true + }, + "signatures": [ + { + "id": 55, + "name": "myAbstractMethod", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isExported": true + }, + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "class.ts", + "line": 85, + "character": 39 + } + ] + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 53 + ] + }, + { + "title": "Methods", + "kind": 2048, + "children": [ + 54 + ] + } + ], + "sources": [ + { + "fileName": "class.ts", + "line": 82, + "character": 39 + } + ], + "extendedBy": [ + { + "type": "reference", + "id": 56, + "name": "TestAbstractClassImplementation" + } + ] + }, + { + "id": 56, + "name": "TestAbstractClassImplementation", + "kind": 128, + "kindString": "Class", + "flags": { + "isExported": true + }, + "children": [ + { + "id": 57, + "name": "myAbstractProperty", + "kind": 1024, + "kindString": "Property", + "flags": { + "isExported": true + }, + "sources": [ + { + "fileName": "class.ts", + "line": 89, + "character": 22 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "overwrites": { + "type": "reference", + "id": 53, + "name": "TestAbstractClass.myAbstractProperty" + } + }, + { + "id": 58, + "name": "myAbstractMethod", + "kind": 2048, + "kindString": "Method", + "flags": { + "isProtected": true, + "isExported": true + }, + "signatures": [ + { + "id": 59, + "name": "myAbstractMethod", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isExported": true + }, + "type": { + "type": "intrinsic", + "name": "void" + }, + "overwrites": { + "type": "reference", + "id": 54, + "name": "TestAbstractClass.myAbstractMethod" + } + } + ], + "sources": [ + { + "fileName": "class.ts", + "line": 91, + "character": 30 + } + ], + "overwrites": { + "type": "reference", + "id": 54, + "name": "TestAbstractClass.myAbstractMethod" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 57 + ] + }, + { + "title": "Methods", + "kind": 2048, + "children": [ + 58 + ] + } + ], + "sources": [ + { + "fileName": "class.ts", + "line": 88, + "character": 44 + } + ], + "extendedTypes": [ + { + "type": "reference", + "id": 52, + "name": "TestAbstractClass" + } + ] + }, + { + "id": 16, + "name": "TestClass", + "kind": 128, + "kindString": "Class", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "TestClass comment short text.", + "text": "TestClass comment text.\n", + "tags": [ + { + "tag": "see", + "text": "[[TestClass]] @ fixtures\n" + } + ] + }, + "children": [ + { + "id": 20, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "Constructor short text." + }, + "signatures": [ + { + "id": 21, + "name": "new TestClass", + "kind": 16384, + "kindString": "Constructor signature", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "Constructor short text." + }, + "type": { + "type": "reference", + "id": 16, + "name": "TestClass" + } + } + ], + "sources": [ + { + "fileName": "class.ts", + "line": 23, + "character": 37 + } + ] + }, + { + "id": 18, + "name": "privateProperty", + "kind": 1024, + "kindString": "Property", + "flags": { + "isPrivate": true, + "isExported": true + }, + "comment": { + "shortText": "privateProperty short text." + }, + "sources": [ + { + "fileName": "class.ts", + "line": 18, + "character": 27 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "intrinsic", + "name": "number" + } + } + }, + { + "id": 17, + "name": "publicProperty", + "kind": 1024, + "kindString": "Property", + "flags": { + "isPublic": true, + "isExported": true + }, + "comment": { + "shortText": "publicProperty short text." + }, + "sources": [ + { + "fileName": "class.ts", + "line": 13, + "character": 25 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 19, + "name": "staticProperty", + "kind": 1024, + "kindString": "Property", + "flags": { + "isStatic": true, + "isExported": true + }, + "comment": { + "shortText": "privateProperty short text." + }, + "sources": [ + { + "fileName": "class.ts", + "line": 23, + "character": 25 + } + ], + "type": { + "type": "reference", + "id": 16, + "name": "TestClass" + } + }, + { + "id": 30, + "name": "arrowMethod", + "kind": 2048, + "kindString": "Method", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "arrow method" + }, + "signatures": [ + { + "id": 31, + "name": "arrowMethod", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "arrow method" + }, + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "class.ts", + "line": 55, + "character": 15 + } + ] + }, + { + "id": 26, + "name": "privateMethod", + "kind": 2048, + "kindString": "Method", + "flags": { + "isPrivate": true, + "isExported": true + }, + "signatures": [ + { + "id": 27, + "name": "privateMethod", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "privateMethod short text." + }, + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "class.ts", + "line": 45, + "character": 25 + } + ] + }, + { + "id": 24, + "name": "protectedMethod", + "kind": 2048, + "kindString": "Method", + "flags": { + "isProtected": true, + "isExported": true + }, + "signatures": [ + { + "id": 25, + "name": "protectedMethod", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "protectedMethod short text." + }, + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "class.ts", + "line": 40, + "character": 29 + } + ] + }, + { + "id": 22, + "name": "publicMethod", + "kind": 2048, + "kindString": "Method", + "flags": { + "isPublic": true, + "isExported": true + }, + "signatures": [ + { + "id": 23, + "name": "publicMethod", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "publicMethod short text." + }, + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "class.ts", + "line": 34, + "character": 23 + } + ] + }, + { + "id": 28, + "name": "staticMethod", + "kind": 2048, + "kindString": "Method", + "flags": { + "isStatic": true, + "isExported": true + }, + "signatures": [ + { + "id": 29, + "name": "staticMethod", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "staticMethod short text." + }, + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "class.ts", + "line": 50, + "character": 23 + } + ] + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 20 + ] + }, + { + "title": "Properties", + "kind": 1024, + "children": [ + 18, + 17, + 19 + ] + }, + { + "title": "Methods", + "kind": 2048, + "children": [ + 30, + 26, + 24, + 22, + 28 + ] + } + ], + "categories": [ + { + "title": "Other", + "children": [ + 20, + 18, + 17, + 19, + 30, + 26, + 28 + ] + }, + { + "title": "Test", + "children": [ + 24, + 22 + ] + } + ], + "sources": [ + { + "fileName": "class.ts", + "line": 8, + "character": 22 + } + ], + "extendedBy": [ + { + "type": "reference", + "id": 32, + "name": "TestSubClass" + } + ] + }, + { + "id": 32, + "name": "TestSubClass", + "kind": 128, + "kindString": "Class", + "flags": { + "isExported": true + }, + "children": [ + { + "id": 37, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "Constructor short text." + }, + "signatures": [ + { + "id": 41, + "name": "new TestSubClass", + "kind": 16384, + "kindString": "Constructor signature", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "Constructor short text." + }, + "parameters": [ + { + "id": 42, + "name": "p1", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "Constructor param" + }, + "type": { + "type": "intrinsic", + "name": "any" + } + }, + { + "id": 43, + "name": "p2", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "Private string property" + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 44, + "name": "p3", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "Public number property" + }, + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 45, + "name": "p4", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "Public implicit any property\n" + }, + "type": { + "type": "intrinsic", + "name": "any" + } + } + ], + "type": { + "type": "reference", + "id": 32, + "name": "TestSubClass" + }, + "overwrites": { + "type": "reference", + "id": 20, + "name": "TestClass.__constructor" + } + } + ], + "sources": [ + { + "fileName": "class.ts", + "line": 67, + "character": 34 + } + ], + "overwrites": { + "type": "reference", + "id": 20, + "name": "TestClass.__constructor" + } + }, + { + "id": 38, + "name": "p2", + "kind": 1024, + "kindString": "Property", + "flags": { + "isPrivate": true, + "isExported": true, + "isConstructorProperty": true + }, + "comment": { + "shortText": "Private string property" + }, + "sources": [ + { + "fileName": "class.ts", + "line": 77, + "character": 30 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 39, + "name": "p3", + "kind": 1024, + "kindString": "Property", + "flags": { + "isPublic": true, + "isExported": true, + "isConstructorProperty": true + }, + "comment": { + "shortText": "Public number property" + }, + "sources": [ + { + "fileName": "class.ts", + "line": 77, + "character": 49 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 40, + "name": "p4", + "kind": 1024, + "kindString": "Property", + "flags": { + "isPublic": true, + "isExported": true, + "isConstructorProperty": true + }, + "comment": { + "shortText": "Public implicit any property\n" + }, + "sources": [ + { + "fileName": "class.ts", + "line": 77, + "character": 68 + } + ], + "type": { + "type": "intrinsic", + "name": "any" + } + }, + { + "id": 46, + "name": "publicProperty", + "kind": 1024, + "kindString": "Property", + "flags": { + "isPublic": true, + "isExported": true + }, + "comment": { + "shortText": "publicProperty short text." + }, + "sources": [ + { + "fileName": "class.ts", + "line": 13, + "character": 25 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "inheritedFrom": { + "type": "reference", + "id": 17, + "name": "TestClass.publicProperty" + } + }, + { + "id": 47, + "name": "staticProperty", + "kind": 1024, + "kindString": "Property", + "flags": { + "isStatic": true, + "isExported": true + }, + "comment": { + "shortText": "privateProperty short text." + }, + "sources": [ + { + "fileName": "class.ts", + "line": 23, + "character": 25 + } + ], + "type": { + "type": "reference", + "id": 16, + "name": "TestClass" + }, + "inheritedFrom": { + "type": "reference", + "id": 19, + "name": "TestClass.staticProperty" + } + }, + { + "id": 50, + "name": "arrowMethod", + "kind": 2048, + "kindString": "Method", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "arrow method" + }, + "signatures": [ + { + "id": 51, + "name": "arrowMethod", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "arrow method" + }, + "type": { + "type": "intrinsic", + "name": "void" + }, + "inheritedFrom": { + "type": "reference", + "id": 30, + "name": "TestClass.arrowMethod" + } + } + ], + "sources": [ + { + "fileName": "class.ts", + "line": 55, + "character": 15 + } + ], + "inheritedFrom": { + "type": "reference", + "id": 30, + "name": "TestClass.arrowMethod" + } + }, + { + "id": 60, + "name": "mergedMethod", + "kind": 2048, + "kindString": "Method", + "flags": { + "isExported": true + }, + "signatures": [ + { + "id": 61, + "name": "mergedMethod", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "mergedMethod short text." + }, + "type": { + "type": "intrinsic", + "name": "any" + } + } + ], + "sources": [ + { + "fileName": "class.ts", + "line": 98, + "character": 16 + } + ] + }, + { + "id": 35, + "name": "protectedMethod", + "kind": 2048, + "kindString": "Method", + "flags": { + "isProtected": true, + "isExported": true + }, + "signatures": [ + { + "id": 36, + "name": "protectedMethod", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "protectedMethod short text." + }, + "type": { + "type": "intrinsic", + "name": "void" + }, + "overwrites": { + "type": "reference", + "id": 24, + "name": "TestClass.protectedMethod" + } + } + ], + "sources": [ + { + "fileName": "class.ts", + "line": 67, + "character": 29 + } + ], + "overwrites": { + "type": "reference", + "id": 24, + "name": "TestClass.protectedMethod" + } + }, + { + "id": 33, + "name": "publicMethod", + "kind": 2048, + "kindString": "Method", + "flags": { + "isPublic": true, + "isExported": true + }, + "signatures": [ + { + "id": 34, + "name": "publicMethod", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "publicMethod short text." + }, + "type": { + "type": "intrinsic", + "name": "void" + }, + "overwrites": { + "type": "reference", + "id": 22, + "name": "TestClass.publicMethod" + } + } + ], + "sources": [ + { + "fileName": "class.ts", + "line": 62, + "character": 23 + } + ], + "overwrites": { + "type": "reference", + "id": 22, + "name": "TestClass.publicMethod" + } + }, + { + "id": 72, + "name": "staticMergedMethod", + "kind": 2048, + "kindString": "Method", + "flags": { + "isStatic": true, + "isExported": true + }, + "signatures": [ + { + "id": 73, + "name": "staticMergedMethod", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "staticMergedMethod short text." + }, + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "class.ts", + "line": 105, + "character": 38 + } + ] + }, + { + "id": 48, + "name": "staticMethod", + "kind": 2048, + "kindString": "Method", + "flags": { + "isStatic": true, + "isExported": true + }, + "signatures": [ + { + "id": 49, + "name": "staticMethod", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "staticMethod short text." + }, + "type": { + "type": "intrinsic", + "name": "void" + }, + "inheritedFrom": { + "type": "reference", + "id": 28, + "name": "TestClass.staticMethod" + } + } + ], + "sources": [ + { + "fileName": "class.ts", + "line": 50, + "character": 23 + } + ], + "inheritedFrom": { + "type": "reference", + "id": 28, + "name": "TestClass.staticMethod" + } + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 37 + ] + }, + { + "title": "Properties", + "kind": 1024, + "children": [ + 38, + 39, + 40, + 46, + 47 + ] + }, + { + "title": "Methods", + "kind": 2048, + "children": [ + 50, + 60, + 35, + 33, + 72, + 48 + ] + } + ], + "sources": [ + { + "fileName": "class.ts", + "line": 58, + "character": 25 + }, + { + "fileName": "class.ts", + "line": 94, + "character": 29 + }, + { + "fileName": "class.ts", + "line": 101, + "character": 26 + } + ], + "extendedTypes": [ + { + "type": "reference", + "id": 16, + "name": "TestClass" + } + ] + }, + { + "id": 74, + "name": "x", + "kind": 32, + "kindString": "Variable", + "flags": { + "isConst": true + }, + "sources": [ + { + "fileName": "class.ts", + "line": 120, + "character": 7 + } + ], + "type": { + "type": "stringLiteral", + "value": "literal" + }, + "defaultValue": "\"literal\"" + } + ], + "groups": [ + { + "title": "Classes", + "kind": 128, + "children": [ + 67, + 62, + 52, + 56, + 16, + 32 + ] + }, + { + "title": "Variables", + "kind": 32, + "children": [ + 74 + ] + } + ], + "sources": [ + { + "fileName": "class.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 75, + "name": "\"clodule-with-subclass\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/class/clodule-with-subclass.ts", + "children": [ + { + "id": 77, + "name": "Bar", + "kind": 128, + "kindString": "Class", + "flags": { + "isExported": true + }, + "children": [ + { + "id": 78, + "name": "x", + "kind": 1024, + "kindString": "Property", + "flags": { + "isStatic": true, + "isExported": true + }, + "sources": [ + { + "fileName": "clodule-with-subclass.ts", + "line": 4, + "character": 16 + } + ], + "type": { + "type": "unknown", + "name": "1" + }, + "defaultValue": "1" + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 78 + ] + } + ], + "sources": [ + { + "fileName": "clodule-with-subclass.ts", + "line": 7, + "character": 16 + } + ], + "extendedTypes": [ + { + "type": "reference", + "id": 76, + "name": "Foo" + } + ] + }, + { + "id": 76, + "name": "Foo", + "kind": 128, + "kindString": "Class", + "flags": { + "isExported": true + }, + "children": [ + { + "id": 79, + "name": "x", + "kind": 1024, + "kindString": "Property", + "flags": { + "isStatic": true, + "isExported": true + }, + "sources": [ + { + "fileName": "clodule-with-subclass.ts", + "line": 4, + "character": 16 + } + ], + "type": { + "type": "unknown", + "name": "1" + }, + "defaultValue": "1" + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 79 + ] + } + ], + "sources": [ + { + "fileName": "clodule-with-subclass.ts", + "line": 2, + "character": 16 + }, + { + "fileName": "clodule-with-subclass.ts", + "line": 3, + "character": 20 + } + ], + "extendedBy": [ + { + "type": "reference", + "id": 77, + "name": "Bar" + } + ] + } + ], + "groups": [ + { + "title": "Classes", + "kind": 128, + "children": [ + 77, + 76 + ] + } + ], + "sources": [ + { + "fileName": "clodule-with-subclass.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 80, + "name": "\"constructor-properties\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/class/constructor-properties.ts", + "children": [ + { + "id": 81, + "name": "Vector2", + "kind": 128, + "kindString": "Class", + "flags": {}, + "comment": { + "shortText": "A class with constructor properties." + }, + "children": [ + { + "id": 82, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "comment": {}, + "signatures": [ + { + "id": 86, + "name": "new Vector2", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "comment": {}, + "parameters": [ + { + "id": 87, + "name": "x", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "X component of the Vector" + }, + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 88, + "name": "y", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "Y component of the Vector" + }, + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 89, + "name": "name", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "Vector name\n" + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "id": 81, + "name": "Vector2" + } + } + ], + "sources": [ + { + "fileName": "constructor-properties.ts", + "line": 4, + "character": 15 + } + ] + }, + { + "id": 85, + "name": "name", + "kind": 1024, + "kindString": "Property", + "flags": { + "isConstructorProperty": true + }, + "comment": { + "shortText": "Vector name\n" + }, + "sources": [ + { + "fileName": "constructor-properties.ts", + "line": 11, + "character": 29 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 83, + "name": "x", + "kind": 1024, + "kindString": "Property", + "flags": { + "isPublic": true, + "isConstructorProperty": true + }, + "comment": { + "shortText": "X component of the Vector" + }, + "sources": [ + { + "fileName": "constructor-properties.ts", + "line": 10, + "character": 24 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 84, + "name": "y", + "kind": 1024, + "kindString": "Property", + "flags": { + "isPublic": true, + "isConstructorProperty": true + }, + "comment": { + "shortText": "Y component of the Vector" + }, + "sources": [ + { + "fileName": "constructor-properties.ts", + "line": 10, + "character": 42 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 82 + ] + }, + { + "title": "Properties", + "kind": 1024, + "children": [ + 85, + 83, + 84 + ] + } + ], + "sources": [ + { + "fileName": "constructor-properties.ts", + "line": 4, + "character": 13 + } + ], + "extendedBy": [ + { + "type": "reference", + "id": 90, + "name": "Vector3" + } + ] + }, + { + "id": 90, + "name": "Vector3", + "kind": 128, + "kindString": "Class", + "flags": {}, + "comment": { + "shortText": "A class with inherited and overwritten constructor properties." + }, + "children": [ + { + "id": 91, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "comment": {}, + "signatures": [ + { + "id": 95, + "name": "new Vector3", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "comment": {}, + "parameters": [ + { + "id": 96, + "name": "x", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "X component of the Vector" + }, + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 97, + "name": "y", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "Y component of the Vector" + }, + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 98, + "name": "z", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "Z component of the Vector" + }, + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 99, + "name": "name", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "Vector name\n" + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "id": 90, + "name": "Vector3" + }, + "overwrites": { + "type": "reference", + "id": 82, + "name": "Vector2.__constructor" + } + } + ], + "sources": [ + { + "fileName": "constructor-properties.ts", + "line": 18, + "character": 31 + } + ], + "overwrites": { + "type": "reference", + "id": 82, + "name": "Vector2.__constructor" + } + }, + { + "id": 94, + "name": "name", + "kind": 1024, + "kindString": "Property", + "flags": { + "isConstructorProperty": true + }, + "comment": { + "shortText": "Vector name\n" + }, + "sources": [ + { + "fileName": "constructor-properties.ts", + "line": 26, + "character": 29 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "overwrites": { + "type": "reference", + "id": 85, + "name": "Vector2.name" + } + }, + { + "id": 100, + "name": "x", + "kind": 1024, + "kindString": "Property", + "flags": { + "isPublic": true, + "isConstructorProperty": true + }, + "comment": { + "shortText": "X component of the Vector" + }, + "sources": [ + { + "fileName": "constructor-properties.ts", + "line": 10, + "character": 24 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + }, + "inheritedFrom": { + "type": "reference", + "id": 83, + "name": "Vector2.x" + } + }, + { + "id": 92, + "name": "y", + "kind": 1024, + "kindString": "Property", + "flags": { + "isPublic": true, + "isConstructorProperty": true + }, + "comment": { + "shortText": "Y component of the Vector" + }, + "sources": [ + { + "fileName": "constructor-properties.ts", + "line": 25, + "character": 35 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + }, + "overwrites": { + "type": "reference", + "id": 84, + "name": "Vector2.y" + } + }, + { + "id": 93, + "name": "z", + "kind": 1024, + "kindString": "Property", + "flags": { + "isPublic": true, + "isConstructorProperty": true + }, + "comment": { + "shortText": "Z component of the Vector" + }, + "sources": [ + { + "fileName": "constructor-properties.ts", + "line": 25, + "character": 53 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 91 + ] + }, + { + "title": "Properties", + "kind": 1024, + "children": [ + 94, + 100, + 92, + 93 + ] + } + ], + "sources": [ + { + "fileName": "constructor-properties.ts", + "line": 18, + "character": 13 + } + ], + "extendedTypes": [ + { + "type": "reference", + "id": 81, + "name": "Vector2" + } + ] + } + ], + "groups": [ + { + "title": "Classes", + "kind": 128, + "children": [ + 81, + 90 + ] + } + ], + "sources": [ + { + "fileName": "constructor-properties.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 101, + "name": "\"decorators\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/class/decorators.ts", + "children": [ + { + "id": 102, + "name": "DecoratedClass", + "kind": 128, + "kindString": "Class", + "flags": {}, + "comment": { + "shortText": "A decorated class." + }, + "decorators": [ + { + "name": "decoratorWithOptions", + "type": { + "type": "reference", + "id": 113, + "name": "decoratorWithOptions" + }, + "arguments": { + "options": "{\n name: 'Name of class'\n}" + } + } + ], + "children": [ + { + "id": 103, + "name": "decoratedMethod", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "decorators": [ + { + "name": "decoratorAtom", + "type": { + "type": "reference", + "id": 105, + "name": "decoratorAtom" + } + }, + { + "name": "decoratorWithParam", + "type": { + "type": "reference", + "id": 110, + "name": "decoratorWithParam" + }, + "arguments": { + "value": "false" + } + } + ], + "signatures": [ + { + "id": 104, + "name": "decoratedMethod", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "A decorated method." + }, + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "decorators.ts", + "line": 13, + "character": 19 + } + ] + } + ], + "groups": [ + { + "title": "Methods", + "kind": 2048, + "children": [ + 103 + ] + } + ], + "sources": [ + { + "fileName": "decorators.ts", + "line": 7, + "character": 20 + } + ] + }, + { + "id": 105, + "name": "decoratorAtom", + "kind": 64, + "kindString": "Function", + "flags": {}, + "decorates": [ + { + "type": "reference", + "id": 103, + "name": "decoratedMethod" + } + ], + "signatures": [ + { + "id": 106, + "name": "decoratorAtom", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "A decorator with no options." + }, + "parameters": [ + { + "id": 107, + "name": "target", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Object" + } + }, + { + "id": 108, + "name": "propertyKey", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "union", + "types": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "symbol" + } + ] + } + }, + { + "id": 109, + "name": "descriptor", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "any" + } + ], + "name": "TypedPropertyDescriptor" + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "decorators.ts", + "line": 19, + "character": 22 + } + ] + }, + { + "id": 113, + "name": "decoratorWithOptions", + "kind": 64, + "kindString": "Function", + "flags": {}, + "decorates": [ + { + "type": "reference", + "id": 102, + "name": "DecoratedClass" + } + ], + "signatures": [ + { + "id": 114, + "name": "decoratorWithOptions", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "A decorator consuming an options object." + }, + "parameters": [ + { + "id": 115, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "text": "The options object of this decorator." + }, + "type": { + "type": "reflection", + "declaration": { + "id": 116, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 117, + "name": "name", + "kind": 32, + "kindString": "Variable", + "flags": {}, + "comment": { + "text": "A property on the options object of this decorator.\n" + }, + "sources": [ + { + "fileName": "decorators.ts", + "line": 40, + "character": 44 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Variables", + "kind": 32, + "children": [ + 117 + ] + } + ], + "sources": [ + { + "fileName": "decorators.ts", + "line": 40, + "character": 38 + } + ] + } + } + } + ], + "type": { + "type": "reference", + "name": "ClassDecorator" + } + } + ], + "sources": [ + { + "fileName": "decorators.ts", + "line": 40, + "character": 29 + } + ] + }, + { + "id": 110, + "name": "decoratorWithParam", + "kind": 64, + "kindString": "Function", + "flags": {}, + "decorates": [ + { + "type": "reference", + "id": 103, + "name": "decoratedMethod" + } + ], + "signatures": [ + { + "id": 111, + "name": "decoratorWithParam", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "A decorator with a parameter." + }, + "parameters": [ + { + "id": 112, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "text": "The parameter of this decorator.\n" + }, + "type": { + "type": "intrinsic", + "name": "boolean" + } + } + ], + "type": { + "type": "reference", + "name": "MethodDecorator" + } + } + ], + "sources": [ + { + "fileName": "decorators.ts", + "line": 28, + "character": 27 + } + ] + } + ], + "groups": [ + { + "title": "Classes", + "kind": 128, + "children": [ + 102 + ] + }, + { + "title": "Functions", + "kind": 64, + "children": [ + 105, + 113, + 110 + ] + } + ], + "sources": [ + { + "fileName": "decorators.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 145, + "name": "\"events\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/class/events.ts", + "children": [ + { + "id": 146, + "name": "EventDispatcher", + "kind": 128, + "kindString": "Class", + "flags": {}, + "children": [ + { + "id": 147, + "name": "EVENT_CLICK", + "kind": 8388608, + "kindString": "Event", + "flags": { + "isStatic": true + }, + "comment": { + "shortText": "This is an event documentation." + }, + "sources": [ + { + "fileName": "events.ts", + "line": 6, + "character": 22 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "defaultValue": "\"click\"" + } + ], + "groups": [ + { + "title": "Events", + "kind": 8388608, + "children": [ + 147 + ] + } + ], + "sources": [ + { + "fileName": "events.ts", + "line": 1, + "character": 21 + } + ] + } + ], + "groups": [ + { + "title": "Classes", + "kind": 128, + "children": [ + 146 + ] + } + ], + "sources": [ + { + "fileName": "events.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 118, + "name": "\"events-overloads\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/class/events-overloads.ts", + "children": [ + { + "id": 119, + "name": "Test", + "kind": 256, + "kindString": "Interface", + "flags": {}, + "comment": { + "shortText": "Encapsulates some information for background http transfers.", + "tags": [ + { + "tag": "see", + "text": "https://github.com/sebastian-lenz/typedoc/issues/136\n" + } + ] + }, + "children": [ + { + "id": 120, + "name": "on", + "kind": 8388608, + "kindString": "Event", + "flags": {}, + "signatures": [ + { + "id": 121, + "name": "on", + "kind": 8388608, + "kindString": "Event", + "flags": {}, + "comment": { + "shortText": "Subscribe for a general event by name." + }, + "parameters": [ + { + "id": 122, + "name": "event", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "text": "The name of the event to subscribe for." + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 123, + "name": "handler", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "text": "The handler called when the event occurs.\n" + }, + "type": { + "type": "reflection", + "declaration": { + "id": 124, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 125, + "name": "__call", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 126, + "name": "e", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "any" + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "events-overloads.ts", + "line": 14, + "character": 30 + } + ] + } + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + }, + { + "id": 127, + "name": "on", + "kind": 8388608, + "kindString": "Event", + "flags": {}, + "comment": { + "shortText": "Subscribe for error notifications." + }, + "parameters": [ + { + "id": 128, + "name": "event", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "text": "The name of the event to subscribe for." + }, + "type": { + "type": "stringLiteral", + "value": "error" + } + }, + { + "id": 129, + "name": "handler", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "text": "A handler that will receive the error details\n" + }, + "type": { + "type": "reflection", + "declaration": { + "id": 130, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 131, + "name": "__call", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 132, + "name": "e", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "any" + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "events-overloads.ts", + "line": 23, + "character": 31 + } + ] + } + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + }, + { + "id": 133, + "name": "on", + "kind": 8388608, + "kindString": "Event", + "flags": {}, + "comment": { + "shortText": "Subscribe for progress notifications." + }, + "parameters": [ + { + "id": 134, + "name": "event", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "text": "The name of the event to subscribe for." + }, + "type": { + "type": "stringLiteral", + "value": "progress" + } + }, + { + "id": 135, + "name": "handler", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "text": "A handler that will receive a progress event with the current and expected total bytes\n" + }, + "type": { + "type": "reflection", + "declaration": { + "id": 136, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 137, + "name": "__call", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 138, + "name": "e", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "any" + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "events-overloads.ts", + "line": 32, + "character": 34 + } + ] + } + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + }, + { + "id": 139, + "name": "on", + "kind": 8388608, + "kindString": "Event", + "flags": {}, + "comment": { + "shortText": "Subscribe for success notification." + }, + "parameters": [ + { + "id": 140, + "name": "event", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "text": "The name of the event to subscribe for." + }, + "type": { + "type": "stringLiteral", + "value": "complete" + } + }, + { + "id": 141, + "name": "handler", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "text": "A function that will be called with general event data upon successful completion\n" + }, + "type": { + "type": "reflection", + "declaration": { + "id": 142, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 143, + "name": "__call", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 144, + "name": "e", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "any" + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "events-overloads.ts", + "line": 41, + "character": 34 + } + ] + } + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "events-overloads.ts", + "line": 14, + "character": 6 + }, + { + "fileName": "events-overloads.ts", + "line": 23, + "character": 6 + }, + { + "fileName": "events-overloads.ts", + "line": 32, + "character": 6 + }, + { + "fileName": "events-overloads.ts", + "line": 41, + "character": 6 + } + ] + } + ], + "groups": [ + { + "title": "Events", + "kind": 8388608, + "children": [ + 120 + ] + } + ], + "sources": [ + { + "fileName": "events-overloads.ts", + "line": 6, + "character": 14 + } + ] + } + ], + "groups": [ + { + "title": "Interfaces", + "kind": 256, + "children": [ + 119 + ] + } + ], + "sources": [ + { + "fileName": "events-overloads.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 148, + "name": "\"generic-class\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/class/generic-class.ts", + "children": [ + { + "id": 149, + "name": "GenericClass", + "kind": 128, + "kindString": "Class", + "flags": {}, + "comment": { + "shortText": "GenericClass short text." + }, + "typeParameter": [ + { + "id": 150, + "name": "T", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "comment": { + "shortText": "Generic parameter.\n" + } + } + ], + "children": [ + { + "id": 153, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "comment": { + "shortText": "Constructor short text." + }, + "signatures": [ + { + "id": 154, + "name": "new GenericClass", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "comment": { + "shortText": "Constructor short text." + }, + "parameters": [ + { + "id": 155, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "Constructor parameter.\n" + }, + "type": { + "type": "typeParameter", + "name": "T" + } + } + ], + "type": { + "type": "reference", + "id": 149, + "name": "GenericClass" + } + } + ], + "sources": [ + { + "fileName": "generic-class.ts", + "line": 14, + "character": 26 + } + ] + }, + { + "id": 151, + "name": "value", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "comment": { + "shortText": "Generic property." + }, + "sources": [ + { + "fileName": "generic-class.ts", + "line": 9, + "character": 19 + } + ], + "type": { + "type": "typeParameter", + "name": "T" + } + }, + { + "id": 152, + "name": "values", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "comment": { + "shortText": "Generic property array." + }, + "sources": [ + { + "fileName": "generic-class.ts", + "line": 14, + "character": 20 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "typeParameter", + "name": "T" + } + } + }, + { + "id": 156, + "name": "getValue", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "signatures": [ + { + "id": 157, + "name": "getValue", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "getValue short text.", + "returns": "Return value comment.\n" + }, + "type": { + "type": "typeParameter", + "name": "T" + } + } + ], + "sources": [ + { + "fileName": "generic-class.ts", + "line": 28, + "character": 12 + } + ] + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 153 + ] + }, + { + "title": "Properties", + "kind": 1024, + "children": [ + 151, + 152 + ] + }, + { + "title": "Methods", + "kind": 2048, + "children": [ + 156 + ] + } + ], + "sources": [ + { + "fileName": "generic-class.ts", + "line": 5, + "character": 18 + } + ], + "extendedBy": [ + { + "type": "reference", + "id": 158, + "name": "NonGenericClass" + } + ] + }, + { + "id": 158, + "name": "NonGenericClass", + "kind": 128, + "kindString": "Class", + "flags": {}, + "comment": { + "shortText": "NonGenericClass short text." + }, + "children": [ + { + "id": 161, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "comment": { + "shortText": "Constructor short text." + }, + "signatures": [ + { + "id": 162, + "name": "new NonGenericClass", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "comment": { + "shortText": "Constructor short text." + }, + "parameters": [ + { + "id": 163, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "Constructor parameter.\n" + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "id": 158, + "name": "NonGenericClass" + }, + "inheritedFrom": { + "type": "reference", + "id": 153, + "name": "GenericClass.__constructor" + } + } + ], + "sources": [ + { + "fileName": "generic-class.ts", + "line": 14, + "character": 26 + } + ], + "inheritedFrom": { + "type": "reference", + "id": 153, + "name": "GenericClass.__constructor" + } + }, + { + "id": 159, + "name": "value", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "comment": { + "shortText": "Generic property." + }, + "sources": [ + { + "fileName": "generic-class.ts", + "line": 9, + "character": 19 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "inheritedFrom": { + "type": "reference", + "id": 151, + "name": "GenericClass.value" + } + }, + { + "id": 160, + "name": "values", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "comment": { + "shortText": "Generic property array." + }, + "sources": [ + { + "fileName": "generic-class.ts", + "line": 14, + "character": 20 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "intrinsic", + "name": "string" + } + }, + "inheritedFrom": { + "type": "reference", + "id": 152, + "name": "GenericClass.values" + } + }, + { + "id": 164, + "name": "getValue", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "signatures": [ + { + "id": 165, + "name": "getValue", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "getValue short text.", + "returns": "Return value comment.\n" + }, + "type": { + "type": "intrinsic", + "name": "string" + }, + "inheritedFrom": { + "type": "reference", + "id": 156, + "name": "GenericClass.getValue" + } + } + ], + "sources": [ + { + "fileName": "generic-class.ts", + "line": 28, + "character": 12 + } + ], + "inheritedFrom": { + "type": "reference", + "id": 156, + "name": "GenericClass.getValue" + } + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 161 + ] + }, + { + "title": "Properties", + "kind": 1024, + "children": [ + 159, + 160 + ] + }, + { + "title": "Methods", + "kind": 2048, + "children": [ + 164 + ] + } + ], + "sources": [ + { + "fileName": "generic-class.ts", + "line": 36, + "character": 21 + } + ], + "extendedTypes": [ + { + "type": "reference", + "id": 149, + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + } + ], + "name": "GenericClass" + } + ] + } + ], + "groups": [ + { + "title": "Classes", + "kind": 128, + "children": [ + 149, + 158 + ] + } + ], + "sources": [ + { + "fileName": "generic-class.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 166, + "name": "\"getter-setter\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/class/getter-setter.ts", + "children": [ + { + "id": 167, + "name": "GetterSetter", + "kind": 128, + "kindString": "Class", + "flags": {}, + "children": [ + { + "id": 168, + "name": "_name", + "kind": 1024, + "kindString": "Property", + "flags": { + "isPrivate": true + }, + "sources": [ + { + "fileName": "getter-setter.ts", + "line": 2, + "character": 17 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 169, + "name": "name", + "kind": 262144, + "kindString": "Accessor", + "flags": {}, + "getSignature": [ + { + "id": 170, + "name": "__get", + "kind": 524288, + "kindString": "Get signature", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "setSignature": [ + { + "id": 171, + "name": "__set", + "kind": 1048576, + "kindString": "Set signature", + "flags": {}, + "parameters": [ + { + "id": 172, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "getter-setter.ts", + "line": 4, + "character": 12 + }, + { + "fileName": "getter-setter.ts", + "line": 5, + "character": 12 + } + ] + }, + { + "id": 173, + "name": "readOnlyName", + "kind": 262144, + "kindString": "Accessor", + "flags": {}, + "getSignature": [ + { + "id": 174, + "name": "__get", + "kind": 524288, + "kindString": "Get signature", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "sources": [ + { + "fileName": "getter-setter.ts", + "line": 7, + "character": 20 + } + ] + }, + { + "id": 175, + "name": "writeOnlyName", + "kind": 262144, + "kindString": "Accessor", + "flags": {}, + "setSignature": [ + { + "id": 176, + "name": "__set", + "kind": 1048576, + "kindString": "Set signature", + "flags": {}, + "parameters": [ + { + "id": 177, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "getter-setter.ts", + "line": 9, + "character": 21 + } + ] + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 168 + ] + }, + { + "title": "Accessors", + "kind": 262144, + "children": [ + 169, + 173, + 175 + ] + } + ], + "sources": [ + { + "fileName": "getter-setter.ts", + "line": 1, + "character": 18 + } + ] + } + ], + "groups": [ + { + "title": "Classes", + "kind": 128, + "children": [ + 167 + ] + } + ], + "sources": [ + { + "fileName": "getter-setter.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 178, + "name": "\"this\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/class/this.ts", + "children": [ + { + "id": 179, + "name": "ChainClass", + "kind": 128, + "kindString": "Class", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "ChainClass comment short text.", + "text": "ChainClass comment text.\n" + }, + "children": [ + { + "id": 180, + "name": "chain", + "kind": 2048, + "kindString": "Method", + "flags": { + "isPublic": true, + "isExported": true + }, + "signatures": [ + { + "id": 181, + "name": "chain", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "Chain method that returns this." + }, + "type": { + "type": "intrinsic", + "name": "this" + } + } + ], + "sources": [ + { + "fileName": "this.ts", + "line": 10, + "character": 16 + } + ] + } + ], + "groups": [ + { + "title": "Methods", + "kind": 2048, + "children": [ + 180 + ] + } + ], + "sources": [ + { + "fileName": "this.ts", + "line": 6, + "character": 23 + } + ] + } + ], + "groups": [ + { + "title": "Classes", + "kind": 128, + "children": [ + 179 + ] + } + ], + "sources": [ + { + "fileName": "this.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 182, + "name": "\"type-operator\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/class/type-operator.ts", + "children": [ + { + "id": 186, + "name": "GenericClass", + "kind": 128, + "kindString": "Class", + "flags": { + "isExported": true + }, + "typeParameter": [ + { + "id": 187, + "name": "T", + "kind": 131072, + "kindString": "Type parameter", + "flags": { + "isExported": true + }, + "type": { + "type": "typeOperator", + "operator": "keyof", + "target": { + "type": "reference", + "id": 183, + "name": "TestClass" + } + } + } + ], + "children": [ + { + "id": 188, + "name": "c", + "kind": 1024, + "kindString": "Property", + "flags": { + "isExported": true + }, + "sources": [ + { + "fileName": "type-operator.ts", + "line": 14, + "character": 5 + } + ], + "type": { + "type": "typeParameter", + "name": "T", + "constraint": { + "type": "typeOperator", + "operator": "keyof", + "target": { + "type": "reference", + "id": 183, + "name": "TestClass" + } + } + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 188 + ] + } + ], + "sources": [ + { + "fileName": "type-operator.ts", + "line": 13, + "character": 25 + } + ] + }, + { + "id": 183, + "name": "TestClass", + "kind": 128, + "kindString": "Class", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "TestClass comment short text.", + "text": "TestClass comment text.\n", + "tags": [ + { + "tag": "see", + "text": "[[TestClass]] @ fixtures\n" + } + ] + }, + "children": [ + { + "id": 184, + "name": "a", + "kind": 1024, + "kindString": "Property", + "flags": { + "isExported": true + }, + "sources": [ + { + "fileName": "type-operator.ts", + "line": 9, + "character": 5 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 185, + "name": "b", + "kind": 1024, + "kindString": "Property", + "flags": { + "isExported": true + }, + "sources": [ + { + "fileName": "type-operator.ts", + "line": 10, + "character": 5 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 184, + 185 + ] + } + ], + "sources": [ + { + "fileName": "type-operator.ts", + "line": 8, + "character": 22 + } + ] + } + ], + "groups": [ + { + "title": "Classes", + "kind": 128, + "children": [ + 186, + 183 + ] + } + ], + "sources": [ + { + "fileName": "type-operator.ts", + "line": 1, + "character": 0 + } + ] + } + ], + "groups": [ + { + "title": "External modules", + "kind": 1, + "children": [ + 1, + 15, + 75, + 80, + 101, + 145, + 118, + 148, + 166, + 178, + 182 + ] + } + ] +} \ No newline at end of file diff --git a/src/test/converter/class/specs-without-exported.json b/src/test/converter/class/specs-without-exported.json index d4346816b..6f61d9b4e 100644 --- a/src/test/converter/class/specs-without-exported.json +++ b/src/test/converter/class/specs-without-exported.json @@ -6,6 +6,334 @@ "children": [ { "id": 1, + "name": "\"access\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/class/access.ts", + "children": [ + { + "id": 2, + "name": "PrivateClass", + "kind": 128, + "kindString": "Class", + "flags": { + "isPrivate": true, + "isExported": true + }, + "comment": { + "shortText": "A class that is documented as being private." + }, + "children": [ + { + "id": 3, + "name": "fakePrivateVariable", + "kind": 1024, + "kindString": "Property", + "flags": { + "isPrivate": true, + "isExported": true + }, + "comment": { + "shortText": "A variable that is made private via comment." + }, + "sources": [ + { + "fileName": "access.ts", + "line": 34, + "character": 23 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 4, + "name": "fakeProtectedVariable", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true, + "isExported": true + }, + "comment": { + "shortText": "A variable that is made protected via comment." + }, + "sources": [ + { + "fileName": "access.ts", + "line": 40, + "character": 25 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 5, + "name": "fakePrivateFunction", + "kind": 2048, + "kindString": "Method", + "flags": { + "isPrivate": true, + "isExported": true + }, + "signatures": [ + { + "id": 6, + "name": "fakePrivateFunction", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isPrivate": true, + "isExported": true + }, + "comment": { + "shortText": "A function that is made private via comment." + }, + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "access.ts", + "line": 46, + "character": 23 + } + ] + }, + { + "id": 7, + "name": "fakeProtectedFunction", + "kind": 2048, + "kindString": "Method", + "flags": { + "isProtected": true, + "isExported": true + }, + "signatures": [ + { + "id": 8, + "name": "fakeProtectedFunction", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isProtected": true, + "isExported": true + }, + "comment": { + "shortText": "A function that is made protected via comment." + }, + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "access.ts", + "line": 52, + "character": 25 + } + ] + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 3, + 4 + ] + }, + { + "title": "Methods", + "kind": 2048, + "children": [ + 5, + 7 + ] + } + ], + "sources": [ + { + "fileName": "access.ts", + "line": 29, + "character": 25 + } + ] + }, + { + "id": 9, + "name": "fakePrivateVariable", + "kind": 32, + "kindString": "Variable", + "flags": { + "isPrivate": true, + "isExported": true, + "isConst": true + }, + "comment": { + "shortText": "A variable that is made private via comment." + }, + "sources": [ + { + "fileName": "access.ts", + "line": 5, + "character": 32 + } + ], + "type": { + "type": "stringLiteral", + "value": "test" + }, + "defaultValue": "\"test\"" + }, + { + "id": 10, + "name": "fakeProtectedVariable", + "kind": 32, + "kindString": "Variable", + "flags": { + "isProtected": true, + "isExported": true, + "isConst": true + }, + "comment": { + "shortText": "A variable that is made protected via comment." + }, + "sources": [ + { + "fileName": "access.ts", + "line": 11, + "character": 34 + } + ], + "type": { + "type": "stringLiteral", + "value": "test" + }, + "defaultValue": "\"test\"" + }, + { + "id": 11, + "name": "fakePrivateFunction", + "kind": 64, + "kindString": "Function", + "flags": { + "isPrivate": true, + "isExported": true + }, + "signatures": [ + { + "id": 12, + "name": "fakePrivateFunction", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isPrivate": true, + "isExported": true + }, + "comment": { + "shortText": "A function that is made private via comment." + }, + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "access.ts", + "line": 17, + "character": 35 + } + ] + }, + { + "id": 13, + "name": "fakeProtectedFunction", + "kind": 64, + "kindString": "Function", + "flags": { + "isProtected": true, + "isExported": true + }, + "signatures": [ + { + "id": 14, + "name": "fakeProtectedFunction", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isProtected": true, + "isExported": true + }, + "comment": { + "shortText": "A function that is made protected via comment." + }, + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "access.ts", + "line": 23, + "character": 37 + } + ] + } + ], + "groups": [ + { + "title": "Classes", + "kind": 128, + "children": [ + 2 + ] + }, + { + "title": "Variables", + "kind": 32, + "children": [ + 9, + 10 + ] + }, + { + "title": "Functions", + "kind": 64, + "children": [ + 11, + 13 + ] + } + ], + "sources": [ + { + "fileName": "access.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 15, "name": "\"class\"", "kind": 1, "kindString": "External module", @@ -15,7 +343,7 @@ "originalName": "%BASE%/class/class.ts", "children": [ { - "id": 48, + "id": 62, "name": "ComputedNames", "kind": 128, "kindString": "Class", @@ -24,7 +352,7 @@ }, "children": [ { - "id": 49, + "id": 63, "name": "[Symbol.toStringTag]", "kind": 1024, "kindString": "Property", @@ -34,7 +362,7 @@ "sources": [ { "fileName": "class.ts", - "line": 121, + "line": 123, "character": 24 } ], @@ -45,7 +373,7 @@ "defaultValue": "\"computed\"" }, { - "id": 50, + "id": 64, "name": "[x]", "kind": 1024, "kindString": "Property", @@ -55,7 +383,7 @@ "sources": [ { "fileName": "class.ts", - "line": 122, + "line": 124, "character": 7 } ], @@ -66,7 +394,7 @@ "defaultValue": "true" }, { - "id": 51, + "id": 65, "name": "literal2", "kind": 1024, "kindString": "Property", @@ -76,7 +404,7 @@ "sources": [ { "fileName": "class.ts", - "line": 123, + "line": 125, "character": 16 } ], @@ -87,7 +415,7 @@ "defaultValue": "true" }, { - "id": 52, + "id": 66, "name": "y", "kind": 1024, "kindString": "Property", @@ -97,7 +425,7 @@ "sources": [ { "fileName": "class.ts", - "line": 124, + "line": 126, "character": 5 } ], @@ -113,23 +441,23 @@ "title": "Properties", "kind": 1024, "children": [ - 49, - 50, - 51, - 52 + 63, + 64, + 65, + 66 ] } ], "sources": [ { "fileName": "class.ts", - "line": 120, + "line": 122, "character": 26 } ] }, { - "id": 38, + "id": 52, "name": "TestAbstractClass", "kind": 128, "kindString": "Class", @@ -139,7 +467,7 @@ }, "children": [ { - "id": 39, + "id": 53, "name": "myAbstractProperty", "kind": 1024, "kindString": "Property", @@ -150,7 +478,7 @@ "sources": [ { "fileName": "class.ts", - "line": 81, + "line": 83, "character": 31 } ], @@ -160,7 +488,7 @@ } }, { - "id": 40, + "id": 54, "name": "myAbstractMethod", "kind": 2048, "kindString": "Method", @@ -171,7 +499,7 @@ }, "signatures": [ { - "id": 41, + "id": 55, "name": "myAbstractMethod", "kind": 4096, "kindString": "Call signature", @@ -187,7 +515,7 @@ "sources": [ { "fileName": "class.ts", - "line": 83, + "line": 85, "character": 39 } ] @@ -198,34 +526,34 @@ "title": "Properties", "kind": 1024, "children": [ - 39 + 53 ] }, { "title": "Methods", "kind": 2048, "children": [ - 40 + 54 ] } ], "sources": [ { "fileName": "class.ts", - "line": 80, + "line": 82, "character": 39 } ], "extendedBy": [ { "type": "reference", - "id": 42, + "id": 56, "name": "TestAbstractClassImplementation" } ] }, { - "id": 42, + "id": 56, "name": "TestAbstractClassImplementation", "kind": 128, "kindString": "Class", @@ -234,7 +562,7 @@ }, "children": [ { - "id": 43, + "id": 57, "name": "myAbstractProperty", "kind": 1024, "kindString": "Property", @@ -244,7 +572,7 @@ "sources": [ { "fileName": "class.ts", - "line": 87, + "line": 89, "character": 22 } ], @@ -254,12 +582,12 @@ }, "overwrites": { "type": "reference", - "id": 39, + "id": 53, "name": "TestAbstractClass.myAbstractProperty" } }, { - "id": 44, + "id": 58, "name": "myAbstractMethod", "kind": 2048, "kindString": "Method", @@ -269,7 +597,7 @@ }, "signatures": [ { - "id": 45, + "id": 59, "name": "myAbstractMethod", "kind": 4096, "kindString": "Call signature", @@ -282,7 +610,7 @@ }, "overwrites": { "type": "reference", - "id": 40, + "id": 54, "name": "TestAbstractClass.myAbstractMethod" } } @@ -290,13 +618,13 @@ "sources": [ { "fileName": "class.ts", - "line": 89, + "line": 91, "character": 30 } ], "overwrites": { "type": "reference", - "id": 40, + "id": 54, "name": "TestAbstractClass.myAbstractMethod" } } @@ -306,34 +634,34 @@ "title": "Properties", "kind": 1024, "children": [ - 43 + 57 ] }, { "title": "Methods", "kind": 2048, "children": [ - 44 + 58 ] } ], "sources": [ { "fileName": "class.ts", - "line": 86, + "line": 88, "character": 44 } ], "extendedTypes": [ { "type": "reference", - "id": 38, + "id": 52, "name": "TestAbstractClass" } ] }, { - "id": 2, + "id": 16, "name": "TestClass", "kind": 128, "kindString": "Class", @@ -352,7 +680,7 @@ }, "children": [ { - "id": 6, + "id": 20, "name": "constructor", "kind": 512, "kindString": "Constructor", @@ -364,7 +692,7 @@ }, "signatures": [ { - "id": 7, + "id": 21, "name": "new TestClass", "kind": 16384, "kindString": "Constructor signature", @@ -376,7 +704,7 @@ }, "type": { "type": "reference", - "id": 2, + "id": 16, "name": "TestClass" } } @@ -390,7 +718,7 @@ ] }, { - "id": 4, + "id": 18, "name": "privateProperty", "kind": 1024, "kindString": "Property", @@ -417,7 +745,7 @@ } }, { - "id": 3, + "id": 17, "name": "publicProperty", "kind": 1024, "kindString": "Property", @@ -441,7 +769,7 @@ } }, { - "id": 5, + "id": 19, "name": "staticProperty", "kind": 1024, "kindString": "Property", @@ -461,12 +789,12 @@ ], "type": { "type": "reference", - "id": 2, + "id": 16, "name": "TestClass" } }, { - "id": 16, + "id": 30, "name": "arrowMethod", "kind": 2048, "kindString": "Method", @@ -478,7 +806,7 @@ }, "signatures": [ { - "id": 17, + "id": 31, "name": "arrowMethod", "kind": 4096, "kindString": "Call signature", @@ -497,13 +825,13 @@ "sources": [ { "fileName": "class.ts", - "line": 53, + "line": 55, "character": 15 } ] }, { - "id": 12, + "id": 26, "name": "privateMethod", "kind": 2048, "kindString": "Method", @@ -513,7 +841,7 @@ }, "signatures": [ { - "id": 13, + "id": 27, "name": "privateMethod", "kind": 4096, "kindString": "Call signature", @@ -532,13 +860,13 @@ "sources": [ { "fileName": "class.ts", - "line": 43, + "line": 45, "character": 25 } ] }, { - "id": 10, + "id": 24, "name": "protectedMethod", "kind": 2048, "kindString": "Method", @@ -548,7 +876,7 @@ }, "signatures": [ { - "id": 11, + "id": 25, "name": "protectedMethod", "kind": 4096, "kindString": "Call signature", @@ -567,13 +895,13 @@ "sources": [ { "fileName": "class.ts", - "line": 38, + "line": 40, "character": 29 } ] }, { - "id": 8, + "id": 22, "name": "publicMethod", "kind": 2048, "kindString": "Method", @@ -583,7 +911,7 @@ }, "signatures": [ { - "id": 9, + "id": 23, "name": "publicMethod", "kind": 4096, "kindString": "Call signature", @@ -602,13 +930,13 @@ "sources": [ { "fileName": "class.ts", - "line": 33, + "line": 34, "character": 23 } ] }, { - "id": 14, + "id": 28, "name": "staticMethod", "kind": 2048, "kindString": "Method", @@ -618,7 +946,7 @@ }, "signatures": [ { - "id": 15, + "id": 29, "name": "staticMethod", "kind": 4096, "kindString": "Call signature", @@ -637,7 +965,7 @@ "sources": [ { "fileName": "class.ts", - "line": 48, + "line": 50, "character": 23 } ] @@ -648,27 +976,44 @@ "title": "Constructors", "kind": 512, "children": [ - 6 + 20 ] }, { "title": "Properties", "kind": 1024, "children": [ - 4, - 3, - 5 + 18, + 17, + 19 ] }, { "title": "Methods", "kind": 2048, "children": [ - 16, - 12, - 10, - 8, - 14 + 30, + 26, + 24, + 22, + 28 + ], + "categories": [ + { + "title": "Other", + "children": [ + 30, + 26, + 28 + ] + }, + { + "title": "Test", + "children": [ + 24, + 22 + ] + } ] } ], @@ -682,13 +1027,13 @@ "extendedBy": [ { "type": "reference", - "id": 18, + "id": 32, "name": "TestSubClass" } ] }, { - "id": 18, + "id": 32, "name": "TestSubClass", "kind": 128, "kindString": "Class", @@ -697,7 +1042,7 @@ }, "children": [ { - "id": 23, + "id": 37, "name": "constructor", "kind": 512, "kindString": "Constructor", @@ -709,7 +1054,7 @@ }, "signatures": [ { - "id": 27, + "id": 41, "name": "new TestSubClass", "kind": 16384, "kindString": "Constructor signature", @@ -721,7 +1066,7 @@ }, "parameters": [ { - "id": 28, + "id": 42, "name": "p1", "kind": 32768, "kindString": "Parameter", @@ -737,7 +1082,7 @@ } }, { - "id": 29, + "id": 43, "name": "p2", "kind": 32768, "kindString": "Parameter", @@ -753,7 +1098,7 @@ } }, { - "id": 30, + "id": 44, "name": "p3", "kind": 32768, "kindString": "Parameter", @@ -769,7 +1114,7 @@ } }, { - "id": 31, + "id": 45, "name": "p4", "kind": 32768, "kindString": "Parameter", @@ -787,12 +1132,12 @@ ], "type": { "type": "reference", - "id": 18, + "id": 32, "name": "TestSubClass" }, "overwrites": { "type": "reference", - "id": 6, + "id": 20, "name": "TestClass.__constructor" } } @@ -800,18 +1145,18 @@ "sources": [ { "fileName": "class.ts", - "line": 65, + "line": 67, "character": 34 } ], "overwrites": { "type": "reference", - "id": 6, + "id": 20, "name": "TestClass.__constructor" } }, { - "id": 24, + "id": 38, "name": "p2", "kind": 1024, "kindString": "Property", @@ -826,7 +1171,7 @@ "sources": [ { "fileName": "class.ts", - "line": 75, + "line": 77, "character": 30 } ], @@ -836,7 +1181,7 @@ } }, { - "id": 25, + "id": 39, "name": "p3", "kind": 1024, "kindString": "Property", @@ -851,7 +1196,7 @@ "sources": [ { "fileName": "class.ts", - "line": 75, + "line": 77, "character": 49 } ], @@ -861,7 +1206,7 @@ } }, { - "id": 26, + "id": 40, "name": "p4", "kind": 1024, "kindString": "Property", @@ -876,7 +1221,7 @@ "sources": [ { "fileName": "class.ts", - "line": 75, + "line": 77, "character": 68 } ], @@ -886,7 +1231,7 @@ } }, { - "id": 32, + "id": 46, "name": "publicProperty", "kind": 1024, "kindString": "Property", @@ -910,12 +1255,12 @@ }, "inheritedFrom": { "type": "reference", - "id": 3, + "id": 17, "name": "TestClass.publicProperty" } }, { - "id": 33, + "id": 47, "name": "staticProperty", "kind": 1024, "kindString": "Property", @@ -935,17 +1280,17 @@ ], "type": { "type": "reference", - "id": 2, + "id": 16, "name": "TestClass" }, "inheritedFrom": { "type": "reference", - "id": 5, + "id": 19, "name": "TestClass.staticProperty" } }, { - "id": 36, + "id": 50, "name": "arrowMethod", "kind": 2048, "kindString": "Method", @@ -957,7 +1302,7 @@ }, "signatures": [ { - "id": 37, + "id": 51, "name": "arrowMethod", "kind": 4096, "kindString": "Call signature", @@ -973,7 +1318,7 @@ }, "inheritedFrom": { "type": "reference", - "id": 16, + "id": 30, "name": "TestClass.arrowMethod" } } @@ -981,18 +1326,18 @@ "sources": [ { "fileName": "class.ts", - "line": 53, + "line": 55, "character": 15 } ], "inheritedFrom": { "type": "reference", - "id": 16, + "id": 30, "name": "TestClass.arrowMethod" } }, { - "id": 46, + "id": 60, "name": "mergedMethod", "kind": 2048, "kindString": "Method", @@ -1001,7 +1346,7 @@ }, "signatures": [ { - "id": 47, + "id": 61, "name": "mergedMethod", "kind": 4096, "kindString": "Call signature", @@ -1020,13 +1365,13 @@ "sources": [ { "fileName": "class.ts", - "line": 96, + "line": 98, "character": 16 } ] }, { - "id": 21, + "id": 35, "name": "protectedMethod", "kind": 2048, "kindString": "Method", @@ -1036,7 +1381,7 @@ }, "signatures": [ { - "id": 22, + "id": 36, "name": "protectedMethod", "kind": 4096, "kindString": "Call signature", @@ -1052,7 +1397,7 @@ }, "overwrites": { "type": "reference", - "id": 10, + "id": 24, "name": "TestClass.protectedMethod" } } @@ -1060,18 +1405,18 @@ "sources": [ { "fileName": "class.ts", - "line": 65, + "line": 67, "character": 29 } ], "overwrites": { "type": "reference", - "id": 10, + "id": 24, "name": "TestClass.protectedMethod" } }, { - "id": 19, + "id": 33, "name": "publicMethod", "kind": 2048, "kindString": "Method", @@ -1081,7 +1426,7 @@ }, "signatures": [ { - "id": 20, + "id": 34, "name": "publicMethod", "kind": 4096, "kindString": "Call signature", @@ -1097,7 +1442,7 @@ }, "overwrites": { "type": "reference", - "id": 8, + "id": 22, "name": "TestClass.publicMethod" } } @@ -1105,18 +1450,18 @@ "sources": [ { "fileName": "class.ts", - "line": 60, + "line": 62, "character": 23 } ], "overwrites": { "type": "reference", - "id": 8, + "id": 22, "name": "TestClass.publicMethod" } }, { - "id": 53, + "id": 67, "name": "staticMergedMethod", "kind": 2048, "kindString": "Method", @@ -1126,7 +1471,7 @@ }, "signatures": [ { - "id": 54, + "id": 68, "name": "staticMergedMethod", "kind": 4096, "kindString": "Call signature", @@ -1145,13 +1490,13 @@ "sources": [ { "fileName": "class.ts", - "line": 103, + "line": 105, "character": 38 } ] }, { - "id": 34, + "id": 48, "name": "staticMethod", "kind": 2048, "kindString": "Method", @@ -1161,7 +1506,7 @@ }, "signatures": [ { - "id": 35, + "id": 49, "name": "staticMethod", "kind": 4096, "kindString": "Call signature", @@ -1177,7 +1522,7 @@ }, "inheritedFrom": { "type": "reference", - "id": 14, + "id": 28, "name": "TestClass.staticMethod" } } @@ -1185,13 +1530,13 @@ "sources": [ { "fileName": "class.ts", - "line": 48, + "line": 50, "character": 23 } ], "inheritedFrom": { "type": "reference", - "id": 14, + "id": 28, "name": "TestClass.staticMethod" } } @@ -1201,54 +1546,54 @@ "title": "Constructors", "kind": 512, "children": [ - 23 + 37 ] }, { "title": "Properties", "kind": 1024, "children": [ - 24, - 25, - 26, - 32, - 33 + 38, + 39, + 40, + 46, + 47 ] }, { "title": "Methods", "kind": 2048, "children": [ - 36, - 46, - 21, - 19, - 53, - 34 + 50, + 60, + 35, + 33, + 67, + 48 ] } ], "sources": [ { "fileName": "class.ts", - "line": 56, + "line": 58, "character": 25 }, { "fileName": "class.ts", - "line": 92, + "line": 94, "character": 29 }, { "fileName": "class.ts", - "line": 99, + "line": 101, "character": 26 } ], "extendedTypes": [ { "type": "reference", - "id": 2, + "id": 16, "name": "TestClass" } ] @@ -1259,11 +1604,11 @@ "title": "Classes", "kind": 128, "children": [ - 48, - 38, - 42, - 2, - 18 + 62, + 52, + 56, + 16, + 32 ] } ], @@ -1274,6 +1619,531 @@ "character": 0 } ] + }, + { + "id": 69, + "name": "\"clodule-with-subclass\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/class/clodule-with-subclass.ts", + "children": [ + { + "id": 71, + "name": "Bar", + "kind": 128, + "kindString": "Class", + "flags": { + "isExported": true + }, + "children": [ + { + "id": 72, + "name": "x", + "kind": 1024, + "kindString": "Property", + "flags": { + "isStatic": true, + "isExported": true + }, + "sources": [ + { + "fileName": "clodule-with-subclass.ts", + "line": 4, + "character": 16 + } + ], + "type": { + "type": "unknown", + "name": "1" + }, + "defaultValue": "1" + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 72 + ] + } + ], + "sources": [ + { + "fileName": "clodule-with-subclass.ts", + "line": 7, + "character": 16 + } + ], + "extendedTypes": [ + { + "type": "reference", + "id": 70, + "name": "Foo" + } + ] + }, + { + "id": 70, + "name": "Foo", + "kind": 128, + "kindString": "Class", + "flags": { + "isExported": true + }, + "children": [ + { + "id": 73, + "name": "x", + "kind": 1024, + "kindString": "Property", + "flags": { + "isStatic": true, + "isExported": true + }, + "sources": [ + { + "fileName": "clodule-with-subclass.ts", + "line": 4, + "character": 16 + } + ], + "type": { + "type": "unknown", + "name": "1" + }, + "defaultValue": "1" + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 73 + ] + } + ], + "sources": [ + { + "fileName": "clodule-with-subclass.ts", + "line": 2, + "character": 16 + }, + { + "fileName": "clodule-with-subclass.ts", + "line": 3, + "character": 20 + } + ], + "extendedBy": [ + { + "type": "reference", + "id": 71, + "name": "Bar" + } + ] + } + ], + "groups": [ + { + "title": "Classes", + "kind": 128, + "children": [ + 71, + 70 + ] + } + ], + "sources": [ + { + "fileName": "clodule-with-subclass.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 74, + "name": "\"constructor-properties\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/class/constructor-properties.ts", + "sources": [ + { + "fileName": "constructor-properties.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 75, + "name": "\"decorators\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/class/decorators.ts", + "sources": [ + { + "fileName": "decorators.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 77, + "name": "\"events\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/class/events.ts", + "sources": [ + { + "fileName": "events.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 76, + "name": "\"events-overloads\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/class/events-overloads.ts", + "sources": [ + { + "fileName": "events-overloads.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 78, + "name": "\"generic-class\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/class/generic-class.ts", + "sources": [ + { + "fileName": "generic-class.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 79, + "name": "\"getter-setter\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/class/getter-setter.ts", + "sources": [ + { + "fileName": "getter-setter.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 80, + "name": "\"this\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/class/this.ts", + "children": [ + { + "id": 81, + "name": "ChainClass", + "kind": 128, + "kindString": "Class", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "ChainClass comment short text.", + "text": "ChainClass comment text.\n" + }, + "children": [ + { + "id": 82, + "name": "chain", + "kind": 2048, + "kindString": "Method", + "flags": { + "isPublic": true, + "isExported": true + }, + "signatures": [ + { + "id": 83, + "name": "chain", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "Chain method that returns this." + }, + "type": { + "type": "intrinsic", + "name": "this" + } + } + ], + "sources": [ + { + "fileName": "this.ts", + "line": 10, + "character": 16 + } + ] + } + ], + "groups": [ + { + "title": "Methods", + "kind": 2048, + "children": [ + 82 + ] + } + ], + "sources": [ + { + "fileName": "this.ts", + "line": 6, + "character": 23 + } + ] + } + ], + "groups": [ + { + "title": "Classes", + "kind": 128, + "children": [ + 81 + ] + } + ], + "sources": [ + { + "fileName": "this.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 84, + "name": "\"type-operator\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/class/type-operator.ts", + "children": [ + { + "id": 88, + "name": "GenericClass", + "kind": 128, + "kindString": "Class", + "flags": { + "isExported": true + }, + "typeParameter": [ + { + "id": 89, + "name": "T", + "kind": 131072, + "kindString": "Type parameter", + "flags": { + "isExported": true + }, + "type": { + "type": "typeOperator", + "operator": "keyof", + "target": { + "type": "reference", + "id": 85, + "name": "TestClass" + } + } + } + ], + "children": [ + { + "id": 90, + "name": "c", + "kind": 1024, + "kindString": "Property", + "flags": { + "isExported": true + }, + "sources": [ + { + "fileName": "type-operator.ts", + "line": 14, + "character": 5 + } + ], + "type": { + "type": "typeParameter", + "name": "T", + "constraint": { + "type": "typeOperator", + "operator": "keyof", + "target": { + "type": "reference", + "id": 85, + "name": "TestClass" + } + } + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 90 + ] + } + ], + "sources": [ + { + "fileName": "type-operator.ts", + "line": 13, + "character": 25 + } + ] + }, + { + "id": 85, + "name": "TestClass", + "kind": 128, + "kindString": "Class", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "TestClass comment short text.", + "text": "TestClass comment text.\n", + "tags": [ + { + "tag": "see", + "text": "[[TestClass]] @ fixtures\n" + } + ] + }, + "children": [ + { + "id": 86, + "name": "a", + "kind": 1024, + "kindString": "Property", + "flags": { + "isExported": true + }, + "sources": [ + { + "fileName": "type-operator.ts", + "line": 9, + "character": 5 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 87, + "name": "b", + "kind": 1024, + "kindString": "Property", + "flags": { + "isExported": true + }, + "sources": [ + { + "fileName": "type-operator.ts", + "line": 10, + "character": 5 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 86, + 87 + ] + } + ], + "sources": [ + { + "fileName": "type-operator.ts", + "line": 8, + "character": 22 + } + ] + } + ], + "groups": [ + { + "title": "Classes", + "kind": 128, + "children": [ + 88, + 85 + ] + } + ], + "sources": [ + { + "fileName": "type-operator.ts", + "line": 1, + "character": 0 + } + ] } ], "groups": [ @@ -1281,7 +2151,17 @@ "title": "External modules", "kind": 1, "children": [ - 1 + 1, + 15, + 69, + 74, + 75, + 77, + 76, + 78, + 79, + 80, + 84 ] } ] diff --git a/src/test/converter/class/specs.json b/src/test/converter/class/specs.json index 07bc5cba1..22900fd8c 100644 --- a/src/test/converter/class/specs.json +++ b/src/test/converter/class/specs.json @@ -6,6 +6,334 @@ "children": [ { "id": 1, + "name": "\"access\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/class/access.ts", + "children": [ + { + "id": 2, + "name": "PrivateClass", + "kind": 128, + "kindString": "Class", + "flags": { + "isPrivate": true, + "isExported": true + }, + "comment": { + "shortText": "A class that is documented as being private." + }, + "children": [ + { + "id": 3, + "name": "fakePrivateVariable", + "kind": 1024, + "kindString": "Property", + "flags": { + "isPrivate": true, + "isExported": true + }, + "comment": { + "shortText": "A variable that is made private via comment." + }, + "sources": [ + { + "fileName": "access.ts", + "line": 34, + "character": 23 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 4, + "name": "fakeProtectedVariable", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true, + "isExported": true + }, + "comment": { + "shortText": "A variable that is made protected via comment." + }, + "sources": [ + { + "fileName": "access.ts", + "line": 40, + "character": 25 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 5, + "name": "fakePrivateFunction", + "kind": 2048, + "kindString": "Method", + "flags": { + "isPrivate": true, + "isExported": true + }, + "signatures": [ + { + "id": 6, + "name": "fakePrivateFunction", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isPrivate": true, + "isExported": true + }, + "comment": { + "shortText": "A function that is made private via comment." + }, + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "access.ts", + "line": 46, + "character": 23 + } + ] + }, + { + "id": 7, + "name": "fakeProtectedFunction", + "kind": 2048, + "kindString": "Method", + "flags": { + "isProtected": true, + "isExported": true + }, + "signatures": [ + { + "id": 8, + "name": "fakeProtectedFunction", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isProtected": true, + "isExported": true + }, + "comment": { + "shortText": "A function that is made protected via comment." + }, + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "access.ts", + "line": 52, + "character": 25 + } + ] + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 3, + 4 + ] + }, + { + "title": "Methods", + "kind": 2048, + "children": [ + 5, + 7 + ] + } + ], + "sources": [ + { + "fileName": "access.ts", + "line": 29, + "character": 25 + } + ] + }, + { + "id": 9, + "name": "fakePrivateVariable", + "kind": 32, + "kindString": "Variable", + "flags": { + "isPrivate": true, + "isExported": true, + "isConst": true + }, + "comment": { + "shortText": "A variable that is made private via comment." + }, + "sources": [ + { + "fileName": "access.ts", + "line": 5, + "character": 32 + } + ], + "type": { + "type": "stringLiteral", + "value": "test" + }, + "defaultValue": "\"test\"" + }, + { + "id": 10, + "name": "fakeProtectedVariable", + "kind": 32, + "kindString": "Variable", + "flags": { + "isProtected": true, + "isExported": true, + "isConst": true + }, + "comment": { + "shortText": "A variable that is made protected via comment." + }, + "sources": [ + { + "fileName": "access.ts", + "line": 11, + "character": 34 + } + ], + "type": { + "type": "stringLiteral", + "value": "test" + }, + "defaultValue": "\"test\"" + }, + { + "id": 11, + "name": "fakePrivateFunction", + "kind": 64, + "kindString": "Function", + "flags": { + "isPrivate": true, + "isExported": true + }, + "signatures": [ + { + "id": 12, + "name": "fakePrivateFunction", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isPrivate": true, + "isExported": true + }, + "comment": { + "shortText": "A function that is made private via comment." + }, + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "access.ts", + "line": 17, + "character": 35 + } + ] + }, + { + "id": 13, + "name": "fakeProtectedFunction", + "kind": 64, + "kindString": "Function", + "flags": { + "isProtected": true, + "isExported": true + }, + "signatures": [ + { + "id": 14, + "name": "fakeProtectedFunction", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isProtected": true, + "isExported": true + }, + "comment": { + "shortText": "A function that is made protected via comment." + }, + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "access.ts", + "line": 23, + "character": 37 + } + ] + } + ], + "groups": [ + { + "title": "Classes", + "kind": 128, + "children": [ + 2 + ] + }, + { + "title": "Variables", + "kind": 32, + "children": [ + 9, + 10 + ] + }, + { + "title": "Functions", + "kind": 64, + "children": [ + 11, + 13 + ] + } + ], + "sources": [ + { + "fileName": "access.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 15, "name": "\"class\"", "kind": 1, "kindString": "External module", @@ -15,7 +343,7 @@ "originalName": "%BASE%/class/class.ts", "children": [ { - "id": 53, + "id": 67, "name": "ComputedNames", "kind": 128, "kindString": "Class", @@ -24,7 +352,7 @@ }, "children": [ { - "id": 54, + "id": 68, "name": "[Symbol.toStringTag]", "kind": 1024, "kindString": "Property", @@ -34,7 +362,7 @@ "sources": [ { "fileName": "class.ts", - "line": 121, + "line": 123, "character": 24 } ], @@ -45,7 +373,7 @@ "defaultValue": "\"computed\"" }, { - "id": 55, + "id": 69, "name": "[x]", "kind": 1024, "kindString": "Property", @@ -55,7 +383,7 @@ "sources": [ { "fileName": "class.ts", - "line": 122, + "line": 124, "character": 7 } ], @@ -66,7 +394,7 @@ "defaultValue": "true" }, { - "id": 56, + "id": 70, "name": "literal2", "kind": 1024, "kindString": "Property", @@ -76,7 +404,7 @@ "sources": [ { "fileName": "class.ts", - "line": 123, + "line": 125, "character": 16 } ], @@ -87,7 +415,7 @@ "defaultValue": "true" }, { - "id": 57, + "id": 71, "name": "y", "kind": 1024, "kindString": "Property", @@ -97,7 +425,7 @@ "sources": [ { "fileName": "class.ts", - "line": 124, + "line": 126, "character": 5 } ], @@ -113,23 +441,23 @@ "title": "Properties", "kind": 1024, "children": [ - 54, - 55, - 56, - 57 + 68, + 69, + 70, + 71 ] } ], "sources": [ { "fileName": "class.ts", - "line": 120, + "line": 122, "character": 26 } ] }, { - "id": 48, + "id": 62, "name": "NotExportedClass", "kind": 128, "kindString": "Class", @@ -141,14 +469,14 @@ }, "children": [ { - "id": 49, + "id": 63, "name": "add", "kind": 2048, "kindString": "Method", "flags": {}, "signatures": [ { - "id": 50, + "id": 64, "name": "add", "kind": 4096, "kindString": "Call signature", @@ -158,7 +486,7 @@ }, "parameters": [ { - "id": 51, + "id": 65, "name": "a", "kind": 32768, "kindString": "Parameter", @@ -169,7 +497,7 @@ } }, { - "id": 52, + "id": 66, "name": "b", "kind": 32768, "kindString": "Parameter", @@ -189,7 +517,7 @@ "sources": [ { "fileName": "class.ts", - "line": 113, + "line": 115, "character": 7 } ] @@ -200,20 +528,20 @@ "title": "Methods", "kind": 2048, "children": [ - 49 + 63 ] } ], "sources": [ { "fileName": "class.ts", - "line": 109, + "line": 111, "character": 31 } ] }, { - "id": 38, + "id": 52, "name": "TestAbstractClass", "kind": 128, "kindString": "Class", @@ -223,7 +551,7 @@ }, "children": [ { - "id": 39, + "id": 53, "name": "myAbstractProperty", "kind": 1024, "kindString": "Property", @@ -234,7 +562,7 @@ "sources": [ { "fileName": "class.ts", - "line": 81, + "line": 83, "character": 31 } ], @@ -244,7 +572,7 @@ } }, { - "id": 40, + "id": 54, "name": "myAbstractMethod", "kind": 2048, "kindString": "Method", @@ -255,7 +583,7 @@ }, "signatures": [ { - "id": 41, + "id": 55, "name": "myAbstractMethod", "kind": 4096, "kindString": "Call signature", @@ -271,7 +599,7 @@ "sources": [ { "fileName": "class.ts", - "line": 83, + "line": 85, "character": 39 } ] @@ -282,34 +610,34 @@ "title": "Properties", "kind": 1024, "children": [ - 39 + 53 ] }, { "title": "Methods", "kind": 2048, "children": [ - 40 + 54 ] } ], "sources": [ { "fileName": "class.ts", - "line": 80, + "line": 82, "character": 39 } ], "extendedBy": [ { "type": "reference", - "id": 42, + "id": 56, "name": "TestAbstractClassImplementation" } ] }, { - "id": 42, + "id": 56, "name": "TestAbstractClassImplementation", "kind": 128, "kindString": "Class", @@ -318,7 +646,7 @@ }, "children": [ { - "id": 43, + "id": 57, "name": "myAbstractProperty", "kind": 1024, "kindString": "Property", @@ -328,7 +656,7 @@ "sources": [ { "fileName": "class.ts", - "line": 87, + "line": 89, "character": 22 } ], @@ -338,12 +666,12 @@ }, "overwrites": { "type": "reference", - "id": 39, + "id": 53, "name": "TestAbstractClass.myAbstractProperty" } }, { - "id": 44, + "id": 58, "name": "myAbstractMethod", "kind": 2048, "kindString": "Method", @@ -353,7 +681,7 @@ }, "signatures": [ { - "id": 45, + "id": 59, "name": "myAbstractMethod", "kind": 4096, "kindString": "Call signature", @@ -366,7 +694,7 @@ }, "overwrites": { "type": "reference", - "id": 40, + "id": 54, "name": "TestAbstractClass.myAbstractMethod" } } @@ -374,13 +702,13 @@ "sources": [ { "fileName": "class.ts", - "line": 89, + "line": 91, "character": 30 } ], "overwrites": { "type": "reference", - "id": 40, + "id": 54, "name": "TestAbstractClass.myAbstractMethod" } } @@ -390,34 +718,34 @@ "title": "Properties", "kind": 1024, "children": [ - 43 + 57 ] }, { "title": "Methods", "kind": 2048, "children": [ - 44 + 58 ] } ], "sources": [ { "fileName": "class.ts", - "line": 86, + "line": 88, "character": 44 } ], "extendedTypes": [ { "type": "reference", - "id": 38, + "id": 52, "name": "TestAbstractClass" } ] }, { - "id": 2, + "id": 16, "name": "TestClass", "kind": 128, "kindString": "Class", @@ -436,7 +764,7 @@ }, "children": [ { - "id": 6, + "id": 20, "name": "constructor", "kind": 512, "kindString": "Constructor", @@ -448,7 +776,7 @@ }, "signatures": [ { - "id": 7, + "id": 21, "name": "new TestClass", "kind": 16384, "kindString": "Constructor signature", @@ -460,7 +788,7 @@ }, "type": { "type": "reference", - "id": 2, + "id": 16, "name": "TestClass" } } @@ -474,7 +802,7 @@ ] }, { - "id": 4, + "id": 18, "name": "privateProperty", "kind": 1024, "kindString": "Property", @@ -501,7 +829,7 @@ } }, { - "id": 3, + "id": 17, "name": "publicProperty", "kind": 1024, "kindString": "Property", @@ -525,7 +853,7 @@ } }, { - "id": 5, + "id": 19, "name": "staticProperty", "kind": 1024, "kindString": "Property", @@ -545,12 +873,12 @@ ], "type": { "type": "reference", - "id": 2, + "id": 16, "name": "TestClass" } }, { - "id": 16, + "id": 30, "name": "arrowMethod", "kind": 2048, "kindString": "Method", @@ -562,7 +890,7 @@ }, "signatures": [ { - "id": 17, + "id": 31, "name": "arrowMethod", "kind": 4096, "kindString": "Call signature", @@ -581,13 +909,13 @@ "sources": [ { "fileName": "class.ts", - "line": 53, + "line": 55, "character": 15 } ] }, { - "id": 12, + "id": 26, "name": "privateMethod", "kind": 2048, "kindString": "Method", @@ -597,7 +925,7 @@ }, "signatures": [ { - "id": 13, + "id": 27, "name": "privateMethod", "kind": 4096, "kindString": "Call signature", @@ -616,13 +944,13 @@ "sources": [ { "fileName": "class.ts", - "line": 43, + "line": 45, "character": 25 } ] }, { - "id": 10, + "id": 24, "name": "protectedMethod", "kind": 2048, "kindString": "Method", @@ -632,7 +960,7 @@ }, "signatures": [ { - "id": 11, + "id": 25, "name": "protectedMethod", "kind": 4096, "kindString": "Call signature", @@ -651,13 +979,13 @@ "sources": [ { "fileName": "class.ts", - "line": 38, + "line": 40, "character": 29 } ] }, { - "id": 8, + "id": 22, "name": "publicMethod", "kind": 2048, "kindString": "Method", @@ -667,7 +995,7 @@ }, "signatures": [ { - "id": 9, + "id": 23, "name": "publicMethod", "kind": 4096, "kindString": "Call signature", @@ -686,13 +1014,13 @@ "sources": [ { "fileName": "class.ts", - "line": 33, + "line": 34, "character": 23 } ] }, { - "id": 14, + "id": 28, "name": "staticMethod", "kind": 2048, "kindString": "Method", @@ -702,7 +1030,7 @@ }, "signatures": [ { - "id": 15, + "id": 29, "name": "staticMethod", "kind": 4096, "kindString": "Call signature", @@ -721,7 +1049,7 @@ "sources": [ { "fileName": "class.ts", - "line": 48, + "line": 50, "character": 23 } ] @@ -732,27 +1060,44 @@ "title": "Constructors", "kind": 512, "children": [ - 6 + 20 ] }, { "title": "Properties", "kind": 1024, "children": [ - 4, - 3, - 5 + 18, + 17, + 19 ] }, { "title": "Methods", "kind": 2048, "children": [ - 16, - 12, - 10, - 8, - 14 + 30, + 26, + 24, + 22, + 28 + ], + "categories": [ + { + "title": "Other", + "children": [ + 30, + 26, + 28 + ] + }, + { + "title": "Test", + "children": [ + 24, + 22 + ] + } ] } ], @@ -766,13 +1111,13 @@ "extendedBy": [ { "type": "reference", - "id": 18, + "id": 32, "name": "TestSubClass" } ] }, { - "id": 18, + "id": 32, "name": "TestSubClass", "kind": 128, "kindString": "Class", @@ -781,7 +1126,7 @@ }, "children": [ { - "id": 23, + "id": 37, "name": "constructor", "kind": 512, "kindString": "Constructor", @@ -793,7 +1138,7 @@ }, "signatures": [ { - "id": 27, + "id": 41, "name": "new TestSubClass", "kind": 16384, "kindString": "Constructor signature", @@ -805,7 +1150,7 @@ }, "parameters": [ { - "id": 28, + "id": 42, "name": "p1", "kind": 32768, "kindString": "Parameter", @@ -821,7 +1166,7 @@ } }, { - "id": 29, + "id": 43, "name": "p2", "kind": 32768, "kindString": "Parameter", @@ -837,7 +1182,7 @@ } }, { - "id": 30, + "id": 44, "name": "p3", "kind": 32768, "kindString": "Parameter", @@ -853,7 +1198,7 @@ } }, { - "id": 31, + "id": 45, "name": "p4", "kind": 32768, "kindString": "Parameter", @@ -871,12 +1216,12 @@ ], "type": { "type": "reference", - "id": 18, + "id": 32, "name": "TestSubClass" }, "overwrites": { "type": "reference", - "id": 6, + "id": 20, "name": "TestClass.__constructor" } } @@ -884,18 +1229,18 @@ "sources": [ { "fileName": "class.ts", - "line": 65, + "line": 67, "character": 34 } ], "overwrites": { "type": "reference", - "id": 6, + "id": 20, "name": "TestClass.__constructor" } }, { - "id": 24, + "id": 38, "name": "p2", "kind": 1024, "kindString": "Property", @@ -910,7 +1255,7 @@ "sources": [ { "fileName": "class.ts", - "line": 75, + "line": 77, "character": 30 } ], @@ -920,7 +1265,7 @@ } }, { - "id": 25, + "id": 39, "name": "p3", "kind": 1024, "kindString": "Property", @@ -935,7 +1280,7 @@ "sources": [ { "fileName": "class.ts", - "line": 75, + "line": 77, "character": 49 } ], @@ -945,7 +1290,7 @@ } }, { - "id": 26, + "id": 40, "name": "p4", "kind": 1024, "kindString": "Property", @@ -960,7 +1305,7 @@ "sources": [ { "fileName": "class.ts", - "line": 75, + "line": 77, "character": 68 } ], @@ -970,7 +1315,7 @@ } }, { - "id": 32, + "id": 46, "name": "publicProperty", "kind": 1024, "kindString": "Property", @@ -994,12 +1339,12 @@ }, "inheritedFrom": { "type": "reference", - "id": 3, + "id": 17, "name": "TestClass.publicProperty" } }, { - "id": 33, + "id": 47, "name": "staticProperty", "kind": 1024, "kindString": "Property", @@ -1019,17 +1364,17 @@ ], "type": { "type": "reference", - "id": 2, + "id": 16, "name": "TestClass" }, "inheritedFrom": { "type": "reference", - "id": 5, + "id": 19, "name": "TestClass.staticProperty" } }, { - "id": 36, + "id": 50, "name": "arrowMethod", "kind": 2048, "kindString": "Method", @@ -1041,7 +1386,7 @@ }, "signatures": [ { - "id": 37, + "id": 51, "name": "arrowMethod", "kind": 4096, "kindString": "Call signature", @@ -1057,7 +1402,7 @@ }, "inheritedFrom": { "type": "reference", - "id": 16, + "id": 30, "name": "TestClass.arrowMethod" } } @@ -1065,18 +1410,18 @@ "sources": [ { "fileName": "class.ts", - "line": 53, + "line": 55, "character": 15 } ], "inheritedFrom": { "type": "reference", - "id": 16, + "id": 30, "name": "TestClass.arrowMethod" } }, { - "id": 46, + "id": 60, "name": "mergedMethod", "kind": 2048, "kindString": "Method", @@ -1085,7 +1430,7 @@ }, "signatures": [ { - "id": 47, + "id": 61, "name": "mergedMethod", "kind": 4096, "kindString": "Call signature", @@ -1104,13 +1449,13 @@ "sources": [ { "fileName": "class.ts", - "line": 96, + "line": 98, "character": 16 } ] }, { - "id": 21, + "id": 35, "name": "protectedMethod", "kind": 2048, "kindString": "Method", @@ -1120,7 +1465,7 @@ }, "signatures": [ { - "id": 22, + "id": 36, "name": "protectedMethod", "kind": 4096, "kindString": "Call signature", @@ -1136,7 +1481,7 @@ }, "overwrites": { "type": "reference", - "id": 10, + "id": 24, "name": "TestClass.protectedMethod" } } @@ -1144,18 +1489,18 @@ "sources": [ { "fileName": "class.ts", - "line": 65, + "line": 67, "character": 29 } ], "overwrites": { "type": "reference", - "id": 10, + "id": 24, "name": "TestClass.protectedMethod" } }, { - "id": 19, + "id": 33, "name": "publicMethod", "kind": 2048, "kindString": "Method", @@ -1165,7 +1510,7 @@ }, "signatures": [ { - "id": 20, + "id": 34, "name": "publicMethod", "kind": 4096, "kindString": "Call signature", @@ -1181,7 +1526,7 @@ }, "overwrites": { "type": "reference", - "id": 8, + "id": 22, "name": "TestClass.publicMethod" } } @@ -1189,18 +1534,18 @@ "sources": [ { "fileName": "class.ts", - "line": 60, + "line": 62, "character": 23 } ], "overwrites": { "type": "reference", - "id": 8, + "id": 22, "name": "TestClass.publicMethod" } }, { - "id": 58, + "id": 72, "name": "staticMergedMethod", "kind": 2048, "kindString": "Method", @@ -1210,7 +1555,7 @@ }, "signatures": [ { - "id": 59, + "id": 73, "name": "staticMergedMethod", "kind": 4096, "kindString": "Call signature", @@ -1229,13 +1574,13 @@ "sources": [ { "fileName": "class.ts", - "line": 103, + "line": 105, "character": 38 } ] }, { - "id": 34, + "id": 48, "name": "staticMethod", "kind": 2048, "kindString": "Method", @@ -1245,7 +1590,7 @@ }, "signatures": [ { - "id": 35, + "id": 49, "name": "staticMethod", "kind": 4096, "kindString": "Call signature", @@ -1261,7 +1606,7 @@ }, "inheritedFrom": { "type": "reference", - "id": 14, + "id": 28, "name": "TestClass.staticMethod" } } @@ -1269,13 +1614,13 @@ "sources": [ { "fileName": "class.ts", - "line": 48, + "line": 50, "character": 23 } ], "inheritedFrom": { "type": "reference", - "id": 14, + "id": 28, "name": "TestClass.staticMethod" } } @@ -1285,60 +1630,60 @@ "title": "Constructors", "kind": 512, "children": [ - 23 + 37 ] }, { "title": "Properties", "kind": 1024, "children": [ - 24, - 25, - 26, - 32, - 33 + 38, + 39, + 40, + 46, + 47 ] }, { "title": "Methods", "kind": 2048, "children": [ - 36, - 46, - 21, - 19, - 58, - 34 + 50, + 60, + 35, + 33, + 72, + 48 ] } ], "sources": [ { "fileName": "class.ts", - "line": 56, + "line": 58, "character": 25 }, { "fileName": "class.ts", - "line": 92, + "line": 94, "character": 29 }, { "fileName": "class.ts", - "line": 99, + "line": 101, "character": 26 } ], "extendedTypes": [ { "type": "reference", - "id": 2, + "id": 16, "name": "TestClass" } ] }, { - "id": 60, + "id": 74, "name": "x", "kind": 32, "kindString": "Variable", @@ -1348,7 +1693,7 @@ "sources": [ { "fileName": "class.ts", - "line": 118, + "line": 120, "character": 7 } ], @@ -1364,19 +1709,19 @@ "title": "Classes", "kind": 128, "children": [ - 53, - 48, - 38, - 42, - 2, - 18 + 67, + 62, + 52, + 56, + 16, + 32 ] }, { "title": "Variables", "kind": 32, "children": [ - 60 + 74 ] } ], @@ -1387,6 +1732,2413 @@ "character": 0 } ] + }, + { + "id": 75, + "name": "\"clodule-with-subclass\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/class/clodule-with-subclass.ts", + "children": [ + { + "id": 77, + "name": "Bar", + "kind": 128, + "kindString": "Class", + "flags": { + "isExported": true + }, + "children": [ + { + "id": 78, + "name": "x", + "kind": 1024, + "kindString": "Property", + "flags": { + "isStatic": true, + "isExported": true + }, + "sources": [ + { + "fileName": "clodule-with-subclass.ts", + "line": 4, + "character": 16 + } + ], + "type": { + "type": "unknown", + "name": "1" + }, + "defaultValue": "1" + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 78 + ] + } + ], + "sources": [ + { + "fileName": "clodule-with-subclass.ts", + "line": 7, + "character": 16 + } + ], + "extendedTypes": [ + { + "type": "reference", + "id": 76, + "name": "Foo" + } + ] + }, + { + "id": 76, + "name": "Foo", + "kind": 128, + "kindString": "Class", + "flags": { + "isExported": true + }, + "children": [ + { + "id": 79, + "name": "x", + "kind": 1024, + "kindString": "Property", + "flags": { + "isStatic": true, + "isExported": true + }, + "sources": [ + { + "fileName": "clodule-with-subclass.ts", + "line": 4, + "character": 16 + } + ], + "type": { + "type": "unknown", + "name": "1" + }, + "defaultValue": "1" + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 79 + ] + } + ], + "sources": [ + { + "fileName": "clodule-with-subclass.ts", + "line": 2, + "character": 16 + }, + { + "fileName": "clodule-with-subclass.ts", + "line": 3, + "character": 20 + } + ], + "extendedBy": [ + { + "type": "reference", + "id": 77, + "name": "Bar" + } + ] + } + ], + "groups": [ + { + "title": "Classes", + "kind": 128, + "children": [ + 77, + 76 + ] + } + ], + "sources": [ + { + "fileName": "clodule-with-subclass.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 80, + "name": "\"constructor-properties\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/class/constructor-properties.ts", + "children": [ + { + "id": 81, + "name": "Vector2", + "kind": 128, + "kindString": "Class", + "flags": {}, + "comment": { + "shortText": "A class with constructor properties." + }, + "children": [ + { + "id": 82, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "comment": {}, + "signatures": [ + { + "id": 86, + "name": "new Vector2", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "comment": {}, + "parameters": [ + { + "id": 87, + "name": "x", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "X component of the Vector" + }, + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 88, + "name": "y", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "Y component of the Vector" + }, + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 89, + "name": "name", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "Vector name\n" + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "id": 81, + "name": "Vector2" + } + } + ], + "sources": [ + { + "fileName": "constructor-properties.ts", + "line": 4, + "character": 15 + } + ] + }, + { + "id": 85, + "name": "name", + "kind": 1024, + "kindString": "Property", + "flags": { + "isConstructorProperty": true + }, + "comment": { + "shortText": "Vector name\n" + }, + "sources": [ + { + "fileName": "constructor-properties.ts", + "line": 11, + "character": 29 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 83, + "name": "x", + "kind": 1024, + "kindString": "Property", + "flags": { + "isPublic": true, + "isConstructorProperty": true + }, + "comment": { + "shortText": "X component of the Vector" + }, + "sources": [ + { + "fileName": "constructor-properties.ts", + "line": 10, + "character": 24 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 84, + "name": "y", + "kind": 1024, + "kindString": "Property", + "flags": { + "isPublic": true, + "isConstructorProperty": true + }, + "comment": { + "shortText": "Y component of the Vector" + }, + "sources": [ + { + "fileName": "constructor-properties.ts", + "line": 10, + "character": 42 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 82 + ] + }, + { + "title": "Properties", + "kind": 1024, + "children": [ + 85, + 83, + 84 + ] + } + ], + "sources": [ + { + "fileName": "constructor-properties.ts", + "line": 4, + "character": 13 + } + ], + "extendedBy": [ + { + "type": "reference", + "id": 90, + "name": "Vector3" + } + ] + }, + { + "id": 90, + "name": "Vector3", + "kind": 128, + "kindString": "Class", + "flags": {}, + "comment": { + "shortText": "A class with inherited and overwritten constructor properties." + }, + "children": [ + { + "id": 91, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "comment": {}, + "signatures": [ + { + "id": 95, + "name": "new Vector3", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "comment": {}, + "parameters": [ + { + "id": 96, + "name": "x", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "X component of the Vector" + }, + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 97, + "name": "y", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "Y component of the Vector" + }, + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 98, + "name": "z", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "Z component of the Vector" + }, + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 99, + "name": "name", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "Vector name\n" + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "id": 90, + "name": "Vector3" + }, + "overwrites": { + "type": "reference", + "id": 82, + "name": "Vector2.__constructor" + } + } + ], + "sources": [ + { + "fileName": "constructor-properties.ts", + "line": 18, + "character": 31 + } + ], + "overwrites": { + "type": "reference", + "id": 82, + "name": "Vector2.__constructor" + } + }, + { + "id": 94, + "name": "name", + "kind": 1024, + "kindString": "Property", + "flags": { + "isConstructorProperty": true + }, + "comment": { + "shortText": "Vector name\n" + }, + "sources": [ + { + "fileName": "constructor-properties.ts", + "line": 26, + "character": 29 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "overwrites": { + "type": "reference", + "id": 85, + "name": "Vector2.name" + } + }, + { + "id": 100, + "name": "x", + "kind": 1024, + "kindString": "Property", + "flags": { + "isPublic": true, + "isConstructorProperty": true + }, + "comment": { + "shortText": "X component of the Vector" + }, + "sources": [ + { + "fileName": "constructor-properties.ts", + "line": 10, + "character": 24 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + }, + "inheritedFrom": { + "type": "reference", + "id": 83, + "name": "Vector2.x" + } + }, + { + "id": 92, + "name": "y", + "kind": 1024, + "kindString": "Property", + "flags": { + "isPublic": true, + "isConstructorProperty": true + }, + "comment": { + "shortText": "Y component of the Vector" + }, + "sources": [ + { + "fileName": "constructor-properties.ts", + "line": 25, + "character": 35 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + }, + "overwrites": { + "type": "reference", + "id": 84, + "name": "Vector2.y" + } + }, + { + "id": 93, + "name": "z", + "kind": 1024, + "kindString": "Property", + "flags": { + "isPublic": true, + "isConstructorProperty": true + }, + "comment": { + "shortText": "Z component of the Vector" + }, + "sources": [ + { + "fileName": "constructor-properties.ts", + "line": 25, + "character": 53 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 91 + ] + }, + { + "title": "Properties", + "kind": 1024, + "children": [ + 94, + 100, + 92, + 93 + ] + } + ], + "sources": [ + { + "fileName": "constructor-properties.ts", + "line": 18, + "character": 13 + } + ], + "extendedTypes": [ + { + "type": "reference", + "id": 81, + "name": "Vector2" + } + ] + } + ], + "groups": [ + { + "title": "Classes", + "kind": 128, + "children": [ + 81, + 90 + ] + } + ], + "sources": [ + { + "fileName": "constructor-properties.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 101, + "name": "\"decorators\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/class/decorators.ts", + "children": [ + { + "id": 102, + "name": "DecoratedClass", + "kind": 128, + "kindString": "Class", + "flags": {}, + "comment": { + "shortText": "A decorated class." + }, + "decorators": [ + { + "name": "decoratorWithOptions", + "type": { + "type": "reference", + "id": 113, + "name": "decoratorWithOptions" + }, + "arguments": { + "options": "{\n name: 'Name of class'\n}" + } + } + ], + "children": [ + { + "id": 103, + "name": "decoratedMethod", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "decorators": [ + { + "name": "decoratorAtom", + "type": { + "type": "reference", + "id": 105, + "name": "decoratorAtom" + } + }, + { + "name": "decoratorWithParam", + "type": { + "type": "reference", + "id": 110, + "name": "decoratorWithParam" + }, + "arguments": { + "value": "false" + } + } + ], + "signatures": [ + { + "id": 104, + "name": "decoratedMethod", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "A decorated method." + }, + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "decorators.ts", + "line": 13, + "character": 19 + } + ] + } + ], + "groups": [ + { + "title": "Methods", + "kind": 2048, + "children": [ + 103 + ] + } + ], + "sources": [ + { + "fileName": "decorators.ts", + "line": 7, + "character": 20 + } + ] + }, + { + "id": 105, + "name": "decoratorAtom", + "kind": 64, + "kindString": "Function", + "flags": {}, + "decorates": [ + { + "type": "reference", + "id": 103, + "name": "decoratedMethod" + } + ], + "signatures": [ + { + "id": 106, + "name": "decoratorAtom", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "A decorator with no options." + }, + "parameters": [ + { + "id": 107, + "name": "target", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "name": "Object" + } + }, + { + "id": 108, + "name": "propertyKey", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "union", + "types": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "symbol" + } + ] + } + }, + { + "id": 109, + "name": "descriptor", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "any" + } + ], + "name": "TypedPropertyDescriptor" + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "decorators.ts", + "line": 19, + "character": 22 + } + ] + }, + { + "id": 113, + "name": "decoratorWithOptions", + "kind": 64, + "kindString": "Function", + "flags": {}, + "decorates": [ + { + "type": "reference", + "id": 102, + "name": "DecoratedClass" + } + ], + "signatures": [ + { + "id": 114, + "name": "decoratorWithOptions", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "A decorator consuming an options object." + }, + "parameters": [ + { + "id": 115, + "name": "options", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "text": "The options object of this decorator." + }, + "type": { + "type": "reflection", + "declaration": { + "id": 116, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 117, + "name": "name", + "kind": 32, + "kindString": "Variable", + "flags": {}, + "comment": { + "text": "A property on the options object of this decorator.\n" + }, + "sources": [ + { + "fileName": "decorators.ts", + "line": 40, + "character": 44 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Variables", + "kind": 32, + "children": [ + 117 + ] + } + ], + "sources": [ + { + "fileName": "decorators.ts", + "line": 40, + "character": 38 + } + ] + } + } + } + ], + "type": { + "type": "reference", + "name": "ClassDecorator" + } + } + ], + "sources": [ + { + "fileName": "decorators.ts", + "line": 40, + "character": 29 + } + ] + }, + { + "id": 110, + "name": "decoratorWithParam", + "kind": 64, + "kindString": "Function", + "flags": {}, + "decorates": [ + { + "type": "reference", + "id": 103, + "name": "decoratedMethod" + } + ], + "signatures": [ + { + "id": 111, + "name": "decoratorWithParam", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "A decorator with a parameter." + }, + "parameters": [ + { + "id": 112, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "text": "The parameter of this decorator.\n" + }, + "type": { + "type": "intrinsic", + "name": "boolean" + } + } + ], + "type": { + "type": "reference", + "name": "MethodDecorator" + } + } + ], + "sources": [ + { + "fileName": "decorators.ts", + "line": 28, + "character": 27 + } + ] + } + ], + "groups": [ + { + "title": "Classes", + "kind": 128, + "children": [ + 102 + ] + }, + { + "title": "Functions", + "kind": 64, + "children": [ + 105, + 113, + 110 + ] + } + ], + "sources": [ + { + "fileName": "decorators.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 145, + "name": "\"events\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/class/events.ts", + "children": [ + { + "id": 146, + "name": "EventDispatcher", + "kind": 128, + "kindString": "Class", + "flags": {}, + "children": [ + { + "id": 147, + "name": "EVENT_CLICK", + "kind": 8388608, + "kindString": "Event", + "flags": { + "isStatic": true + }, + "comment": { + "shortText": "This is an event documentation." + }, + "sources": [ + { + "fileName": "events.ts", + "line": 6, + "character": 22 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "defaultValue": "\"click\"" + } + ], + "groups": [ + { + "title": "Events", + "kind": 8388608, + "children": [ + 147 + ] + } + ], + "sources": [ + { + "fileName": "events.ts", + "line": 1, + "character": 21 + } + ] + } + ], + "groups": [ + { + "title": "Classes", + "kind": 128, + "children": [ + 146 + ] + } + ], + "sources": [ + { + "fileName": "events.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 118, + "name": "\"events-overloads\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/class/events-overloads.ts", + "children": [ + { + "id": 119, + "name": "Test", + "kind": 256, + "kindString": "Interface", + "flags": {}, + "comment": { + "shortText": "Encapsulates some information for background http transfers.", + "tags": [ + { + "tag": "see", + "text": "https://github.com/sebastian-lenz/typedoc/issues/136\n" + } + ] + }, + "children": [ + { + "id": 120, + "name": "on", + "kind": 8388608, + "kindString": "Event", + "flags": {}, + "signatures": [ + { + "id": 121, + "name": "on", + "kind": 8388608, + "kindString": "Event", + "flags": {}, + "comment": { + "shortText": "Subscribe for a general event by name." + }, + "parameters": [ + { + "id": 122, + "name": "event", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "text": "The name of the event to subscribe for." + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 123, + "name": "handler", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "text": "The handler called when the event occurs.\n" + }, + "type": { + "type": "reflection", + "declaration": { + "id": 124, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 125, + "name": "__call", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 126, + "name": "e", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "any" + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "events-overloads.ts", + "line": 14, + "character": 30 + } + ] + } + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + }, + { + "id": 127, + "name": "on", + "kind": 8388608, + "kindString": "Event", + "flags": {}, + "comment": { + "shortText": "Subscribe for error notifications." + }, + "parameters": [ + { + "id": 128, + "name": "event", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "text": "The name of the event to subscribe for." + }, + "type": { + "type": "stringLiteral", + "value": "error" + } + }, + { + "id": 129, + "name": "handler", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "text": "A handler that will receive the error details\n" + }, + "type": { + "type": "reflection", + "declaration": { + "id": 130, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 131, + "name": "__call", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 132, + "name": "e", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "any" + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "events-overloads.ts", + "line": 23, + "character": 31 + } + ] + } + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + }, + { + "id": 133, + "name": "on", + "kind": 8388608, + "kindString": "Event", + "flags": {}, + "comment": { + "shortText": "Subscribe for progress notifications." + }, + "parameters": [ + { + "id": 134, + "name": "event", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "text": "The name of the event to subscribe for." + }, + "type": { + "type": "stringLiteral", + "value": "progress" + } + }, + { + "id": 135, + "name": "handler", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "text": "A handler that will receive a progress event with the current and expected total bytes\n" + }, + "type": { + "type": "reflection", + "declaration": { + "id": 136, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 137, + "name": "__call", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 138, + "name": "e", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "any" + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "events-overloads.ts", + "line": 32, + "character": 34 + } + ] + } + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + }, + { + "id": 139, + "name": "on", + "kind": 8388608, + "kindString": "Event", + "flags": {}, + "comment": { + "shortText": "Subscribe for success notification." + }, + "parameters": [ + { + "id": 140, + "name": "event", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "text": "The name of the event to subscribe for." + }, + "type": { + "type": "stringLiteral", + "value": "complete" + } + }, + { + "id": 141, + "name": "handler", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "text": "A function that will be called with general event data upon successful completion\n" + }, + "type": { + "type": "reflection", + "declaration": { + "id": 142, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 143, + "name": "__call", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 144, + "name": "e", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "any" + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "events-overloads.ts", + "line": 41, + "character": 34 + } + ] + } + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "events-overloads.ts", + "line": 14, + "character": 6 + }, + { + "fileName": "events-overloads.ts", + "line": 23, + "character": 6 + }, + { + "fileName": "events-overloads.ts", + "line": 32, + "character": 6 + }, + { + "fileName": "events-overloads.ts", + "line": 41, + "character": 6 + } + ] + } + ], + "groups": [ + { + "title": "Events", + "kind": 8388608, + "children": [ + 120 + ] + } + ], + "sources": [ + { + "fileName": "events-overloads.ts", + "line": 6, + "character": 14 + } + ] + } + ], + "groups": [ + { + "title": "Interfaces", + "kind": 256, + "children": [ + 119 + ] + } + ], + "sources": [ + { + "fileName": "events-overloads.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 148, + "name": "\"generic-class\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/class/generic-class.ts", + "children": [ + { + "id": 149, + "name": "GenericClass", + "kind": 128, + "kindString": "Class", + "flags": {}, + "comment": { + "shortText": "GenericClass short text." + }, + "typeParameter": [ + { + "id": 150, + "name": "T", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "comment": { + "shortText": "Generic parameter.\n" + } + } + ], + "children": [ + { + "id": 153, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "comment": { + "shortText": "Constructor short text." + }, + "signatures": [ + { + "id": 154, + "name": "new GenericClass", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "comment": { + "shortText": "Constructor short text." + }, + "parameters": [ + { + "id": 155, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "Constructor parameter.\n" + }, + "type": { + "type": "typeParameter", + "name": "T" + } + } + ], + "type": { + "type": "reference", + "id": 149, + "name": "GenericClass" + } + } + ], + "sources": [ + { + "fileName": "generic-class.ts", + "line": 14, + "character": 26 + } + ] + }, + { + "id": 151, + "name": "value", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "comment": { + "shortText": "Generic property." + }, + "sources": [ + { + "fileName": "generic-class.ts", + "line": 9, + "character": 19 + } + ], + "type": { + "type": "typeParameter", + "name": "T" + } + }, + { + "id": 152, + "name": "values", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "comment": { + "shortText": "Generic property array." + }, + "sources": [ + { + "fileName": "generic-class.ts", + "line": 14, + "character": 20 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "typeParameter", + "name": "T" + } + } + }, + { + "id": 156, + "name": "getValue", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "signatures": [ + { + "id": 157, + "name": "getValue", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "getValue short text.", + "returns": "Return value comment.\n" + }, + "type": { + "type": "typeParameter", + "name": "T" + } + } + ], + "sources": [ + { + "fileName": "generic-class.ts", + "line": 28, + "character": 12 + } + ] + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 153 + ] + }, + { + "title": "Properties", + "kind": 1024, + "children": [ + 151, + 152 + ] + }, + { + "title": "Methods", + "kind": 2048, + "children": [ + 156 + ] + } + ], + "sources": [ + { + "fileName": "generic-class.ts", + "line": 5, + "character": 18 + } + ], + "extendedBy": [ + { + "type": "reference", + "id": 158, + "name": "NonGenericClass" + } + ] + }, + { + "id": 158, + "name": "NonGenericClass", + "kind": 128, + "kindString": "Class", + "flags": {}, + "comment": { + "shortText": "NonGenericClass short text." + }, + "children": [ + { + "id": 161, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "comment": { + "shortText": "Constructor short text." + }, + "signatures": [ + { + "id": 162, + "name": "new NonGenericClass", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "comment": { + "shortText": "Constructor short text." + }, + "parameters": [ + { + "id": 163, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "shortText": "Constructor parameter.\n" + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "id": 158, + "name": "NonGenericClass" + }, + "inheritedFrom": { + "type": "reference", + "id": 153, + "name": "GenericClass.__constructor" + } + } + ], + "sources": [ + { + "fileName": "generic-class.ts", + "line": 14, + "character": 26 + } + ], + "inheritedFrom": { + "type": "reference", + "id": 153, + "name": "GenericClass.__constructor" + } + }, + { + "id": 159, + "name": "value", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "comment": { + "shortText": "Generic property." + }, + "sources": [ + { + "fileName": "generic-class.ts", + "line": 9, + "character": 19 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "inheritedFrom": { + "type": "reference", + "id": 151, + "name": "GenericClass.value" + } + }, + { + "id": 160, + "name": "values", + "kind": 1024, + "kindString": "Property", + "flags": { + "isProtected": true + }, + "comment": { + "shortText": "Generic property array." + }, + "sources": [ + { + "fileName": "generic-class.ts", + "line": 14, + "character": 20 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "intrinsic", + "name": "string" + } + }, + "inheritedFrom": { + "type": "reference", + "id": 152, + "name": "GenericClass.values" + } + }, + { + "id": 164, + "name": "getValue", + "kind": 2048, + "kindString": "Method", + "flags": {}, + "signatures": [ + { + "id": 165, + "name": "getValue", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "getValue short text.", + "returns": "Return value comment.\n" + }, + "type": { + "type": "intrinsic", + "name": "string" + }, + "inheritedFrom": { + "type": "reference", + "id": 156, + "name": "GenericClass.getValue" + } + } + ], + "sources": [ + { + "fileName": "generic-class.ts", + "line": 28, + "character": 12 + } + ], + "inheritedFrom": { + "type": "reference", + "id": 156, + "name": "GenericClass.getValue" + } + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 161 + ] + }, + { + "title": "Properties", + "kind": 1024, + "children": [ + 159, + 160 + ] + }, + { + "title": "Methods", + "kind": 2048, + "children": [ + 164 + ] + } + ], + "sources": [ + { + "fileName": "generic-class.ts", + "line": 36, + "character": 21 + } + ], + "extendedTypes": [ + { + "type": "reference", + "id": 149, + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + } + ], + "name": "GenericClass" + } + ] + } + ], + "groups": [ + { + "title": "Classes", + "kind": 128, + "children": [ + 149, + 158 + ] + } + ], + "sources": [ + { + "fileName": "generic-class.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 166, + "name": "\"getter-setter\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/class/getter-setter.ts", + "children": [ + { + "id": 167, + "name": "GetterSetter", + "kind": 128, + "kindString": "Class", + "flags": {}, + "children": [ + { + "id": 168, + "name": "_name", + "kind": 1024, + "kindString": "Property", + "flags": { + "isPrivate": true + }, + "sources": [ + { + "fileName": "getter-setter.ts", + "line": 2, + "character": 17 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 169, + "name": "name", + "kind": 262144, + "kindString": "Accessor", + "flags": {}, + "getSignature": [ + { + "id": 170, + "name": "__get", + "kind": 524288, + "kindString": "Get signature", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "setSignature": [ + { + "id": 171, + "name": "__set", + "kind": 1048576, + "kindString": "Set signature", + "flags": {}, + "parameters": [ + { + "id": 172, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "getter-setter.ts", + "line": 4, + "character": 12 + }, + { + "fileName": "getter-setter.ts", + "line": 5, + "character": 12 + } + ] + }, + { + "id": 173, + "name": "readOnlyName", + "kind": 262144, + "kindString": "Accessor", + "flags": {}, + "getSignature": [ + { + "id": 174, + "name": "__get", + "kind": 524288, + "kindString": "Get signature", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "sources": [ + { + "fileName": "getter-setter.ts", + "line": 7, + "character": 20 + } + ] + }, + { + "id": 175, + "name": "writeOnlyName", + "kind": 262144, + "kindString": "Accessor", + "flags": {}, + "setSignature": [ + { + "id": 176, + "name": "__set", + "kind": 1048576, + "kindString": "Set signature", + "flags": {}, + "parameters": [ + { + "id": 177, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "getter-setter.ts", + "line": 9, + "character": 21 + } + ] + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 168 + ] + }, + { + "title": "Accessors", + "kind": 262144, + "children": [ + 169, + 173, + 175 + ] + } + ], + "sources": [ + { + "fileName": "getter-setter.ts", + "line": 1, + "character": 18 + } + ] + } + ], + "groups": [ + { + "title": "Classes", + "kind": 128, + "children": [ + 167 + ] + } + ], + "sources": [ + { + "fileName": "getter-setter.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 178, + "name": "\"this\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/class/this.ts", + "children": [ + { + "id": 179, + "name": "ChainClass", + "kind": 128, + "kindString": "Class", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "ChainClass comment short text.", + "text": "ChainClass comment text.\n" + }, + "children": [ + { + "id": 180, + "name": "chain", + "kind": 2048, + "kindString": "Method", + "flags": { + "isPublic": true, + "isExported": true + }, + "signatures": [ + { + "id": 181, + "name": "chain", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "Chain method that returns this." + }, + "type": { + "type": "intrinsic", + "name": "this" + } + } + ], + "sources": [ + { + "fileName": "this.ts", + "line": 10, + "character": 16 + } + ] + } + ], + "groups": [ + { + "title": "Methods", + "kind": 2048, + "children": [ + 180 + ] + } + ], + "sources": [ + { + "fileName": "this.ts", + "line": 6, + "character": 23 + } + ] + } + ], + "groups": [ + { + "title": "Classes", + "kind": 128, + "children": [ + 179 + ] + } + ], + "sources": [ + { + "fileName": "this.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 182, + "name": "\"type-operator\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/class/type-operator.ts", + "children": [ + { + "id": 186, + "name": "GenericClass", + "kind": 128, + "kindString": "Class", + "flags": { + "isExported": true + }, + "typeParameter": [ + { + "id": 187, + "name": "T", + "kind": 131072, + "kindString": "Type parameter", + "flags": { + "isExported": true + }, + "type": { + "type": "typeOperator", + "operator": "keyof", + "target": { + "type": "reference", + "id": 183, + "name": "TestClass" + } + } + } + ], + "children": [ + { + "id": 188, + "name": "c", + "kind": 1024, + "kindString": "Property", + "flags": { + "isExported": true + }, + "sources": [ + { + "fileName": "type-operator.ts", + "line": 14, + "character": 5 + } + ], + "type": { + "type": "typeParameter", + "name": "T", + "constraint": { + "type": "typeOperator", + "operator": "keyof", + "target": { + "type": "reference", + "id": 183, + "name": "TestClass" + } + } + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 188 + ] + } + ], + "sources": [ + { + "fileName": "type-operator.ts", + "line": 13, + "character": 25 + } + ] + }, + { + "id": 183, + "name": "TestClass", + "kind": 128, + "kindString": "Class", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "TestClass comment short text.", + "text": "TestClass comment text.\n", + "tags": [ + { + "tag": "see", + "text": "[[TestClass]] @ fixtures\n" + } + ] + }, + "children": [ + { + "id": 184, + "name": "a", + "kind": 1024, + "kindString": "Property", + "flags": { + "isExported": true + }, + "sources": [ + { + "fileName": "type-operator.ts", + "line": 9, + "character": 5 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 185, + "name": "b", + "kind": 1024, + "kindString": "Property", + "flags": { + "isExported": true + }, + "sources": [ + { + "fileName": "type-operator.ts", + "line": 10, + "character": 5 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 184, + 185 + ] + } + ], + "sources": [ + { + "fileName": "type-operator.ts", + "line": 8, + "character": 22 + } + ] + } + ], + "groups": [ + { + "title": "Classes", + "kind": 128, + "children": [ + 186, + 183 + ] + } + ], + "sources": [ + { + "fileName": "type-operator.ts", + "line": 1, + "character": 0 + } + ] } ], "groups": [ @@ -1394,7 +4146,17 @@ "title": "External modules", "kind": 1, "children": [ - 1 + 1, + 15, + 75, + 80, + 101, + 145, + 118, + 148, + 166, + 178, + 182 ] } ] diff --git a/src/test/converter/class/this.ts b/src/test/converter/class/this.ts new file mode 100644 index 000000000..4864364bb --- /dev/null +++ b/src/test/converter/class/this.ts @@ -0,0 +1,13 @@ +/** + * ChainClass comment short text. + * + * ChainClass comment text. + */ +export class ChainClass { + /** + * Chain method that returns this. + */ + public chain(): this { + return this; + } +} diff --git a/src/test/converter/type-operator/type-operator.ts b/src/test/converter/class/type-operator.ts similarity index 100% rename from src/test/converter/type-operator/type-operator.ts rename to src/test/converter/class/type-operator.ts diff --git a/src/test/converter/clodule-with-subclass/specs.json b/src/test/converter/clodule-with-subclass/specs.json deleted file mode 100644 index 7fa52ebba..000000000 --- a/src/test/converter/clodule-with-subclass/specs.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "id": 0, - "name": "typedoc", - "kind": 0, - "flags": {}, - "children": [ - { - "id": 1, - "name": "\"clodule-with-subclass\"", - "kind": 1, - "kindString": "External module", - "flags": { - "isExported": true - }, - "originalName": "%BASE%/clodule-with-subclass/clodule-with-subclass.ts", - "children": [ - { - "id": 3, - "name": "Bar", - "kind": 128, - "kindString": "Class", - "flags": { - "isExported": true - }, - "children": [ - { - "id": 4, - "name": "x", - "kind": 1024, - "kindString": "Property", - "flags": { - "isStatic": true, - "isExported": true - }, - "sources": [ - { - "fileName": "clodule-with-subclass.ts", - "line": 4, - "character": 16 - } - ], - "type": { - "type": "unknown", - "name": "1" - }, - "defaultValue": "1" - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [ - 4 - ] - } - ], - "sources": [ - { - "fileName": "clodule-with-subclass.ts", - "line": 7, - "character": 16 - } - ], - "extendedTypes": [ - { - "type": "reference", - "name": "Foo", - "id": 2 - } - ] - }, - { - "id": 2, - "name": "Foo", - "kind": 128, - "kindString": "Class", - "flags": { - "isExported": true - }, - "children": [ - { - "id": 5, - "name": "x", - "kind": 1024, - "kindString": "Property", - "flags": { - "isStatic": true, - "isExported": true - }, - "sources": [ - { - "fileName": "clodule-with-subclass.ts", - "line": 4, - "character": 16 - } - ], - "type": { - "type": "unknown", - "name": "1" - }, - "defaultValue": "1" - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [ - 5 - ] - } - ], - "sources": [ - { - "fileName": "clodule-with-subclass.ts", - "line": 2, - "character": 16 - }, - { - "fileName": "clodule-with-subclass.ts", - "line": 3, - "character": 20 - } - ], - "extendedBy": [ - { - "type": "reference", - "name": "Bar", - "id": 3 - } - ] - } - ], - "groups": [ - { - "title": "Classes", - "kind": 128, - "children": [ - 3, - 2 - ] - } - ], - "sources": [ - { - "fileName": "clodule-with-subclass.ts", - "line": 1, - "character": 0 - } - ] - } - ], - "groups": [ - { - "title": "External modules", - "kind": 1, - "children": [ - 1 - ] - } - ] -} \ No newline at end of file diff --git a/src/test/converter/constructor-properties/specs.json b/src/test/converter/constructor-properties/specs.json deleted file mode 100644 index 043f56a93..000000000 --- a/src/test/converter/constructor-properties/specs.json +++ /dev/null @@ -1,488 +0,0 @@ -{ - "id": 0, - "name": "typedoc", - "kind": 0, - "flags": {}, - "children": [ - { - "id": 1, - "name": "\"constructor-properties\"", - "kind": 1, - "kindString": "External module", - "flags": { - "isExported": true - }, - "originalName": "%BASE%/constructor-properties/constructor-properties.ts", - "children": [ - { - "id": 2, - "name": "Vector2", - "kind": 128, - "kindString": "Class", - "flags": {}, - "comment": { - "shortText": "A class with constructor properties." - }, - "children": [ - { - "id": 3, - "name": "constructor", - "kind": 512, - "kindString": "Constructor", - "flags": {}, - "comment": {}, - "signatures": [ - { - "id": 7, - "name": "new Vector2", - "kind": 16384, - "kindString": "Constructor signature", - "flags": {}, - "comment": {}, - "parameters": [ - { - "id": 8, - "name": "x", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "comment": { - "shortText": "X component of the Vector" - }, - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 9, - "name": "y", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "comment": { - "shortText": "Y component of the Vector" - }, - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 10, - "name": "name", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "comment": { - "shortText": "Vector name\n" - }, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "name": "Vector2", - "id": 2 - } - } - ], - "sources": [ - { - "fileName": "constructor-properties.ts", - "line": 4, - "character": 15 - } - ] - }, - { - "id": 6, - "name": "name", - "kind": 1024, - "kindString": "Property", - "flags": { - "isConstructorProperty": true - }, - "comment": { - "shortText": "Vector name\n" - }, - "sources": [ - { - "fileName": "constructor-properties.ts", - "line": 11, - "character": 29 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 4, - "name": "x", - "kind": 1024, - "kindString": "Property", - "flags": { - "isPublic": true, - "isConstructorProperty": true - }, - "comment": { - "shortText": "X component of the Vector" - }, - "sources": [ - { - "fileName": "constructor-properties.ts", - "line": 10, - "character": 24 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 5, - "name": "y", - "kind": 1024, - "kindString": "Property", - "flags": { - "isPublic": true, - "isConstructorProperty": true - }, - "comment": { - "shortText": "Y component of the Vector" - }, - "sources": [ - { - "fileName": "constructor-properties.ts", - "line": 10, - "character": 42 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "groups": [ - { - "title": "Constructors", - "kind": 512, - "children": [ - 3 - ] - }, - { - "title": "Properties", - "kind": 1024, - "children": [ - 6, - 4, - 5 - ] - } - ], - "sources": [ - { - "fileName": "constructor-properties.ts", - "line": 4, - "character": 13 - } - ], - "extendedBy": [ - { - "type": "reference", - "name": "Vector3", - "id": 11 - } - ] - }, - { - "id": 11, - "name": "Vector3", - "kind": 128, - "kindString": "Class", - "flags": {}, - "comment": { - "shortText": "A class with inherited and overwritten constructor properties." - }, - "children": [ - { - "id": 12, - "name": "constructor", - "kind": 512, - "kindString": "Constructor", - "flags": {}, - "comment": {}, - "signatures": [ - { - "id": 16, - "name": "new Vector3", - "kind": 16384, - "kindString": "Constructor signature", - "flags": {}, - "comment": {}, - "parameters": [ - { - "id": 17, - "name": "x", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "comment": { - "shortText": "X component of the Vector" - }, - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 18, - "name": "y", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "comment": { - "shortText": "Y component of the Vector" - }, - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 19, - "name": "z", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "comment": { - "shortText": "Z component of the Vector" - }, - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 20, - "name": "name", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "comment": { - "shortText": "Vector name\n" - }, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "name": "Vector3", - "id": 11 - }, - "overwrites": { - "type": "reference", - "name": "Vector2.__constructor", - "id": 3 - } - } - ], - "sources": [ - { - "fileName": "constructor-properties.ts", - "line": 18, - "character": 31 - } - ], - "overwrites": { - "type": "reference", - "name": "Vector2.__constructor", - "id": 3 - } - }, - { - "id": 15, - "name": "name", - "kind": 1024, - "kindString": "Property", - "flags": { - "isConstructorProperty": true - }, - "comment": { - "shortText": "Vector name\n" - }, - "sources": [ - { - "fileName": "constructor-properties.ts", - "line": 26, - "character": 29 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - }, - "overwrites": { - "type": "reference", - "name": "Vector2.name", - "id": 6 - } - }, - { - "id": 21, - "name": "x", - "kind": 1024, - "kindString": "Property", - "flags": { - "isPublic": true, - "isConstructorProperty": true - }, - "comment": { - "shortText": "X component of the Vector" - }, - "sources": [ - { - "fileName": "constructor-properties.ts", - "line": 10, - "character": 24 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - }, - "inheritedFrom": { - "type": "reference", - "name": "Vector2.x", - "id": 4 - } - }, - { - "id": 13, - "name": "y", - "kind": 1024, - "kindString": "Property", - "flags": { - "isPublic": true, - "isConstructorProperty": true - }, - "comment": { - "shortText": "Y component of the Vector" - }, - "sources": [ - { - "fileName": "constructor-properties.ts", - "line": 25, - "character": 35 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - }, - "overwrites": { - "type": "reference", - "name": "Vector2.y", - "id": 5 - } - }, - { - "id": 14, - "name": "z", - "kind": 1024, - "kindString": "Property", - "flags": { - "isPublic": true, - "isConstructorProperty": true - }, - "comment": { - "shortText": "Z component of the Vector" - }, - "sources": [ - { - "fileName": "constructor-properties.ts", - "line": 25, - "character": 53 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "groups": [ - { - "title": "Constructors", - "kind": 512, - "children": [ - 12 - ] - }, - { - "title": "Properties", - "kind": 1024, - "children": [ - 15, - 21, - 13, - 14 - ] - } - ], - "sources": [ - { - "fileName": "constructor-properties.ts", - "line": 18, - "character": 13 - } - ], - "extendedTypes": [ - { - "type": "reference", - "name": "Vector2", - "id": 2 - } - ] - } - ], - "groups": [ - { - "title": "Classes", - "kind": 128, - "children": [ - 2, - 11 - ] - } - ], - "sources": [ - { - "fileName": "constructor-properties.ts", - "line": 1, - "character": 0 - } - ] - } - ], - "groups": [ - { - "title": "External modules", - "kind": 1, - "children": [ - 1 - ] - } - ] -} \ No newline at end of file diff --git a/src/test/converter/decorators/specs.json b/src/test/converter/decorators/specs.json deleted file mode 100644 index 6f33a3c45..000000000 --- a/src/test/converter/decorators/specs.json +++ /dev/null @@ -1,384 +0,0 @@ -{ - "id": 0, - "name": "typedoc", - "kind": 0, - "flags": {}, - "children": [ - { - "id": 1, - "name": "\"decorators\"", - "kind": 1, - "kindString": "External module", - "flags": { - "isExported": true - }, - "originalName": "%BASE%/decorators/decorators.ts", - "children": [ - { - "id": 2, - "name": "DecoratedClass", - "kind": 128, - "kindString": "Class", - "flags": {}, - "comment": { - "shortText": "A decorated class." - }, - "decorators": [ - { - "name": "decoratorWithOptions", - "type": { - "type": "reference", - "name": "decoratorWithOptions", - "id": 13 - }, - "arguments": { - "options": "{\n name: 'Name of class'\n}" - } - } - ], - "children": [ - { - "id": 3, - "name": "decoratedMethod", - "kind": 2048, - "kindString": "Method", - "flags": {}, - "decorators": [ - { - "name": "decoratorAtom", - "type": { - "type": "reference", - "name": "decoratorAtom", - "id": 5 - } - }, - { - "name": "decoratorWithParam", - "type": { - "type": "reference", - "name": "decoratorWithParam", - "id": 10 - }, - "arguments": { - "value": "false" - } - } - ], - "signatures": [ - { - "id": 4, - "name": "decoratedMethod", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "comment": { - "shortText": "A decorated method." - }, - "type": { - "type": "intrinsic", - "name": "void" - } - } - ], - "sources": [ - { - "fileName": "decorators.ts", - "line": 13, - "character": 19 - } - ] - } - ], - "groups": [ - { - "title": "Methods", - "kind": 2048, - "children": [ - 3 - ] - } - ], - "sources": [ - { - "fileName": "decorators.ts", - "line": 7, - "character": 20 - } - ] - }, - { - "id": 5, - "name": "decoratorAtom", - "kind": 64, - "kindString": "Function", - "flags": {}, - "decorates": [ - { - "type": "reference", - "name": "decoratedMethod", - "id": 3 - } - ], - "signatures": [ - { - "id": 6, - "name": "decoratorAtom", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "comment": { - "shortText": "A decorator with no options." - }, - "parameters": [ - { - "id": 7, - "name": "target", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "reference", - "name": "Object" - } - }, - { - "id": 8, - "name": "propertyKey", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "symbol" - } - ] - } - }, - { - "id": 9, - "name": "descriptor", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "reference", - "name": "TypedPropertyDescriptor", - "typeArguments": [ - { - "type": "intrinsic", - "name": "any" - } - ] - } - } - ], - "type": { - "type": "intrinsic", - "name": "void" - } - } - ], - "sources": [ - { - "fileName": "decorators.ts", - "line": 19, - "character": 22 - } - ] - }, - { - "id": 13, - "name": "decoratorWithOptions", - "kind": 64, - "kindString": "Function", - "flags": {}, - "decorates": [ - { - "type": "reference", - "name": "DecoratedClass", - "id": 2 - } - ], - "signatures": [ - { - "id": 14, - "name": "decoratorWithOptions", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "comment": { - "shortText": "A decorator consuming an options object." - }, - "parameters": [ - { - "id": 15, - "name": "options", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "comment": { - "text": "The options object of this decorator." - }, - "type": { - "type": "reflection", - "declaration": { - "id": 16, - "name": "__type", - "kind": 65536, - "kindString": "Type literal", - "flags": {}, - "children": [ - { - "id": 17, - "name": "name", - "kind": 32, - "kindString": "Variable", - "flags": {}, - "comment": { - "text": "A property on the options object of this decorator.\n" - }, - "sources": [ - { - "fileName": "decorators.ts", - "line": 40, - "character": 44 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "groups": [ - { - "title": "Variables", - "kind": 32, - "children": [ - 17 - ] - } - ], - "sources": [ - { - "fileName": "decorators.ts", - "line": 40, - "character": 38 - } - ] - } - } - } - ], - "type": { - "type": "reference", - "name": "ClassDecorator" - } - } - ], - "sources": [ - { - "fileName": "decorators.ts", - "line": 40, - "character": 29 - } - ] - }, - { - "id": 10, - "name": "decoratorWithParam", - "kind": 64, - "kindString": "Function", - "flags": {}, - "decorates": [ - { - "type": "reference", - "name": "decoratedMethod", - "id": 3 - } - ], - "signatures": [ - { - "id": 11, - "name": "decoratorWithParam", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "comment": { - "shortText": "A decorator with a parameter." - }, - "parameters": [ - { - "id": 12, - "name": "value", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "comment": { - "text": "The parameter of this decorator.\n" - }, - "type": { - "type": "intrinsic", - "name": "boolean" - } - } - ], - "type": { - "type": "reference", - "name": "MethodDecorator" - } - } - ], - "sources": [ - { - "fileName": "decorators.ts", - "line": 28, - "character": 27 - } - ] - } - ], - "groups": [ - { - "title": "Classes", - "kind": 128, - "children": [ - 2 - ] - }, - { - "title": "Functions", - "kind": 64, - "children": [ - 5, - 13, - 10 - ] - } - ], - "sources": [ - { - "fileName": "decorators.ts", - "line": 1, - "character": 0 - } - ] - } - ], - "groups": [ - { - "title": "External modules", - "kind": 1, - "children": [ - 1 - ] - } - ] -} \ No newline at end of file diff --git a/src/test/converter/destructuring/specs.json b/src/test/converter/destructuring/specs.json deleted file mode 100644 index 979a634d6..000000000 --- a/src/test/converter/destructuring/specs.json +++ /dev/null @@ -1,424 +0,0 @@ -{ - "id": 0, - "name": "typedoc", - "kind": 0, - "flags": {}, - "children": [ - { - "id": 1, - "name": "\"destructuring\"", - "kind": 1, - "kindString": "External module", - "flags": { - "isExported": true - }, - "originalName": "%BASE%/destructuring/destructuring.ts", - "children": [ - { - "id": 5, - "name": "destructArrayA", - "kind": 32, - "kindString": "Variable", - "flags": {}, - "sources": [ - { - "fileName": "destructuring.ts", - "line": 9, - "character": 21 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 6, - "name": "destructArrayB", - "kind": 32, - "kindString": "Variable", - "flags": {}, - "sources": [ - { - "fileName": "destructuring.ts", - "line": 9, - "character": 37 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 7, - "name": "destructArrayC", - "kind": 32, - "kindString": "Variable", - "flags": {}, - "sources": [ - { - "fileName": "destructuring.ts", - "line": 9, - "character": 53 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "unknown", - "name": "0" - }, - { - "type": "unknown", - "name": "10" - } - ] - }, - "defaultValue": "10" - }, - { - "id": 11, - "name": "destructArrayWithIgnoresA", - "kind": 32, - "kindString": "Variable", - "flags": {}, - "sources": [ - { - "fileName": "destructuring.ts", - "line": 19, - "character": 32 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 12, - "name": "destructArrayWithIgnoresRest", - "kind": 32, - "kindString": "Variable", - "flags": {}, - "sources": [ - { - "fileName": "destructuring.ts", - "line": 19, - "character": 67 - } - ], - "type": { - "type": "tuple", - "elements": [ - { - "type": "intrinsic", - "name": "number" - }, - { - "type": "intrinsic", - "name": "number" - } - ] - } - }, - { - "id": 10, - "name": "destructArrayWithRest", - "kind": 32, - "kindString": "Variable", - "flags": {}, - "sources": [ - { - "fileName": "destructuring.ts", - "line": 14, - "character": 79 - } - ], - "type": { - "type": "tuple", - "elements": [ - { - "type": "intrinsic", - "name": "number" - }, - { - "type": "intrinsic", - "name": "number" - } - ] - } - }, - { - "id": 8, - "name": "destructArrayWithRestA", - "kind": 32, - "kindString": "Variable", - "flags": {}, - "sources": [ - { - "fileName": "destructuring.ts", - "line": 14, - "character": 29 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 9, - "name": "destructArrayWithRestB", - "kind": 32, - "kindString": "Variable", - "flags": {}, - "sources": [ - { - "fileName": "destructuring.ts", - "line": 14, - "character": 53 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 2, - "name": "destructObjectA", - "kind": 32, - "kindString": "Variable", - "flags": {}, - "sources": [ - { - "fileName": "destructuring.ts", - "line": 4, - "character": 22 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 3, - "name": "destructObjectB", - "kind": 32, - "kindString": "Variable", - "flags": {}, - "sources": [ - { - "fileName": "destructuring.ts", - "line": 4, - "character": 39 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 4, - "name": "destructObjectC", - "kind": 32, - "kindString": "Variable", - "flags": {}, - "sources": [ - { - "fileName": "destructuring.ts", - "line": 4, - "character": 56 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 13, - "name": "drawText", - "kind": 64, - "kindString": "Function", - "flags": {}, - "signatures": [ - { - "id": 14, - "name": "drawText", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "comment": { - "shortText": "Destructuring function parameters." - }, - "parameters": [ - { - "id": 15, - "name": "__namedParameters", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "originalName": "__0", - "type": { - "type": "reflection", - "declaration": { - "id": 16, - "name": "__type", - "kind": 65536, - "kindString": "Type literal", - "flags": {}, - "children": [ - { - "id": 19, - "name": "bold", - "kind": 32, - "kindString": "Variable", - "flags": {}, - "sources": [ - { - "fileName": "destructuring.ts", - "line": 24, - "character": 61 - } - ], - "type": { - "type": "intrinsic", - "name": "boolean" - }, - "defaultValue": "false" - }, - { - "id": 18, - "name": "location", - "kind": 32, - "kindString": "Variable", - "flags": {}, - "sources": [ - { - "fileName": "destructuring.ts", - "line": 24, - "character": 46 - } - ], - "type": { - "type": "tuple", - "elements": [ - { - "type": "intrinsic", - "name": "number" - }, - { - "type": "intrinsic", - "name": "number" - } - ] - }, - "defaultValue": "[0, 0]" - }, - { - "id": 17, - "name": "text", - "kind": 32, - "kindString": "Variable", - "flags": {}, - "sources": [ - { - "fileName": "destructuring.ts", - "line": 24, - "character": 23 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - }, - "defaultValue": "\"\"" - } - ], - "groups": [ - { - "title": "Variables", - "kind": 32, - "children": [ - 19, - 18, - 17 - ] - } - ], - "sources": [ - { - "fileName": "destructuring.ts", - "line": 24, - "character": 18 - } - ] - } - } - } - ], - "type": { - "type": "intrinsic", - "name": "void" - } - } - ], - "sources": [ - { - "fileName": "destructuring.ts", - "line": 24, - "character": 17 - } - ] - } - ], - "groups": [ - { - "title": "Variables", - "kind": 32, - "children": [ - 5, - 6, - 7, - 11, - 12, - 10, - 8, - 9, - 2, - 3, - 4 - ] - }, - { - "title": "Functions", - "kind": 64, - "children": [ - 13 - ] - } - ], - "sources": [ - { - "fileName": "destructuring.ts", - "line": 1, - "character": 0 - } - ] - } - ], - "groups": [ - { - "title": "External modules", - "kind": 1, - "children": [ - 1 - ] - } - ] -} \ No newline at end of file diff --git a/src/test/converter/dots.in.path/function.ts b/src/test/converter/dots.in.path/function.ts index 6a8237816..70ae7c5f1 100644 --- a/src/test/converter/dots.in.path/function.ts +++ b/src/test/converter/dots.in.path/function.ts @@ -4,4 +4,3 @@ import * as types from './interface-empty'; * This is a simple exported function. */ export function exportedFunction(arg: types.EmptyInterface): void {} - diff --git a/src/test/converter/dots.in.path/interface-empty.ts b/src/test/converter/dots.in.path/interface-empty.ts index 3a6a189b1..bd1141510 100644 --- a/src/test/converter/dots.in.path/interface-empty.ts +++ b/src/test/converter/dots.in.path/interface-empty.ts @@ -2,4 +2,3 @@ * This is a simple interface */ export interface EmptyInterface {} - diff --git a/src/test/converter/dots.in.path/specs.json b/src/test/converter/dots.in.path/specs.json index 287f883b9..0673b9962 100644 --- a/src/test/converter/dots.in.path/specs.json +++ b/src/test/converter/dots.in.path/specs.json @@ -45,8 +45,8 @@ }, "type": { "type": "reference", - "name": "EmptyInterface", - "id": 2 + "id": 2, + "name": "EmptyInterface" } } ], diff --git a/src/test/converter/enum/enum.ts b/src/test/converter/enum/enum.ts index 397733030..463004317 100644 --- a/src/test/converter/enum/enum.ts +++ b/src/test/converter/enum/enum.ts @@ -1,8 +1,7 @@ /** * This is a simple enumeration. */ -export enum SimpleEnum -{ +export enum SimpleEnum { /** * This is the first enum member. */ @@ -19,12 +18,10 @@ export enum SimpleEnum EnumValue3 = 4 } - /** * This is an enumeration extended by a module. */ -export enum ModuleEnum -{ +export enum ModuleEnum { /** * This is the first enum member. */ @@ -41,20 +38,25 @@ export enum ModuleEnum EnumValue3 = 4 } - /** * This is a module extending an enumeration. */ -export module ModuleEnum -{ +export module ModuleEnum { /** * This is a variable appended to an enumeration. */ - let enumValue:string; - + let enumValue: string; /** * This is a function appended to an enumeration. */ function enumFunction() {} } + +/** + * This is a const enum. + */ +export const enum ConstEnum { + a = 1, + b = a + 1 +} diff --git a/src/test/converter/enum/specs.json b/src/test/converter/enum/specs.json index d013590b6..558676852 100644 --- a/src/test/converter/enum/specs.json +++ b/src/test/converter/enum/specs.json @@ -14,6 +14,71 @@ }, "originalName": "%BASE%/enum/enum.ts", "children": [ + { + "id": 10, + "name": "ConstEnum", + "kind": 4, + "kindString": "Enumeration", + "flags": { + "isExported": true + }, + "comment": { + "shortText": "This is a const enum." + }, + "children": [ + { + "id": 11, + "name": "a", + "kind": 16, + "kindString": "Enumeration member", + "flags": { + "isExported": true + }, + "sources": [ + { + "fileName": "enum.ts", + "line": 60, + "character": 5 + } + ], + "defaultValue": "1" + }, + { + "id": 12, + "name": "b", + "kind": 16, + "kindString": "Enumeration member", + "flags": { + "isExported": true + }, + "sources": [ + { + "fileName": "enum.ts", + "line": 61, + "character": 5 + } + ], + "defaultValue": "a + 1" + } + ], + "groups": [ + { + "title": "Enumeration members", + "kind": 16, + "children": [ + 11, + 12 + ] + } + ], + "sources": [ + { + "fileName": "enum.ts", + "line": 59, + "character": 27 + } + ] + }, { "id": 6, "name": "ModuleEnum", @@ -40,7 +105,7 @@ "sources": [ { "fileName": "enum.ts", - "line": 31, + "line": 28, "character": 14 } ], @@ -60,7 +125,7 @@ "sources": [ { "fileName": "enum.ts", - "line": 36, + "line": 33, "character": 14 } ], @@ -80,14 +145,14 @@ "sources": [ { "fileName": "enum.ts", - "line": 41, + "line": 38, "character": 14 } ], "defaultValue": "4" }, { - "id": 10, + "id": 13, "name": "enumValue", "kind": 32, "kindString": "Variable", @@ -101,7 +166,7 @@ "sources": [ { "fileName": "enum.ts", - "line": 53, + "line": 48, "character": 17 } ], @@ -111,7 +176,7 @@ } }, { - "id": 11, + "id": 14, "name": "enumFunction", "kind": 64, "kindString": "Function", @@ -120,7 +185,7 @@ }, "signatures": [ { - "id": 12, + "id": 15, "name": "enumFunction", "kind": 4096, "kindString": "Call signature", @@ -139,7 +204,7 @@ "sources": [ { "fileName": "enum.ts", - "line": 59, + "line": 53, "character": 25 } ] @@ -159,26 +224,26 @@ "title": "Variables", "kind": 32, "children": [ - 10 + 13 ] }, { "title": "Functions", "kind": 64, "children": [ - 11 + 14 ] } ], "sources": [ { "fileName": "enum.ts", - "line": 26, + "line": 24, "character": 22 }, { "fileName": "enum.ts", - "line": 48, + "line": 44, "character": 24 } ] @@ -209,7 +274,7 @@ "sources": [ { "fileName": "enum.ts", - "line": 9, + "line": 8, "character": 14 } ], @@ -229,7 +294,7 @@ "sources": [ { "fileName": "enum.ts", - "line": 14, + "line": 13, "character": 14 } ], @@ -249,7 +314,7 @@ "sources": [ { "fileName": "enum.ts", - "line": 19, + "line": 18, "character": 14 } ], @@ -281,6 +346,7 @@ "title": "Enumerations", "kind": 4, "children": [ + 10, 6, 2 ] diff --git a/src/test/converter/events-overloads/specs.json b/src/test/converter/events-overloads/specs.json deleted file mode 100644 index aa09da62b..000000000 --- a/src/test/converter/events-overloads/specs.json +++ /dev/null @@ -1,442 +0,0 @@ -{ - "id": 0, - "name": "typedoc", - "kind": 0, - "flags": {}, - "children": [ - { - "id": 1, - "name": "\"events-overloads\"", - "kind": 1, - "kindString": "External module", - "flags": { - "isExported": true - }, - "originalName": "%BASE%/events-overloads/events-overloads.ts", - "children": [ - { - "id": 2, - "name": "Test", - "kind": 256, - "kindString": "Interface", - "flags": {}, - "comment": { - "shortText": "Encapsulates some information for background http transfers.", - "tags": [ - { - "tag": "see", - "text": "https://github.com/sebastian-lenz/typedoc/issues/136\n" - } - ] - }, - "children": [ - { - "id": 3, - "name": "on", - "kind": 8388608, - "kindString": "Event", - "flags": {}, - "signatures": [ - { - "id": 4, - "name": "on", - "kind": 8388608, - "kindString": "Event", - "flags": {}, - "comment": { - "shortText": "Subscribe for a general event by name." - }, - "parameters": [ - { - "id": 5, - "name": "event", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "comment": { - "text": "The name of the event to subscribe for." - }, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 6, - "name": "handler", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "comment": { - "text": "The handler called when the event occurs.\n" - }, - "type": { - "type": "reflection", - "declaration": { - "id": 7, - "name": "__type", - "kind": 65536, - "kindString": "Type literal", - "flags": {}, - "signatures": [ - { - "id": 8, - "name": "__call", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 9, - "name": "e", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "any" - } - } - ], - "type": { - "type": "intrinsic", - "name": "void" - } - } - ], - "sources": [ - { - "fileName": "events-overloads.ts", - "line": 14, - "character": 30 - } - ] - } - } - } - ], - "type": { - "type": "intrinsic", - "name": "void" - } - }, - { - "id": 10, - "name": "on", - "kind": 8388608, - "kindString": "Event", - "flags": {}, - "comment": { - "shortText": "Subscribe for error notifications." - }, - "parameters": [ - { - "id": 11, - "name": "event", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "comment": { - "text": "The name of the event to subscribe for." - }, - "type": { - "type": "stringLiteral", - "value": "error" - } - }, - { - "id": 12, - "name": "handler", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "comment": { - "text": "A handler that will receive the error details\n" - }, - "type": { - "type": "reflection", - "declaration": { - "id": 13, - "name": "__type", - "kind": 65536, - "kindString": "Type literal", - "flags": {}, - "signatures": [ - { - "id": 14, - "name": "__call", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 15, - "name": "e", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "any" - } - } - ], - "type": { - "type": "intrinsic", - "name": "void" - } - } - ], - "sources": [ - { - "fileName": "events-overloads.ts", - "line": 23, - "character": 31 - } - ] - } - } - } - ], - "type": { - "type": "intrinsic", - "name": "void" - } - }, - { - "id": 16, - "name": "on", - "kind": 8388608, - "kindString": "Event", - "flags": {}, - "comment": { - "shortText": "Subscribe for progress notifications." - }, - "parameters": [ - { - "id": 17, - "name": "event", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "comment": { - "text": "The name of the event to subscribe for." - }, - "type": { - "type": "stringLiteral", - "value": "progress" - } - }, - { - "id": 18, - "name": "handler", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "comment": { - "text": "A handler that will receive a progress event with the current and expected total bytes\n" - }, - "type": { - "type": "reflection", - "declaration": { - "id": 19, - "name": "__type", - "kind": 65536, - "kindString": "Type literal", - "flags": {}, - "signatures": [ - { - "id": 20, - "name": "__call", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 21, - "name": "e", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "any" - } - } - ], - "type": { - "type": "intrinsic", - "name": "void" - } - } - ], - "sources": [ - { - "fileName": "events-overloads.ts", - "line": 32, - "character": 34 - } - ] - } - } - } - ], - "type": { - "type": "intrinsic", - "name": "void" - } - }, - { - "id": 22, - "name": "on", - "kind": 8388608, - "kindString": "Event", - "flags": {}, - "comment": { - "shortText": "Subscribe for success notification." - }, - "parameters": [ - { - "id": 23, - "name": "event", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "comment": { - "text": "The name of the event to subscribe for." - }, - "type": { - "type": "stringLiteral", - "value": "complete" - } - }, - { - "id": 24, - "name": "handler", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "comment": { - "text": "A function that will be called with general event data upon successful completion\n" - }, - "type": { - "type": "reflection", - "declaration": { - "id": 25, - "name": "__type", - "kind": 65536, - "kindString": "Type literal", - "flags": {}, - "signatures": [ - { - "id": 26, - "name": "__call", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 27, - "name": "e", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "any" - } - } - ], - "type": { - "type": "intrinsic", - "name": "void" - } - } - ], - "sources": [ - { - "fileName": "events-overloads.ts", - "line": 41, - "character": 34 - } - ] - } - } - } - ], - "type": { - "type": "intrinsic", - "name": "void" - } - } - ], - "sources": [ - { - "fileName": "events-overloads.ts", - "line": 14, - "character": 6 - }, - { - "fileName": "events-overloads.ts", - "line": 23, - "character": 6 - }, - { - "fileName": "events-overloads.ts", - "line": 32, - "character": 6 - }, - { - "fileName": "events-overloads.ts", - "line": 41, - "character": 6 - } - ] - } - ], - "groups": [ - { - "title": "Events", - "kind": 8388608, - "children": [ - 3 - ] - } - ], - "sources": [ - { - "fileName": "events-overloads.ts", - "line": 6, - "character": 14 - } - ] - } - ], - "groups": [ - { - "title": "Interfaces", - "kind": 256, - "children": [ - 2 - ] - } - ], - "sources": [ - { - "fileName": "events-overloads.ts", - "line": 1, - "character": 0 - } - ] - } - ], - "groups": [ - { - "title": "External modules", - "kind": 1, - "children": [ - 1 - ] - } - ] -} \ No newline at end of file diff --git a/src/test/converter/events/specs.json b/src/test/converter/events/specs.json deleted file mode 100644 index c73496620..000000000 --- a/src/test/converter/events/specs.json +++ /dev/null @@ -1,94 +0,0 @@ -{ - "id": 0, - "name": "typedoc", - "kind": 0, - "flags": {}, - "children": [ - { - "id": 1, - "name": "\"events\"", - "kind": 1, - "kindString": "External module", - "flags": { - "isExported": true - }, - "originalName": "%BASE%/events/events.ts", - "children": [ - { - "id": 2, - "name": "EventDispatcher", - "kind": 128, - "kindString": "Class", - "flags": {}, - "children": [ - { - "id": 3, - "name": "EVENT_CLICK", - "kind": 8388608, - "kindString": "Event", - "flags": { - "isStatic": true - }, - "comment": { - "shortText": "This is an event documentation." - }, - "sources": [ - { - "fileName": "events.ts", - "line": 6, - "character": 22 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - }, - "defaultValue": "\"click\"" - } - ], - "groups": [ - { - "title": "Events", - "kind": 8388608, - "children": [ - 3 - ] - } - ], - "sources": [ - { - "fileName": "events.ts", - "line": 1, - "character": 21 - } - ] - } - ], - "groups": [ - { - "title": "Classes", - "kind": 128, - "children": [ - 2 - ] - } - ], - "sources": [ - { - "fileName": "events.ts", - "line": 1, - "character": 0 - } - ] - } - ], - "groups": [ - { - "title": "External modules", - "kind": 1, - "children": [ - 1 - ] - } - ] -} \ No newline at end of file diff --git a/src/test/converter/export-assignment/specs.json b/src/test/converter/export-assignment/specs.json deleted file mode 100644 index 11cf36c83..000000000 --- a/src/test/converter/export-assignment/specs.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "id": 0, - "name": "typedoc", - "kind": 0, - "flags": {}, - "children": [ - { - "id": 1, - "name": "\"export-assignment\"", - "kind": 1, - "kindString": "External module", - "flags": { - "isExported": true - }, - "originalName": "%BASE%/export-assignment/export-assignment.ts", - "children": [ - { - "id": 2, - "name": "add", - "kind": 64, - "kindString": "Function", - "flags": { - "isExported": true, - "hasExportAssignment": true - }, - "signatures": [ - { - "id": 3, - "name": "add", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 4, - "name": "x", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 5, - "name": "y", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "sources": [ - { - "fileName": "export-assignment.ts", - "line": 1, - "character": 12 - } - ] - } - ], - "groups": [ - { - "title": "Functions", - "kind": 64, - "children": [ - 2 - ] - } - ], - "sources": [ - { - "fileName": "export-assignment.ts", - "line": 1, - "character": 0 - } - ] - } - ], - "groups": [ - { - "title": "External modules", - "kind": 1, - "children": [ - 1 - ] - } - ] -} \ No newline at end of file diff --git a/src/test/converter/export-default/specs.json b/src/test/converter/export-default/specs.json deleted file mode 100644 index d3e0908a3..000000000 --- a/src/test/converter/export-default/specs.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "id": 0, - "name": "typedoc", - "kind": 0, - "flags": {}, - "children": [ - { - "id": 1, - "name": "\"export-default\"", - "kind": 1, - "kindString": "External module", - "flags": { - "isExported": true - }, - "originalName": "%BASE%/export-default/export-default.ts", - "children": [ - { - "id": 2, - "name": "x", - "kind": 32, - "kindString": "Variable", - "flags": { - "isExported": true, - "isConst": true - }, - "sources": [ - { - "fileName": "export-default.ts", - "line": 1, - "character": 7 - } - ], - "type": { - "type": "unknown", - "name": "5" - }, - "defaultValue": "5" - } - ], - "groups": [ - { - "title": "Variables", - "kind": 32, - "children": [ - 2 - ] - } - ], - "sources": [ - { - "fileName": "export-default.ts", - "line": 1, - "character": 0 - } - ] - } - ], - "groups": [ - { - "title": "External modules", - "kind": 1, - "children": [ - 1 - ] - } - ] -} \ No newline at end of file diff --git a/src/test/converter/export-with-local/specs-without-exported.json b/src/test/converter/export-with-local/specs-without-exported.json deleted file mode 100644 index 304decebb..000000000 --- a/src/test/converter/export-with-local/specs-without-exported.json +++ /dev/null @@ -1,133 +0,0 @@ -{ - "id": 0, - "name": "typedoc", - "kind": 0, - "flags": {}, - "children": [ - { - "id": 1, - "name": "\"export-with-local\"", - "kind": 1, - "kindString": "External module", - "flags": { - "isExported": true - }, - "originalName": "%BASE%/export-with-local/export-with-local.ts", - "children": [ - { - "id": 2, - "name": "x", - "kind": 32, - "kindString": "Variable", - "flags": { - "isExported": true, - "isConst": true - }, - "sources": [ - { - "fileName": "export-with-local.ts", - "line": 1, - "character": 14 - } - ], - "type": { - "type": "unknown", - "name": "5" - }, - "defaultValue": "5" - }, - { - "id": 3, - "name": "add", - "kind": 64, - "kindString": "Function", - "flags": { - "isExported": true - }, - "signatures": [ - { - "id": 4, - "name": "add", - "kind": 4096, - "kindString": "Call signature", - "flags": { - "isExported": true - }, - "parameters": [ - { - "id": 5, - "name": "x", - "kind": 32768, - "kindString": "Parameter", - "flags": { - "isExported": true - }, - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 6, - "name": "y", - "kind": 32768, - "kindString": "Parameter", - "flags": { - "isExported": true - }, - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "sources": [ - { - "fileName": "export-with-local.ts", - "line": 3, - "character": 19 - } - ] - } - ], - "groups": [ - { - "title": "Variables", - "kind": 32, - "children": [ - 2 - ] - }, - { - "title": "Functions", - "kind": 64, - "children": [ - 3 - ] - } - ], - "sources": [ - { - "fileName": "export-with-local.ts", - "line": 1, - "character": 0 - } - ] - } - ], - "groups": [ - { - "title": "External modules", - "kind": 1, - "children": [ - 1 - ] - } - ] -} \ No newline at end of file diff --git a/src/test/converter/export-with-local/specs.json b/src/test/converter/export-with-local/specs.json deleted file mode 100644 index 8bf17efe4..000000000 --- a/src/test/converter/export-with-local/specs.json +++ /dev/null @@ -1,207 +0,0 @@ -{ - "id": 0, - "name": "typedoc", - "kind": 0, - "flags": {}, - "children": [ - { - "id": 1, - "name": "\"export-with-local\"", - "kind": 1, - "kindString": "External module", - "flags": { - "isExported": true - }, - "originalName": "%BASE%/export-with-local/export-with-local.ts", - "children": [ - { - "id": 7, - "name": "localVar", - "kind": 32, - "kindString": "Variable", - "flags": { - "isLet": true - }, - "sources": [ - { - "fileName": "export-with-local.ts", - "line": 9, - "character": 12 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - }, - "defaultValue": "\"local\"" - }, - { - "id": 2, - "name": "x", - "kind": 32, - "kindString": "Variable", - "flags": { - "isExported": true, - "isConst": true - }, - "sources": [ - { - "fileName": "export-with-local.ts", - "line": 1, - "character": 14 - } - ], - "type": { - "type": "unknown", - "name": "5" - }, - "defaultValue": "5" - }, - { - "id": 3, - "name": "add", - "kind": 64, - "kindString": "Function", - "flags": { - "isExported": true - }, - "signatures": [ - { - "id": 4, - "name": "add", - "kind": 4096, - "kindString": "Call signature", - "flags": { - "isExported": true - }, - "parameters": [ - { - "id": 5, - "name": "x", - "kind": 32768, - "kindString": "Parameter", - "flags": { - "isExported": true - }, - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 6, - "name": "y", - "kind": 32768, - "kindString": "Parameter", - "flags": { - "isExported": true - }, - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "sources": [ - { - "fileName": "export-with-local.ts", - "line": 3, - "character": 19 - } - ] - }, - { - "id": 8, - "name": "times", - "kind": 64, - "kindString": "Function", - "flags": {}, - "signatures": [ - { - "id": 9, - "name": "times", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 10, - "name": "x", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 11, - "name": "y", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "sources": [ - { - "fileName": "export-with-local.ts", - "line": 11, - "character": 14 - } - ] - } - ], - "groups": [ - { - "title": "Variables", - "kind": 32, - "children": [ - 7, - 2 - ] - }, - { - "title": "Functions", - "kind": 64, - "children": [ - 3, - 8 - ] - } - ], - "sources": [ - { - "fileName": "export-with-local.ts", - "line": 1, - "character": 0 - } - ] - } - ], - "groups": [ - { - "title": "External modules", - "kind": 1, - "children": [ - 1 - ] - } - ] -} \ No newline at end of file diff --git a/src/test/converter/export-assignment/export-assignment.ts b/src/test/converter/exports/export-assignment.ts similarity index 100% rename from src/test/converter/export-assignment/export-assignment.ts rename to src/test/converter/exports/export-assignment.ts diff --git a/src/test/converter/export-default/export-default.ts b/src/test/converter/exports/export-default.ts similarity index 100% rename from src/test/converter/export-default/export-default.ts rename to src/test/converter/exports/export-default.ts diff --git a/src/test/converter/export-with-local/export-with-local.ts b/src/test/converter/exports/export-with-local.ts similarity index 100% rename from src/test/converter/export-with-local/export-with-local.ts rename to src/test/converter/exports/export-with-local.ts diff --git a/src/test/converter/exports/specs-without-exported.json b/src/test/converter/exports/specs-without-exported.json new file mode 100644 index 000000000..4331ea498 --- /dev/null +++ b/src/test/converter/exports/specs-without-exported.json @@ -0,0 +1,389 @@ +{ + "id": 0, + "name": "typedoc", + "kind": 0, + "flags": {}, + "children": [ + { + "id": 14, + "name": "\"export\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/exports/export.ts", + "children": [ + { + "id": 15, + "name": "a", + "kind": 16777216, + "kindString": "Reference", + "flags": { + "isExported": true + }, + "target": 10 + }, + { + "id": 16, + "name": "b", + "kind": 16777216, + "kindString": "Reference", + "flags": { + "isExported": true + }, + "target": 11 + }, + { + "id": 17, + "name": "c", + "kind": 16777216, + "kindString": "Reference", + "flags": { + "isExported": true + }, + "target": 12 + }, + { + "id": 19, + "name": "c", + "kind": 16777216, + "kindString": "Reference", + "flags": { + "isExported": true + }, + "target": 10 + }, + { + "id": 20, + "name": "add", + "kind": 64, + "kindString": "Function", + "flags": { + "isExported": true + }, + "signatures": [ + { + "id": 21, + "name": "add", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isExported": true + }, + "parameters": [ + { + "id": 22, + "name": "x", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isExported": true + }, + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 23, + "name": "y", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isExported": true + }, + "type": { + "type": "intrinsic", + "name": "number" + } + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + } + ], + "sources": [ + { + "fileName": "export.ts", + "line": 7, + "character": 12 + } + ] + } + ], + "groups": [ + { + "title": "References", + "kind": 16777216, + "children": [ + 15, + 16, + 17, + 19 + ] + }, + { + "title": "Functions", + "kind": 64, + "children": [ + 20 + ] + } + ], + "sources": [ + { + "fileName": "export.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 1, + "name": "\"export-assignment\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/exports/export-assignment.ts", + "sources": [ + { + "fileName": "export-assignment.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 2, + "name": "\"export-default\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/exports/export-default.ts", + "sources": [ + { + "fileName": "export-default.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 3, + "name": "\"export-with-local\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/exports/export-with-local.ts", + "children": [ + { + "id": 4, + "name": "x", + "kind": 32, + "kindString": "Variable", + "flags": { + "isExported": true, + "isConst": true + }, + "sources": [ + { + "fileName": "export-with-local.ts", + "line": 1, + "character": 14 + } + ], + "type": { + "type": "unknown", + "name": "5" + }, + "defaultValue": "5" + }, + { + "id": 5, + "name": "add", + "kind": 64, + "kindString": "Function", + "flags": { + "isExported": true + }, + "signatures": [ + { + "id": 6, + "name": "add", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isExported": true + }, + "parameters": [ + { + "id": 7, + "name": "x", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isExported": true + }, + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 8, + "name": "y", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isExported": true + }, + "type": { + "type": "intrinsic", + "name": "number" + } + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + } + ], + "sources": [ + { + "fileName": "export-with-local.ts", + "line": 3, + "character": 19 + } + ] + } + ], + "groups": [ + { + "title": "Variables", + "kind": 32, + "children": [ + 4 + ] + }, + { + "title": "Functions", + "kind": 64, + "children": [ + 5 + ] + } + ], + "sources": [ + { + "fileName": "export-with-local.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 9, + "name": "\"mod\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/exports/mod.ts", + "children": [ + { + "id": 11, + "name": "b", + "kind": 16777216, + "kindString": "Reference", + "flags": { + "isExported": true + }, + "target": 10 + }, + { + "id": 12, + "name": "c", + "kind": 16777216, + "kindString": "Reference", + "flags": { + "isExported": true + }, + "target": 10 + }, + { + "id": 10, + "name": "a", + "kind": 32, + "kindString": "Variable", + "flags": { + "isExported": true, + "isConst": true + }, + "comment": { + "shortText": "A simple named export that will be exported from export.ts" + }, + "sources": [ + { + "fileName": "mod.ts", + "line": 4, + "character": 14 + } + ], + "type": { + "type": "unknown", + "name": "1" + }, + "defaultValue": "1" + } + ], + "groups": [ + { + "title": "References", + "kind": 16777216, + "children": [ + 11, + 12 + ] + }, + { + "title": "Variables", + "kind": 32, + "children": [ + 10 + ] + } + ], + "sources": [ + { + "fileName": "mod.ts", + "line": 1, + "character": 0 + } + ] + } + ], + "groups": [ + { + "title": "External modules", + "kind": 1, + "children": [ + 14, + 1, + 2, + 3, + 9 + ] + } + ] +} \ No newline at end of file diff --git a/src/test/converter/exports/specs.json b/src/test/converter/exports/specs.json index 5367e0aac..e5d9068c0 100644 --- a/src/test/converter/exports/specs.json +++ b/src/test/converter/exports/specs.json @@ -5,7 +5,7 @@ "flags": {}, "children": [ { - "id": 8, + "id": 26, "name": "\"export\"", "kind": 1, "kindString": "External module", @@ -15,47 +15,47 @@ "originalName": "%BASE%/exports/export.ts", "children": [ { - "id": 9, + "id": 27, "name": "a", "kind": 16777216, "kindString": "Reference", "flags": { "isExported": true }, - "target": 2 + "target": 20 }, { - "id": 10, + "id": 28, "name": "b", "kind": 16777216, "kindString": "Reference", "flags": { "isExported": true }, - "target": 3 + "target": 21 }, { - "id": 11, + "id": 29, "name": "c", "kind": 16777216, "kindString": "Reference", "flags": { "isExported": true }, - "target": 4 + "target": 22 }, { - "id": 13, + "id": 31, "name": "c", "kind": 16777216, "kindString": "Reference", "flags": { "isExported": true }, - "target": 2 + "target": 20 }, { - "id": 14, + "id": 32, "name": "add", "kind": 64, "kindString": "Function", @@ -64,7 +64,7 @@ }, "signatures": [ { - "id": 15, + "id": 33, "name": "add", "kind": 4096, "kindString": "Call signature", @@ -73,7 +73,7 @@ }, "parameters": [ { - "id": 16, + "id": 34, "name": "x", "kind": 32768, "kindString": "Parameter", @@ -86,7 +86,7 @@ } }, { - "id": 17, + "id": 35, "name": "y", "kind": 32768, "kindString": "Parameter", @@ -114,21 +114,21 @@ ] }, { - "id": 18, + "id": 36, "name": "default", "kind": 64, "kindString": "Function", "flags": {}, "signatures": [ { - "id": 19, + "id": 37, "name": "default", "kind": 4096, "kindString": "Call signature", "flags": {}, "parameters": [ { - "id": 20, + "id": 38, "name": "a", "kind": 32768, "kindString": "Parameter", @@ -159,18 +159,18 @@ "title": "References", "kind": 16777216, "children": [ - 9, - 10, - 11, - 13 + 27, + 28, + 29, + 31 ] }, { "title": "Functions", "kind": 64, "children": [ - 14, - 18 + 32, + 36 ] } ], @@ -184,6 +184,328 @@ }, { "id": 1, + "name": "\"export-assignment\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/exports/export-assignment.ts", + "children": [ + { + "id": 2, + "name": "add", + "kind": 64, + "kindString": "Function", + "flags": { + "isExported": true, + "hasExportAssignment": true + }, + "signatures": [ + { + "id": 3, + "name": "add", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 4, + "name": "x", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 5, + "name": "y", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "number" + } + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + } + ], + "sources": [ + { + "fileName": "export-assignment.ts", + "line": 1, + "character": 12 + } + ] + } + ], + "groups": [ + { + "title": "Functions", + "kind": 64, + "children": [ + 2 + ] + } + ], + "sources": [ + { + "fileName": "export-assignment.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 6, + "name": "\"export-default\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/exports/export-default.ts", + "children": [ + { + "id": 7, + "name": "x", + "kind": 32, + "kindString": "Variable", + "flags": { + "isExported": true, + "isConst": true + }, + "sources": [ + { + "fileName": "export-default.ts", + "line": 1, + "character": 7 + } + ], + "type": { + "type": "unknown", + "name": "5" + }, + "defaultValue": "5" + } + ], + "groups": [ + { + "title": "Variables", + "kind": 32, + "children": [ + 7 + ] + } + ], + "sources": [ + { + "fileName": "export-default.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 8, + "name": "\"export-with-local\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/exports/export-with-local.ts", + "children": [ + { + "id": 14, + "name": "localVar", + "kind": 32, + "kindString": "Variable", + "flags": { + "isLet": true + }, + "sources": [ + { + "fileName": "export-with-local.ts", + "line": 9, + "character": 12 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "defaultValue": "\"local\"" + }, + { + "id": 9, + "name": "x", + "kind": 32, + "kindString": "Variable", + "flags": { + "isExported": true, + "isConst": true + }, + "sources": [ + { + "fileName": "export-with-local.ts", + "line": 1, + "character": 14 + } + ], + "type": { + "type": "unknown", + "name": "5" + }, + "defaultValue": "5" + }, + { + "id": 10, + "name": "add", + "kind": 64, + "kindString": "Function", + "flags": { + "isExported": true + }, + "signatures": [ + { + "id": 11, + "name": "add", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isExported": true + }, + "parameters": [ + { + "id": 12, + "name": "x", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isExported": true + }, + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 13, + "name": "y", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isExported": true + }, + "type": { + "type": "intrinsic", + "name": "number" + } + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + } + ], + "sources": [ + { + "fileName": "export-with-local.ts", + "line": 3, + "character": 19 + } + ] + }, + { + "id": 15, + "name": "times", + "kind": 64, + "kindString": "Function", + "flags": {}, + "signatures": [ + { + "id": 16, + "name": "times", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 17, + "name": "x", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 18, + "name": "y", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "number" + } + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + } + ], + "sources": [ + { + "fileName": "export-with-local.ts", + "line": 11, + "character": 14 + } + ] + } + ], + "groups": [ + { + "title": "Variables", + "kind": 32, + "children": [ + 14, + 9 + ] + }, + { + "title": "Functions", + "kind": 64, + "children": [ + 10, + 15 + ] + } + ], + "sources": [ + { + "fileName": "export-with-local.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 19, "name": "\"mod\"", "kind": 1, "kindString": "External module", @@ -193,27 +515,27 @@ "originalName": "%BASE%/exports/mod.ts", "children": [ { - "id": 3, + "id": 21, "name": "b", "kind": 16777216, "kindString": "Reference", "flags": { "isExported": true }, - "target": 2 + "target": 20 }, { - "id": 4, + "id": 22, "name": "c", "kind": 16777216, "kindString": "Reference", "flags": { "isExported": true }, - "target": 2 + "target": 20 }, { - "id": 2, + "id": 20, "name": "a", "kind": 32, "kindString": "Variable", @@ -238,14 +560,14 @@ "defaultValue": "1" }, { - "id": 5, + "id": 23, "name": "default", "kind": 64, "kindString": "Function", "flags": {}, "signatures": [ { - "id": 6, + "id": 24, "name": "default", "kind": 4096, "kindString": "Call signature", @@ -273,22 +595,22 @@ "title": "References", "kind": 16777216, "children": [ - 3, - 4 + 21, + 22 ] }, { "title": "Variables", "kind": 32, "children": [ - 2 + 20 ] }, { "title": "Functions", "kind": 64, "children": [ - 5 + 23 ] } ], @@ -306,9 +628,12 @@ "title": "External modules", "kind": 1, "children": [ + 26, + 1, + 6, 8, - 1 + 19 ] } ] -} +} \ No newline at end of file diff --git a/src/test/converter/generic-function/generic-function.ts b/src/test/converter/function/generic-function.ts similarity index 100% rename from src/test/converter/generic-function/generic-function.ts rename to src/test/converter/function/generic-function.ts diff --git a/src/test/converter/implicit-types/implicit-types.ts b/src/test/converter/function/implicit-types.ts similarity index 72% rename from src/test/converter/implicit-types/implicit-types.ts rename to src/test/converter/function/implicit-types.ts index 1e226982f..facad3478 100644 --- a/src/test/converter/implicit-types/implicit-types.ts +++ b/src/test/converter/function/implicit-types.ts @@ -1,11 +1,11 @@ -export interface IBreakpointRange { start: number; end: number } +export interface BreakpointRange { start: number; end: number; } let _breakpoints: { - small: IBreakpointRange; - medium: IBreakpointRange; - large: IBreakpointRange; - xlarge: IBreakpointRange; - xxlarge: IBreakpointRange; + small: BreakpointRange; + medium: BreakpointRange; + large: BreakpointRange; + xlarge: BreakpointRange; + xxlarge: BreakpointRange; }; export function getBreakpoints() { diff --git a/src/test/converter/function/specs.json b/src/test/converter/function/specs.json index ce22d045a..352b4ac82 100644 --- a/src/test/converter/function/specs.json +++ b/src/test/converter/function/specs.json @@ -1084,6 +1084,594 @@ "character": 0 } ] + }, + { + "id": 57, + "name": "\"generic-function\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/function/generic-function.ts", + "children": [ + { + "id": 62, + "name": "functionWithGenericArrayParameter", + "kind": 64, + "kindString": "Function", + "flags": {}, + "signatures": [ + { + "id": 63, + "name": "functionWithGenericArrayParameter", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "A function with a generic type array parameter.", + "returns": "A generic array.\n" + }, + "typeParameter": [ + { + "id": 64, + "name": "T", + "kind": 131072, + "kindString": "Type parameter", + "flags": {} + } + ], + "parameters": [ + { + "id": 65, + "name": "param", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "text": "A generic parameter." + }, + "type": { + "type": "typeParameter", + "name": "T" + } + }, + { + "id": 66, + "name": "params", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "text": "A generic array parameter." + }, + "type": { + "type": "array", + "elementType": { + "type": "typeParameter", + "name": "T" + } + } + } + ], + "type": { + "type": "array", + "elementType": { + "type": "typeParameter", + "name": "T" + } + } + } + ], + "sources": [ + { + "fileName": "generic-function.ts", + "line": 18, + "character": 42 + } + ] + }, + { + "id": 58, + "name": "genericFunction", + "kind": 64, + "kindString": "Function", + "flags": {}, + "signatures": [ + { + "id": 59, + "name": "genericFunction", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Generic function short text.", + "returns": "Generic function return value.\n" + }, + "typeParameter": [ + { + "id": 60, + "name": "T", + "kind": 131072, + "kindString": "Type parameter", + "flags": {}, + "comment": { + "text": "Generic function type parameter." + }, + "type": { + "type": "reference", + "name": "Object" + } + } + ], + "parameters": [ + { + "id": 61, + "name": "value", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "comment": { + "text": "Generic function parameter." + }, + "type": { + "type": "typeParameter", + "name": "T", + "constraint": { + "type": "reference", + "name": "Object" + } + } + } + ], + "type": { + "type": "typeParameter", + "name": "T", + "constraint": { + "type": "reference", + "name": "Object" + } + } + } + ], + "sources": [ + { + "fileName": "generic-function.ts", + "line": 7, + "character": 24 + } + ] + } + ], + "groups": [ + { + "title": "Functions", + "kind": 64, + "children": [ + 62, + 58 + ] + } + ], + "sources": [ + { + "fileName": "generic-function.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 67, + "name": "\"implicit-types\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/function/implicit-types.ts", + "children": [ + { + "id": 68, + "name": "BreakpointRange", + "kind": 256, + "kindString": "Interface", + "flags": { + "isExported": true + }, + "children": [ + { + "id": 70, + "name": "end", + "kind": 1024, + "kindString": "Property", + "flags": { + "isExported": true + }, + "sources": [ + { + "fileName": "implicit-types.ts", + "line": 1, + "character": 53 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 69, + "name": "start", + "kind": 1024, + "kindString": "Property", + "flags": { + "isExported": true + }, + "sources": [ + { + "fileName": "implicit-types.ts", + "line": 1, + "character": 40 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 70, + 69 + ] + } + ], + "sources": [ + { + "fileName": "implicit-types.ts", + "line": 1, + "character": 32 + } + ] + }, + { + "id": 71, + "name": "_breakpoints", + "kind": 32, + "kindString": "Variable", + "flags": { + "isLet": true + }, + "sources": [ + { + "fileName": "implicit-types.ts", + "line": 3, + "character": 16 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 72, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 75, + "name": "large", + "kind": 32, + "kindString": "Variable", + "flags": {}, + "sources": [ + { + "fileName": "implicit-types.ts", + "line": 6, + "character": 9 + } + ], + "type": { + "type": "reference", + "id": 68, + "name": "BreakpointRange" + } + }, + { + "id": 74, + "name": "medium", + "kind": 32, + "kindString": "Variable", + "flags": {}, + "sources": [ + { + "fileName": "implicit-types.ts", + "line": 5, + "character": 10 + } + ], + "type": { + "type": "reference", + "id": 68, + "name": "BreakpointRange" + } + }, + { + "id": 73, + "name": "small", + "kind": 32, + "kindString": "Variable", + "flags": {}, + "sources": [ + { + "fileName": "implicit-types.ts", + "line": 4, + "character": 9 + } + ], + "type": { + "type": "reference", + "id": 68, + "name": "BreakpointRange" + } + }, + { + "id": 76, + "name": "xlarge", + "kind": 32, + "kindString": "Variable", + "flags": {}, + "sources": [ + { + "fileName": "implicit-types.ts", + "line": 7, + "character": 10 + } + ], + "type": { + "type": "reference", + "id": 68, + "name": "BreakpointRange" + } + }, + { + "id": 77, + "name": "xxlarge", + "kind": 32, + "kindString": "Variable", + "flags": {}, + "sources": [ + { + "fileName": "implicit-types.ts", + "line": 8, + "character": 11 + } + ], + "type": { + "type": "reference", + "id": 68, + "name": "BreakpointRange" + } + } + ], + "groups": [ + { + "title": "Variables", + "kind": 32, + "children": [ + 75, + 74, + 73, + 76, + 77 + ] + } + ], + "sources": [ + { + "fileName": "implicit-types.ts", + "line": 3, + "character": 17 + } + ] + } + } + }, + { + "id": 78, + "name": "getBreakpoints", + "kind": 64, + "kindString": "Function", + "flags": { + "isExported": true + }, + "signatures": [ + { + "id": 79, + "name": "getBreakpoints", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isExported": true + }, + "type": { + "type": "reflection", + "declaration": { + "id": 80, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": { + "isExported": true + }, + "children": [ + { + "id": 83, + "name": "large", + "kind": 32, + "kindString": "Variable", + "flags": { + "isExported": true + }, + "sources": [ + { + "fileName": "implicit-types.ts", + "line": 6, + "character": 9 + } + ], + "type": { + "type": "reference", + "id": 68, + "name": "BreakpointRange" + } + }, + { + "id": 82, + "name": "medium", + "kind": 32, + "kindString": "Variable", + "flags": { + "isExported": true + }, + "sources": [ + { + "fileName": "implicit-types.ts", + "line": 5, + "character": 10 + } + ], + "type": { + "type": "reference", + "id": 68, + "name": "BreakpointRange" + } + }, + { + "id": 81, + "name": "small", + "kind": 32, + "kindString": "Variable", + "flags": { + "isExported": true + }, + "sources": [ + { + "fileName": "implicit-types.ts", + "line": 4, + "character": 9 + } + ], + "type": { + "type": "reference", + "id": 68, + "name": "BreakpointRange" + } + }, + { + "id": 84, + "name": "xlarge", + "kind": 32, + "kindString": "Variable", + "flags": { + "isExported": true + }, + "sources": [ + { + "fileName": "implicit-types.ts", + "line": 7, + "character": 10 + } + ], + "type": { + "type": "reference", + "id": 68, + "name": "BreakpointRange" + } + }, + { + "id": 85, + "name": "xxlarge", + "kind": 32, + "kindString": "Variable", + "flags": { + "isExported": true + }, + "sources": [ + { + "fileName": "implicit-types.ts", + "line": 8, + "character": 11 + } + ], + "type": { + "type": "reference", + "id": 68, + "name": "BreakpointRange" + } + } + ], + "groups": [ + { + "title": "Variables", + "kind": 32, + "children": [ + 83, + 82, + 81, + 84, + 85 + ] + } + ] + } + } + } + ], + "sources": [ + { + "fileName": "implicit-types.ts", + "line": 11, + "character": 30 + } + ] + } + ], + "groups": [ + { + "title": "Interfaces", + "kind": 256, + "children": [ + 68 + ] + }, + { + "title": "Variables", + "kind": 32, + "children": [ + 71 + ] + }, + { + "title": "Functions", + "kind": 64, + "children": [ + 78 + ] + } + ], + "sources": [ + { + "fileName": "implicit-types.ts", + "line": 1, + "character": 0 + } + ] } ], "groups": [ @@ -1091,7 +1679,9 @@ "title": "External modules", "kind": 1, "children": [ - 1 + 1, + 57, + 67 ] } ] diff --git a/src/test/converter/generic-class/specs.json b/src/test/converter/generic-class/specs.json deleted file mode 100644 index 064df9970..000000000 --- a/src/test/converter/generic-class/specs.json +++ /dev/null @@ -1,454 +0,0 @@ -{ - "id": 0, - "name": "typedoc", - "kind": 0, - "flags": {}, - "children": [ - { - "id": 1, - "name": "\"generic-class\"", - "kind": 1, - "kindString": "External module", - "flags": { - "isExported": true - }, - "originalName": "%BASE%/generic-class/generic-class.ts", - "children": [ - { - "id": 2, - "name": "GenericClass", - "kind": 128, - "kindString": "Class", - "flags": {}, - "comment": { - "shortText": "GenericClass short text." - }, - "typeParameter": [ - { - "id": 3, - "name": "T", - "kind": 131072, - "kindString": "Type parameter", - "flags": {}, - "comment": { - "shortText": "Generic parameter.\n" - } - } - ], - "children": [ - { - "id": 6, - "name": "constructor", - "kind": 512, - "kindString": "Constructor", - "flags": {}, - "comment": { - "shortText": "Constructor short text." - }, - "signatures": [ - { - "id": 7, - "name": "new GenericClass", - "kind": 16384, - "kindString": "Constructor signature", - "flags": {}, - "comment": { - "shortText": "Constructor short text." - }, - "parameters": [ - { - "id": 8, - "name": "value", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "comment": { - "shortText": "Constructor parameter.\n" - }, - "type": { - "type": "typeParameter", - "name": "T" - } - } - ], - "type": { - "type": "reference", - "name": "GenericClass", - "id": 2 - } - } - ], - "sources": [ - { - "fileName": "generic-class.ts", - "line": 14, - "character": 26 - } - ] - }, - { - "id": 4, - "name": "value", - "kind": 1024, - "kindString": "Property", - "flags": { - "isProtected": true - }, - "comment": { - "shortText": "Generic property." - }, - "sources": [ - { - "fileName": "generic-class.ts", - "line": 9, - "character": 19 - } - ], - "type": { - "type": "typeParameter", - "name": "T" - } - }, - { - "id": 5, - "name": "values", - "kind": 1024, - "kindString": "Property", - "flags": { - "isProtected": true - }, - "comment": { - "shortText": "Generic property array." - }, - "sources": [ - { - "fileName": "generic-class.ts", - "line": 14, - "character": 20 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "typeParameter", - "name": "T" - } - } - }, - { - "id": 9, - "name": "getValue", - "kind": 2048, - "kindString": "Method", - "flags": {}, - "signatures": [ - { - "id": 10, - "name": "getValue", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "comment": { - "shortText": "getValue short text.", - "returns": "Return value comment.\n" - }, - "type": { - "type": "typeParameter", - "name": "T" - } - } - ], - "sources": [ - { - "fileName": "generic-class.ts", - "line": 28, - "character": 12 - } - ] - } - ], - "groups": [ - { - "title": "Constructors", - "kind": 512, - "children": [ - 6 - ] - }, - { - "title": "Properties", - "kind": 1024, - "children": [ - 4, - 5 - ] - }, - { - "title": "Methods", - "kind": 2048, - "children": [ - 9 - ] - } - ], - "sources": [ - { - "fileName": "generic-class.ts", - "line": 5, - "character": 18 - } - ], - "extendedBy": [ - { - "type": "reference", - "name": "NonGenericClass", - "id": 11 - } - ] - }, - { - "id": 11, - "name": "NonGenericClass", - "kind": 128, - "kindString": "Class", - "flags": {}, - "comment": { - "shortText": "NonGenericClass short text." - }, - "children": [ - { - "id": 14, - "name": "constructor", - "kind": 512, - "kindString": "Constructor", - "flags": {}, - "comment": { - "shortText": "Constructor short text." - }, - "signatures": [ - { - "id": 15, - "name": "new NonGenericClass", - "kind": 16384, - "kindString": "Constructor signature", - "flags": {}, - "comment": { - "shortText": "Constructor short text." - }, - "parameters": [ - { - "id": 16, - "name": "value", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "comment": { - "shortText": "Constructor parameter.\n" - }, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "name": "NonGenericClass", - "id": 11 - }, - "inheritedFrom": { - "type": "reference", - "name": "GenericClass.__constructor", - "id": 6 - } - } - ], - "sources": [ - { - "fileName": "generic-class.ts", - "line": 14, - "character": 26 - } - ], - "inheritedFrom": { - "type": "reference", - "name": "GenericClass.__constructor", - "id": 6 - } - }, - { - "id": 12, - "name": "value", - "kind": 1024, - "kindString": "Property", - "flags": { - "isProtected": true - }, - "comment": { - "shortText": "Generic property." - }, - "sources": [ - { - "fileName": "generic-class.ts", - "line": 9, - "character": 19 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - }, - "inheritedFrom": { - "type": "reference", - "name": "GenericClass.value", - "id": 4 - } - }, - { - "id": 13, - "name": "values", - "kind": 1024, - "kindString": "Property", - "flags": { - "isProtected": true - }, - "comment": { - "shortText": "Generic property array." - }, - "sources": [ - { - "fileName": "generic-class.ts", - "line": 14, - "character": 20 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - }, - "inheritedFrom": { - "type": "reference", - "name": "GenericClass.values", - "id": 5 - } - }, - { - "id": 17, - "name": "getValue", - "kind": 2048, - "kindString": "Method", - "flags": {}, - "signatures": [ - { - "id": 18, - "name": "getValue", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "comment": { - "shortText": "getValue short text.", - "returns": "Return value comment.\n" - }, - "type": { - "type": "intrinsic", - "name": "string" - }, - "inheritedFrom": { - "type": "reference", - "name": "GenericClass.getValue", - "id": 9 - } - } - ], - "sources": [ - { - "fileName": "generic-class.ts", - "line": 28, - "character": 12 - } - ], - "inheritedFrom": { - "type": "reference", - "name": "GenericClass.getValue", - "id": 9 - } - } - ], - "groups": [ - { - "title": "Constructors", - "kind": 512, - "children": [ - 14 - ] - }, - { - "title": "Properties", - "kind": 1024, - "children": [ - 12, - 13 - ] - }, - { - "title": "Methods", - "kind": 2048, - "children": [ - 17 - ] - } - ], - "sources": [ - { - "fileName": "generic-class.ts", - "line": 36, - "character": 21 - } - ], - "extendedTypes": [ - { - "type": "reference", - "name": "GenericClass", - "id": 2, - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ] - } - ] - } - ], - "groups": [ - { - "title": "Classes", - "kind": 128, - "children": [ - 2, - 11 - ] - } - ], - "sources": [ - { - "fileName": "generic-class.ts", - "line": 1, - "character": 0 - } - ] - } - ], - "groups": [ - { - "title": "External modules", - "kind": 1, - "children": [ - 1 - ] - } - ] -} \ No newline at end of file diff --git a/src/test/converter/generic-function/specs.json b/src/test/converter/generic-function/specs.json deleted file mode 100644 index c8c6664ed..000000000 --- a/src/test/converter/generic-function/specs.json +++ /dev/null @@ -1,193 +0,0 @@ -{ - "id": 0, - "name": "typedoc", - "kind": 0, - "flags": {}, - "children": [ - { - "id": 1, - "name": "\"generic-function\"", - "kind": 1, - "kindString": "External module", - "flags": { - "isExported": true - }, - "originalName": "%BASE%/generic-function/generic-function.ts", - "children": [ - { - "id": 6, - "name": "functionWithGenericArrayParameter", - "kind": 64, - "kindString": "Function", - "flags": {}, - "signatures": [ - { - "id": 7, - "name": "functionWithGenericArrayParameter", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "comment": { - "shortText": "A function with a generic type array parameter.", - "returns": "A generic array.\n" - }, - "typeParameter": [ - { - "id": 8, - "name": "T", - "kind": 131072, - "kindString": "Type parameter", - "flags": {} - } - ], - "parameters": [ - { - "id": 9, - "name": "param", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "comment": { - "text": "A generic parameter." - }, - "type": { - "type": "typeParameter", - "name": "T" - } - }, - { - "id": 10, - "name": "params", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "comment": { - "text": "A generic array parameter." - }, - "type": { - "type": "array", - "elementType": { - "type": "typeParameter", - "name": "T" - } - } - } - ], - "type": { - "type": "array", - "elementType": { - "type": "typeParameter", - "name": "T" - } - } - } - ], - "sources": [ - { - "fileName": "generic-function.ts", - "line": 18, - "character": 42 - } - ] - }, - { - "id": 2, - "name": "genericFunction", - "kind": 64, - "kindString": "Function", - "flags": {}, - "signatures": [ - { - "id": 3, - "name": "genericFunction", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "comment": { - "shortText": "Generic function short text.", - "returns": "Generic function return value.\n" - }, - "typeParameter": [ - { - "id": 4, - "name": "T", - "kind": 131072, - "kindString": "Type parameter", - "flags": {}, - "comment": { - "text": "Generic function type parameter." - }, - "type": { - "type": "reference", - "name": "Object" - } - } - ], - "parameters": [ - { - "id": 5, - "name": "value", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "comment": { - "text": "Generic function parameter." - }, - "type": { - "type": "typeParameter", - "name": "T", - "constraint": { - "type": "reference", - "name": "Object" - } - } - } - ], - "type": { - "type": "typeParameter", - "name": "T", - "constraint": { - "type": "reference", - "name": "Object" - } - } - } - ], - "sources": [ - { - "fileName": "generic-function.ts", - "line": 7, - "character": 24 - } - ] - } - ], - "groups": [ - { - "title": "Functions", - "kind": 64, - "children": [ - 6, - 2 - ] - } - ], - "sources": [ - { - "fileName": "generic-function.ts", - "line": 1, - "character": 0 - } - ] - } - ], - "groups": [ - { - "title": "External modules", - "kind": 1, - "children": [ - 1 - ] - } - ] -} \ No newline at end of file diff --git a/src/test/converter/getter-setter/specs.json b/src/test/converter/getter-setter/specs.json deleted file mode 100644 index 8d0393053..000000000 --- a/src/test/converter/getter-setter/specs.json +++ /dev/null @@ -1,224 +0,0 @@ -{ - "id": 0, - "name": "typedoc", - "kind": 0, - "flags": {}, - "children": [ - { - "id": 1, - "name": "\"getter-setter\"", - "kind": 1, - "kindString": "External module", - "flags": { - "isExported": true - }, - "originalName": "%BASE%/getter-setter/getter-setter.ts", - "children": [ - { - "id": 2, - "name": "GetterSetter", - "kind": 128, - "kindString": "Class", - "flags": {}, - "children": [ - { - "id": 3, - "name": "_name", - "kind": 1024, - "kindString": "Property", - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "getter-setter.ts", - "line": 2, - "character": 17 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 4, - "name": "name", - "kind": 262144, - "kindString": "Accessor", - "flags": {}, - "getSignature": [ - { - "id": 5, - "name": "__get", - "kind": 524288, - "kindString": "Get signature", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "setSignature": [ - { - "id": 6, - "name": "__set", - "kind": 1048576, - "kindString": "Set signature", - "flags": {}, - "parameters": [ - { - "id": 7, - "name": "value", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "intrinsic", - "name": "void" - } - } - ], - "sources": [ - { - "fileName": "getter-setter.ts", - "line": 4, - "character": 12 - }, - { - "fileName": "getter-setter.ts", - "line": 5, - "character": 12 - } - ] - }, - { - "id": 8, - "name": "readOnlyName", - "kind": 262144, - "kindString": "Accessor", - "flags": {}, - "getSignature": [ - { - "id": 9, - "name": "__get", - "kind": 524288, - "kindString": "Get signature", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "sources": [ - { - "fileName": "getter-setter.ts", - "line": 7, - "character": 20 - } - ] - }, - { - "id": 10, - "name": "writeOnlyName", - "kind": 262144, - "kindString": "Accessor", - "flags": {}, - "setSignature": [ - { - "id": 11, - "name": "__set", - "kind": 1048576, - "kindString": "Set signature", - "flags": {}, - "parameters": [ - { - "id": 12, - "name": "value", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "intrinsic", - "name": "void" - } - } - ], - "sources": [ - { - "fileName": "getter-setter.ts", - "line": 9, - "character": 21 - } - ] - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [ - 3 - ] - }, - { - "title": "Accessors", - "kind": 262144, - "children": [ - 4, - 8, - 10 - ] - } - ], - "sources": [ - { - "fileName": "getter-setter.ts", - "line": 1, - "character": 18 - } - ] - } - ], - "groups": [ - { - "title": "Classes", - "kind": 128, - "children": [ - 2 - ] - } - ], - "sources": [ - { - "fileName": "getter-setter.ts", - "line": 1, - "character": 0 - } - ] - } - ], - "groups": [ - { - "title": "External modules", - "kind": 1, - "children": [ - 1 - ] - } - ] -} \ No newline at end of file diff --git a/src/test/converter/implicit-types/specs.json b/src/test/converter/implicit-types/specs.json deleted file mode 100644 index 2619eeebf..000000000 --- a/src/test/converter/implicit-types/specs.json +++ /dev/null @@ -1,429 +0,0 @@ -{ - "id": 0, - "name": "typedoc", - "kind": 0, - "flags": {}, - "children": [ - { - "id": 1, - "name": "\"implicit-types\"", - "kind": 1, - "kindString": "External module", - "flags": { - "isExported": true - }, - "originalName": "%BASE%/implicit-types/implicit-types.ts", - "children": [ - { - "id": 2, - "name": "IBreakpointRange", - "kind": 256, - "kindString": "Interface", - "flags": { - "isExported": true - }, - "children": [ - { - "id": 4, - "name": "end", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "implicit-types.ts", - "line": 1, - "character": 54 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 3, - "name": "start", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "implicit-types.ts", - "line": 1, - "character": 41 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [ - 4, - 3 - ] - } - ], - "sources": [ - { - "fileName": "implicit-types.ts", - "line": 1, - "character": 33 - } - ] - }, - { - "id": 5, - "name": "_breakpoints", - "kind": 32, - "kindString": "Variable", - "flags": { - "isLet": true - }, - "sources": [ - { - "fileName": "implicit-types.ts", - "line": 3, - "character": 16 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 6, - "name": "__type", - "kind": 65536, - "kindString": "Type literal", - "flags": {}, - "children": [ - { - "id": 9, - "name": "large", - "kind": 32, - "kindString": "Variable", - "flags": {}, - "sources": [ - { - "fileName": "implicit-types.ts", - "line": 6, - "character": 9 - } - ], - "type": { - "type": "reference", - "name": "IBreakpointRange", - "id": 2 - } - }, - { - "id": 8, - "name": "medium", - "kind": 32, - "kindString": "Variable", - "flags": {}, - "sources": [ - { - "fileName": "implicit-types.ts", - "line": 5, - "character": 10 - } - ], - "type": { - "type": "reference", - "name": "IBreakpointRange", - "id": 2 - } - }, - { - "id": 7, - "name": "small", - "kind": 32, - "kindString": "Variable", - "flags": {}, - "sources": [ - { - "fileName": "implicit-types.ts", - "line": 4, - "character": 9 - } - ], - "type": { - "type": "reference", - "name": "IBreakpointRange", - "id": 2 - } - }, - { - "id": 10, - "name": "xlarge", - "kind": 32, - "kindString": "Variable", - "flags": {}, - "sources": [ - { - "fileName": "implicit-types.ts", - "line": 7, - "character": 10 - } - ], - "type": { - "type": "reference", - "name": "IBreakpointRange", - "id": 2 - } - }, - { - "id": 11, - "name": "xxlarge", - "kind": 32, - "kindString": "Variable", - "flags": {}, - "sources": [ - { - "fileName": "implicit-types.ts", - "line": 8, - "character": 11 - } - ], - "type": { - "type": "reference", - "name": "IBreakpointRange", - "id": 2 - } - } - ], - "groups": [ - { - "title": "Variables", - "kind": 32, - "children": [ - 9, - 8, - 7, - 10, - 11 - ] - } - ], - "sources": [ - { - "fileName": "implicit-types.ts", - "line": 3, - "character": 17 - } - ] - } - } - }, - { - "id": 12, - "name": "getBreakpoints", - "kind": 64, - "kindString": "Function", - "flags": { - "isExported": true - }, - "signatures": [ - { - "id": 13, - "name": "getBreakpoints", - "kind": 4096, - "kindString": "Call signature", - "flags": { - "isExported": true - }, - "type": { - "type": "reflection", - "declaration": { - "id": 14, - "name": "__type", - "kind": 65536, - "kindString": "Type literal", - "flags": { - "isExported": true - }, - "children": [ - { - "id": 17, - "name": "large", - "kind": 32, - "kindString": "Variable", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "implicit-types.ts", - "line": 6, - "character": 9 - } - ], - "type": { - "type": "reference", - "name": "IBreakpointRange", - "id": 2 - } - }, - { - "id": 16, - "name": "medium", - "kind": 32, - "kindString": "Variable", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "implicit-types.ts", - "line": 5, - "character": 10 - } - ], - "type": { - "type": "reference", - "name": "IBreakpointRange", - "id": 2 - } - }, - { - "id": 15, - "name": "small", - "kind": 32, - "kindString": "Variable", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "implicit-types.ts", - "line": 4, - "character": 9 - } - ], - "type": { - "type": "reference", - "name": "IBreakpointRange", - "id": 2 - } - }, - { - "id": 18, - "name": "xlarge", - "kind": 32, - "kindString": "Variable", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "implicit-types.ts", - "line": 7, - "character": 10 - } - ], - "type": { - "type": "reference", - "name": "IBreakpointRange", - "id": 2 - } - }, - { - "id": 19, - "name": "xxlarge", - "kind": 32, - "kindString": "Variable", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "implicit-types.ts", - "line": 8, - "character": 11 - } - ], - "type": { - "type": "reference", - "name": "IBreakpointRange", - "id": 2 - } - } - ], - "groups": [ - { - "title": "Variables", - "kind": 32, - "children": [ - 17, - 16, - 15, - 18, - 19 - ] - } - ] - } - } - } - ], - "sources": [ - { - "fileName": "implicit-types.ts", - "line": 11, - "character": 30 - } - ] - } - ], - "groups": [ - { - "title": "Interfaces", - "kind": 256, - "children": [ - 2 - ] - }, - { - "title": "Variables", - "kind": 32, - "children": [ - 5 - ] - }, - { - "title": "Functions", - "kind": 64, - "children": [ - 12 - ] - } - ], - "sources": [ - { - "fileName": "implicit-types.ts", - "line": 1, - "character": 0 - } - ] - } - ], - "groups": [ - { - "title": "External modules", - "kind": 1, - "children": [ - 1 - ] - } - ] -} \ No newline at end of file diff --git a/src/test/converter/interface-empty/specs.json b/src/test/converter/interface-empty/specs.json deleted file mode 100644 index d15f0db6b..000000000 --- a/src/test/converter/interface-empty/specs.json +++ /dev/null @@ -1,167 +0,0 @@ -{ - "id": 0, - "name": "typedoc", - "kind": 0, - "flags": {}, - "children": [ - { - "id": 1, - "name": "\"interface-empty\"", - "kind": 1, - "kindString": "External module", - "flags": { - "isExported": true - }, - "originalName": "%BASE%/interface-empty/interface-empty.ts", - "children": [ - { - "id": 3, - "name": "ClassImplementingEmptyInterface", - "kind": 128, - "kindString": "Class", - "flags": {}, - "comment": { - "shortText": "A class implementing an empty interface." - }, - "children": [ - { - "id": 4, - "name": "name", - "kind": 1024, - "kindString": "Property", - "flags": { - "isPrivate": true - }, - "sources": [ - { - "fileName": "interface-empty.ts", - "line": 11, - "character": 16 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 5, - "name": "goto", - "kind": 2048, - "kindString": "Method", - "flags": { - "isPublic": true - }, - "signatures": [ - { - "id": 6, - "name": "goto", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "void" - } - } - ], - "sources": [ - { - "fileName": "interface-empty.ts", - "line": 12, - "character": 15 - } - ] - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [ - 4 - ] - }, - { - "title": "Methods", - "kind": 2048, - "children": [ - 5 - ] - } - ], - "sources": [ - { - "fileName": "interface-empty.ts", - "line": 10, - "character": 37 - } - ], - "implementedTypes": [ - { - "type": "reference", - "name": "EmptyInterface", - "id": 2 - } - ] - }, - { - "id": 2, - "name": "EmptyInterface", - "kind": 256, - "kindString": "Interface", - "flags": {}, - "comment": { - "shortText": "An empty interface" - }, - "sources": [ - { - "fileName": "interface-empty.ts", - "line": 4, - "character": 24 - } - ], - "implementedBy": [ - { - "type": "reference", - "name": "ClassImplementingEmptyInterface", - "id": 3 - } - ] - } - ], - "groups": [ - { - "title": "Classes", - "kind": 128, - "children": [ - 3 - ] - }, - { - "title": "Interfaces", - "kind": 256, - "children": [ - 2 - ] - } - ], - "sources": [ - { - "fileName": "interface-empty.ts", - "line": 1, - "character": 0 - } - ] - } - ], - "groups": [ - { - "title": "External modules", - "kind": 1, - "children": [ - 1 - ] - } - ] -} \ No newline at end of file diff --git a/src/test/converter/interface/constructor-type.ts b/src/test/converter/interface/constructor-type.ts new file mode 100644 index 000000000..e01758ff7 --- /dev/null +++ b/src/test/converter/interface/constructor-type.ts @@ -0,0 +1,14 @@ +interface Constructor { + // No return type defined. Used the parent one. + new(x: string, y: string); + + // A return type is defined and is the same as the parent one. + new(x: string, y: string): Constructor; + + // A return type is defined and is not the same as the parent one. + new(x: string, y: string): Instance; +} + +interface Instance {} + +export {}; diff --git a/src/test/converter/interface-empty/interface-empty.ts b/src/test/converter/interface/interface-empty.ts similarity index 100% rename from src/test/converter/interface-empty/interface-empty.ts rename to src/test/converter/interface/interface-empty.ts diff --git a/src/test/converter/interface-implementation/interface-implementation.ts b/src/test/converter/interface/interface-implementation.ts similarity index 59% rename from src/test/converter/interface-implementation/interface-implementation.ts rename to src/test/converter/interface/interface-implementation.ts index 7f163c816..bd87f8d70 100644 --- a/src/test/converter/interface-implementation/interface-implementation.ts +++ b/src/test/converter/interface/interface-implementation.ts @@ -2,15 +2,15 @@ module Forms { /** * Function signature of an event listener callback */ - interface IEventListener { + interface EventListener { (parameter: T): any; } /** * Encapsulates a subscription to an event dispatcher, and allows for unsubscribing */ - interface ISubscription { - listener: IEventListener; + interface SubscriptionInt { + listener: EventListener; priority: number; filter: any; @@ -20,8 +20,8 @@ module Forms { unsubscribe(): void; } - class Subscription implements ISubscription { - constructor(public listener: IEventListener, public filter: any, public priority: number, public dispatcher: EventDispatcher) { } + class Subscription implements SubscriptionInt { + constructor(public listener: EventListener, public filter: any, public priority: number, public dispatcher: EventDispatcher) { } unsubscribe(): void { } } @@ -31,9 +31,9 @@ module Forms { * An IEventDispatcher is an object that keeps a list of listeners, and sends dispatches events of a certain type to them. * This might otherwise be known as a Signal. */ - export interface IEventDispatcher { - add(listener: IEventListener, filter?: any, priority?: number): ISubscription; - remove(subscription: ISubscription): void; + export interface EventDispatcherInt { + add(listener: EventListener, filter?: any, priority?: number): SubscriptionInt; + remove(subscription: SubscriptionInt): void; dispatch(parameter: U): boolean; clear(): void; hasListeners(): boolean; @@ -43,14 +43,14 @@ module Forms { * Implementation of IEventDispatcher * @see IEventDispatcher */ - export class EventDispatcher implements IEventDispatcher { - private subscriptions: ISubscription[]; + export class EventDispatcher implements EventDispatcherInt { + private subscriptions: SubscriptionInt[]; - add(listener: IEventListener, filter: any= null, priority: number = 0): ISubscription { + add(listener: EventListener, filter: any= null, priority: number = 0): SubscriptionInt { return new Subscription(listener, filter, priority, this); } - remove(subscription: ISubscription): void { } + remove(subscription: SubscriptionInt): void { } dispatch(event: T): boolean { return false; diff --git a/src/test/converter/interface-implementation/specs.json b/src/test/converter/interface/specs.json similarity index 70% rename from src/test/converter/interface-implementation/specs.json rename to src/test/converter/interface/specs.json index b53abf92b..61fb7191f 100644 --- a/src/test/converter/interface-implementation/specs.json +++ b/src/test/converter/interface/specs.json @@ -6,23 +6,375 @@ "children": [ { "id": 1, - "name": "\"interface-implementation\"", + "name": "\"constructor-type\"", "kind": 1, "kindString": "External module", "flags": { "isExported": true }, - "originalName": "%BASE%/interface-implementation/interface-implementation.ts", + "originalName": "%BASE%/interface/constructor-type.ts", "children": [ { "id": 2, + "name": "Constructor", + "kind": 256, + "kindString": "Interface", + "flags": {}, + "children": [ + { + "id": 3, + "name": "constructor", + "kind": 512, + "kindString": "Constructor", + "flags": {}, + "signatures": [ + { + "id": 4, + "name": "new Constructor", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "parameters": [ + { + "id": 5, + "name": "x", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 6, + "name": "y", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "id": 2, + "name": "Constructor" + } + }, + { + "id": 7, + "name": "new Constructor", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "parameters": [ + { + "id": 8, + "name": "x", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 9, + "name": "y", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "id": 2, + "name": "Constructor" + } + }, + { + "id": 10, + "name": "new Constructor", + "kind": 16384, + "kindString": "Constructor signature", + "flags": {}, + "parameters": [ + { + "id": 11, + "name": "x", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 12, + "name": "y", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reference", + "id": 13, + "name": "Instance" + } + } + ], + "sources": [ + { + "fileName": "constructor-type.ts", + "line": 1, + "character": 23 + }, + { + "fileName": "constructor-type.ts", + "line": 3, + "character": 30 + }, + { + "fileName": "constructor-type.ts", + "line": 6, + "character": 43 + } + ] + } + ], + "groups": [ + { + "title": "Constructors", + "kind": 512, + "children": [ + 3 + ] + } + ], + "sources": [ + { + "fileName": "constructor-type.ts", + "line": 1, + "character": 21 + } + ] + }, + { + "id": 13, + "name": "Instance", + "kind": 256, + "kindString": "Interface", + "flags": {}, + "sources": [ + { + "fileName": "constructor-type.ts", + "line": 12, + "character": 18 + } + ] + } + ], + "groups": [ + { + "title": "Interfaces", + "kind": 256, + "children": [ + 2, + 13 + ] + } + ], + "sources": [ + { + "fileName": "constructor-type.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 14, + "name": "\"interface-empty\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/interface/interface-empty.ts", + "children": [ + { + "id": 16, + "name": "ClassImplementingEmptyInterface", + "kind": 128, + "kindString": "Class", + "flags": {}, + "comment": { + "shortText": "A class implementing an empty interface." + }, + "children": [ + { + "id": 17, + "name": "name", + "kind": 1024, + "kindString": "Property", + "flags": { + "isPrivate": true + }, + "sources": [ + { + "fileName": "interface-empty.ts", + "line": 11, + "character": 16 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 18, + "name": "goto", + "kind": 2048, + "kindString": "Method", + "flags": { + "isPublic": true + }, + "signatures": [ + { + "id": 19, + "name": "goto", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "interface-empty.ts", + "line": 12, + "character": 15 + } + ] + } + ], + "groups": [ + { + "title": "Properties", + "kind": 1024, + "children": [ + 17 + ] + }, + { + "title": "Methods", + "kind": 2048, + "children": [ + 18 + ] + } + ], + "sources": [ + { + "fileName": "interface-empty.ts", + "line": 10, + "character": 37 + } + ], + "implementedTypes": [ + { + "type": "reference", + "id": 15, + "name": "EmptyInterface" + } + ] + }, + { + "id": 15, + "name": "EmptyInterface", + "kind": 256, + "kindString": "Interface", + "flags": {}, + "comment": { + "shortText": "An empty interface" + }, + "sources": [ + { + "fileName": "interface-empty.ts", + "line": 4, + "character": 24 + } + ], + "implementedBy": [ + { + "type": "reference", + "id": 16, + "name": "ClassImplementingEmptyInterface" + } + ] + } + ], + "groups": [ + { + "title": "Classes", + "kind": 128, + "children": [ + 16 + ] + }, + { + "title": "Interfaces", + "kind": 256, + "children": [ + 15 + ] + } + ], + "sources": [ + { + "fileName": "interface-empty.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 20, + "name": "\"interface-implementation\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/interface/interface-implementation.ts", + "children": [ + { + "id": 21, "name": "Forms", "kind": 2, "kindString": "Module", "flags": {}, "children": [ { - "id": 45, + "id": 64, "name": "EventDispatcher", "kind": 128, "kindString": "Class", @@ -40,7 +392,7 @@ }, "typeParameter": [ { - "id": 46, + "id": 65, "name": "T", "kind": 131072, "kindString": "Type parameter", @@ -51,7 +403,7 @@ ], "children": [ { - "id": 47, + "id": 66, "name": "subscriptions", "kind": 1024, "kindString": "Property", @@ -70,19 +422,19 @@ "type": "array", "elementType": { "type": "reference", - "name": "ISubscription", - "id": 7, + "id": 26, "typeArguments": [ { "type": "typeParameter", "name": "T" } - ] + ], + "name": "SubscriptionInt" } } }, { - "id": 48, + "id": 67, "name": "add", "kind": 2048, "kindString": "Method", @@ -91,7 +443,7 @@ }, "signatures": [ { - "id": 49, + "id": 68, "name": "add", "kind": 4096, "kindString": "Call signature", @@ -100,7 +452,7 @@ }, "parameters": [ { - "id": 50, + "id": 69, "name": "listener", "kind": 32768, "kindString": "Parameter", @@ -109,18 +461,18 @@ }, "type": { "type": "reference", - "name": "IEventListener", - "id": 3, + "id": 22, "typeArguments": [ { "type": "typeParameter", "name": "T" } - ] + ], + "name": "EventListener" } }, { - "id": 51, + "id": 70, "name": "filter", "kind": 32768, "kindString": "Parameter", @@ -134,7 +486,7 @@ "defaultValue": "null" }, { - "id": 52, + "id": 71, "name": "priority", "kind": 32768, "kindString": "Parameter", @@ -150,19 +502,19 @@ ], "type": { "type": "reference", - "name": "ISubscription", - "id": 7, + "id": 26, "typeArguments": [ { "type": "typeParameter", "name": "T" } - ] + ], + "name": "SubscriptionInt" }, "implementationOf": { "type": "reference", - "name": "IEventDispatcher.add", - "id": 31 + "id": 50, + "name": "EventDispatcherInt.add" } } ], @@ -175,12 +527,12 @@ ], "implementationOf": { "type": "reference", - "name": "IEventDispatcher.add", - "id": 30 + "id": 49, + "name": "EventDispatcherInt.add" } }, { - "id": 59, + "id": 78, "name": "clear", "kind": 2048, "kindString": "Method", @@ -189,7 +541,7 @@ }, "signatures": [ { - "id": 60, + "id": 79, "name": "clear", "kind": 4096, "kindString": "Call signature", @@ -202,8 +554,8 @@ }, "implementationOf": { "type": "reference", - "name": "IEventDispatcher.clear", - "id": 42 + "id": 61, + "name": "EventDispatcherInt.clear" } } ], @@ -216,12 +568,12 @@ ], "implementationOf": { "type": "reference", - "name": "IEventDispatcher.clear", - "id": 41 + "id": 60, + "name": "EventDispatcherInt.clear" } }, { - "id": 56, + "id": 75, "name": "dispatch", "kind": 2048, "kindString": "Method", @@ -230,7 +582,7 @@ }, "signatures": [ { - "id": 57, + "id": 76, "name": "dispatch", "kind": 4096, "kindString": "Call signature", @@ -239,7 +591,7 @@ }, "parameters": [ { - "id": 58, + "id": 77, "name": "event", "kind": 32768, "kindString": "Parameter", @@ -258,8 +610,8 @@ }, "implementationOf": { "type": "reference", - "name": "IEventDispatcher.dispatch", - "id": 39 + "id": 58, + "name": "EventDispatcherInt.dispatch" } } ], @@ -272,12 +624,12 @@ ], "implementationOf": { "type": "reference", - "name": "IEventDispatcher.dispatch", - "id": 38 + "id": 57, + "name": "EventDispatcherInt.dispatch" } }, { - "id": 61, + "id": 80, "name": "hasListeners", "kind": 2048, "kindString": "Method", @@ -286,7 +638,7 @@ }, "signatures": [ { - "id": 62, + "id": 81, "name": "hasListeners", "kind": 4096, "kindString": "Call signature", @@ -299,8 +651,8 @@ }, "implementationOf": { "type": "reference", - "name": "IEventDispatcher.hasListeners", - "id": 44 + "id": 63, + "name": "EventDispatcherInt.hasListeners" } } ], @@ -313,12 +665,12 @@ ], "implementationOf": { "type": "reference", - "name": "IEventDispatcher.hasListeners", - "id": 43 + "id": 62, + "name": "EventDispatcherInt.hasListeners" } }, { - "id": 53, + "id": 72, "name": "remove", "kind": 2048, "kindString": "Method", @@ -327,7 +679,7 @@ }, "signatures": [ { - "id": 54, + "id": 73, "name": "remove", "kind": 4096, "kindString": "Call signature", @@ -336,7 +688,7 @@ }, "parameters": [ { - "id": 55, + "id": 74, "name": "subscription", "kind": 32768, "kindString": "Parameter", @@ -345,14 +697,14 @@ }, "type": { "type": "reference", - "name": "ISubscription", - "id": 7, + "id": 26, "typeArguments": [ { "type": "typeParameter", "name": "T" } - ] + ], + "name": "SubscriptionInt" } } ], @@ -362,8 +714,8 @@ }, "implementationOf": { "type": "reference", - "name": "IEventDispatcher.remove", - "id": 36 + "id": 55, + "name": "EventDispatcherInt.remove" } } ], @@ -376,8 +728,8 @@ ], "implementationOf": { "type": "reference", - "name": "IEventDispatcher.remove", - "id": 35 + "id": 54, + "name": "EventDispatcherInt.remove" } } ], @@ -386,18 +738,18 @@ "title": "Properties", "kind": 1024, "children": [ - 47 + 66 ] }, { "title": "Methods", "kind": 2048, "children": [ - 48, - 59, - 56, - 61, - 53 + 67, + 78, + 75, + 80, + 72 ] } ], @@ -411,26 +763,26 @@ "implementedTypes": [ { "type": "reference", - "name": "IEventDispatcher", - "id": 28, + "id": 47, "typeArguments": [ { "type": "typeParameter", "name": "T" } - ] + ], + "name": "EventDispatcherInt" } ] }, { - "id": 14, + "id": 33, "name": "Subscription", "kind": 128, "kindString": "Class", "flags": {}, "typeParameter": [ { - "id": 15, + "id": 34, "name": "V", "kind": 131072, "kindString": "Type parameter", @@ -439,39 +791,39 @@ ], "children": [ { - "id": 16, + "id": 35, "name": "constructor", "kind": 512, "kindString": "Constructor", "flags": {}, "signatures": [ { - "id": 21, + "id": 40, "name": "new Subscription", "kind": 16384, "kindString": "Constructor signature", "flags": {}, "parameters": [ { - "id": 22, + "id": 41, "name": "listener", "kind": 32768, "kindString": "Parameter", "flags": {}, "type": { "type": "reference", - "name": "IEventListener", - "id": 3, + "id": 22, "typeArguments": [ { "type": "typeParameter", "name": "V" } - ] + ], + "name": "EventListener" } }, { - "id": 23, + "id": 42, "name": "filter", "kind": 32768, "kindString": "Parameter", @@ -482,7 +834,7 @@ } }, { - "id": 24, + "id": 43, "name": "priority", "kind": 32768, "kindString": "Parameter", @@ -493,28 +845,28 @@ } }, { - "id": 25, + "id": 44, "name": "dispatcher", "kind": 32768, "kindString": "Parameter", "flags": {}, "type": { "type": "reference", - "name": "EventDispatcher", - "id": 45, + "id": 64, "typeArguments": [ { "type": "typeParameter", "name": "V" } - ] + ], + "name": "EventDispatcher" } } ], "type": { "type": "reference", - "name": "Subscription", - "id": 14 + "id": 33, + "name": "Subscription" } } ], @@ -522,12 +874,12 @@ { "fileName": "interface-implementation.ts", "line": 23, - "character": 55 + "character": 57 } ] }, { - "id": 20, + "id": 39, "name": "dispatcher", "kind": 1024, "kindString": "Property", @@ -539,23 +891,23 @@ { "fileName": "interface-implementation.ts", "line": 24, - "character": 118 + "character": 117 } ], "type": { "type": "reference", - "name": "EventDispatcher", - "id": 45, + "id": 64, "typeArguments": [ { "type": "typeParameter", "name": "V" } - ] + ], + "name": "EventDispatcher" } }, { - "id": 18, + "id": 37, "name": "filter", "kind": 1024, "kindString": "Property", @@ -567,7 +919,7 @@ { "fileName": "interface-implementation.ts", "line": 24, - "character": 69 + "character": 68 } ], "type": { @@ -576,12 +928,12 @@ }, "implementationOf": { "type": "reference", - "name": "ISubscription.filter", - "id": 11 + "id": 30, + "name": "SubscriptionInt.filter" } }, { - "id": 17, + "id": 36, "name": "listener", "kind": 1024, "kindString": "Property", @@ -598,23 +950,23 @@ ], "type": { "type": "reference", - "name": "IEventListener", - "id": 3, + "id": 22, "typeArguments": [ { "type": "typeParameter", "name": "V" } - ] + ], + "name": "EventListener" }, "implementationOf": { "type": "reference", - "name": "ISubscription.listener", - "id": 9 + "id": 28, + "name": "SubscriptionInt.listener" } }, { - "id": 19, + "id": 38, "name": "priority", "kind": 1024, "kindString": "Property", @@ -626,7 +978,7 @@ { "fileName": "interface-implementation.ts", "line": 24, - "character": 91 + "character": 90 } ], "type": { @@ -635,19 +987,19 @@ }, "implementationOf": { "type": "reference", - "name": "ISubscription.priority", - "id": 10 + "id": 29, + "name": "SubscriptionInt.priority" } }, { - "id": 26, + "id": 45, "name": "unsubscribe", "kind": 2048, "kindString": "Method", "flags": {}, "signatures": [ { - "id": 27, + "id": 46, "name": "unsubscribe", "kind": 4096, "kindString": "Call signature", @@ -658,8 +1010,8 @@ }, "implementationOf": { "type": "reference", - "name": "ISubscription.unsubscribe", - "id": 13 + "id": 32, + "name": "SubscriptionInt.unsubscribe" } } ], @@ -672,8 +1024,8 @@ ], "implementationOf": { "type": "reference", - "name": "ISubscription.unsubscribe", - "id": 12 + "id": 31, + "name": "SubscriptionInt.unsubscribe" } } ], @@ -682,24 +1034,24 @@ "title": "Constructors", "kind": 512, "children": [ - 16 + 35 ] }, { "title": "Properties", "kind": 1024, "children": [ - 20, - 18, - 17, - 19 + 39, + 37, + 36, + 38 ] }, { "title": "Methods", "kind": 2048, "children": [ - 26 + 45 ] } ], @@ -713,20 +1065,20 @@ "implementedTypes": [ { "type": "reference", - "name": "ISubscription", - "id": 7, + "id": 26, "typeArguments": [ { "type": "typeParameter", "name": "V" } - ] + ], + "name": "SubscriptionInt" } ] }, { - "id": 28, - "name": "IEventDispatcher", + "id": 47, + "name": "EventDispatcherInt", "kind": 256, "kindString": "Interface", "flags": { @@ -737,7 +1089,7 @@ }, "typeParameter": [ { - "id": 29, + "id": 48, "name": "U", "kind": 131072, "kindString": "Type parameter", @@ -748,7 +1100,7 @@ ], "children": [ { - "id": 30, + "id": 49, "name": "add", "kind": 2048, "kindString": "Method", @@ -757,7 +1109,7 @@ }, "signatures": [ { - "id": 31, + "id": 50, "name": "add", "kind": 4096, "kindString": "Call signature", @@ -766,7 +1118,7 @@ }, "parameters": [ { - "id": 32, + "id": 51, "name": "listener", "kind": 32768, "kindString": "Parameter", @@ -775,18 +1127,18 @@ }, "type": { "type": "reference", - "name": "IEventListener", - "id": 3, + "id": 22, "typeArguments": [ { "type": "typeParameter", "name": "U" } - ] + ], + "name": "EventListener" } }, { - "id": 33, + "id": 52, "name": "filter", "kind": 32768, "kindString": "Parameter", @@ -800,7 +1152,7 @@ } }, { - "id": 34, + "id": 53, "name": "priority", "kind": 32768, "kindString": "Parameter", @@ -816,14 +1168,14 @@ ], "type": { "type": "reference", - "name": "ISubscription", - "id": 7, + "id": 26, "typeArguments": [ { "type": "typeParameter", "name": "U" } - ] + ], + "name": "SubscriptionInt" } } ], @@ -836,7 +1188,7 @@ ] }, { - "id": 41, + "id": 60, "name": "clear", "kind": 2048, "kindString": "Method", @@ -845,7 +1197,7 @@ }, "signatures": [ { - "id": 42, + "id": 61, "name": "clear", "kind": 4096, "kindString": "Call signature", @@ -867,7 +1219,7 @@ ] }, { - "id": 38, + "id": 57, "name": "dispatch", "kind": 2048, "kindString": "Method", @@ -876,7 +1228,7 @@ }, "signatures": [ { - "id": 39, + "id": 58, "name": "dispatch", "kind": 4096, "kindString": "Call signature", @@ -885,7 +1237,7 @@ }, "parameters": [ { - "id": 40, + "id": 59, "name": "parameter", "kind": 32768, "kindString": "Parameter", @@ -913,7 +1265,7 @@ ] }, { - "id": 43, + "id": 62, "name": "hasListeners", "kind": 2048, "kindString": "Method", @@ -922,7 +1274,7 @@ }, "signatures": [ { - "id": 44, + "id": 63, "name": "hasListeners", "kind": 4096, "kindString": "Call signature", @@ -944,7 +1296,7 @@ ] }, { - "id": 35, + "id": 54, "name": "remove", "kind": 2048, "kindString": "Method", @@ -953,7 +1305,7 @@ }, "signatures": [ { - "id": 36, + "id": 55, "name": "remove", "kind": 4096, "kindString": "Call signature", @@ -962,7 +1314,7 @@ }, "parameters": [ { - "id": 37, + "id": 56, "name": "subscription", "kind": 32768, "kindString": "Parameter", @@ -971,14 +1323,14 @@ }, "type": { "type": "reference", - "name": "ISubscription", - "id": 7, + "id": 26, "typeArguments": [ { "type": "typeParameter", "name": "U" } - ] + ], + "name": "SubscriptionInt" } } ], @@ -1002,11 +1354,11 @@ "title": "Methods", "kind": 2048, "children": [ - 30, - 41, - 38, - 43, - 35 + 49, + 60, + 57, + 62, + 54 ] } ], @@ -1014,20 +1366,20 @@ { "fileName": "interface-implementation.ts", "line": 34, - "character": 37 + "character": 39 } ], "implementedBy": [ { "type": "reference", - "name": "EventDispatcher", - "id": 45 + "id": 64, + "name": "EventDispatcher" } ] }, { - "id": 3, - "name": "IEventListener", + "id": 22, + "name": "EventListener", "kind": 256, "kindString": "Interface", "flags": {}, @@ -1036,7 +1388,7 @@ }, "typeParameter": [ { - "id": 4, + "id": 23, "name": "T", "kind": 131072, "kindString": "Type parameter", @@ -1045,7 +1397,7 @@ ], "signatures": [ { - "id": 5, + "id": 24, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -1055,7 +1407,7 @@ }, "parameters": [ { - "id": 6, + "id": 25, "name": "parameter", "kind": 32768, "kindString": "Parameter", @@ -1076,13 +1428,13 @@ { "fileName": "interface-implementation.ts", "line": 5, - "character": 28 + "character": 27 } ] }, { - "id": 7, - "name": "ISubscription", + "id": 26, + "name": "SubscriptionInt", "kind": 256, "kindString": "Interface", "flags": {}, @@ -1091,7 +1443,7 @@ }, "typeParameter": [ { - "id": 8, + "id": 27, "name": "T", "kind": 131072, "kindString": "Type parameter", @@ -1100,7 +1452,7 @@ ], "children": [ { - "id": 11, + "id": 30, "name": "filter", "kind": 1024, "kindString": "Property", @@ -1118,7 +1470,7 @@ } }, { - "id": 9, + "id": 28, "name": "listener", "kind": 1024, "kindString": "Property", @@ -1132,18 +1484,18 @@ ], "type": { "type": "reference", - "name": "IEventListener", - "id": 3, + "id": 22, "typeArguments": [ { "type": "typeParameter", "name": "T" } - ] + ], + "name": "EventListener" } }, { - "id": 10, + "id": 29, "name": "priority", "kind": 1024, "kindString": "Property", @@ -1161,14 +1513,14 @@ } }, { - "id": 12, + "id": 31, "name": "unsubscribe", "kind": 2048, "kindString": "Method", "flags": {}, "signatures": [ { - "id": 13, + "id": 32, "name": "unsubscribe", "kind": 4096, "kindString": "Call signature", @@ -1196,16 +1548,16 @@ "title": "Properties", "kind": 1024, "children": [ - 11, - 9, - 10 + 30, + 28, + 29 ] }, { "title": "Methods", "kind": 2048, "children": [ - 12 + 31 ] } ], @@ -1213,14 +1565,14 @@ { "fileName": "interface-implementation.ts", "line": 12, - "character": 27 + "character": 29 } ], "implementedBy": [ { "type": "reference", - "name": "Subscription", - "id": 14 + "id": 33, + "name": "Subscription" } ] } @@ -1230,17 +1582,17 @@ "title": "Classes", "kind": 128, "children": [ - 45, - 14 + 64, + 33 ] }, { "title": "Interfaces", "kind": 256, "children": [ - 28, - 3, - 7 + 47, + 22, + 26 ] } ], @@ -1258,7 +1610,7 @@ "title": "Modules", "kind": 2, "children": [ - 2 + 21 ] } ], @@ -1276,7 +1628,9 @@ "title": "External modules", "kind": 1, "children": [ - 1 + 1, + 14, + 20 ] } ] diff --git a/src/test/converter/literal-object-callbacks/literal-object-callbacks.ts b/src/test/converter/literal-object-callbacks/literal-object-callbacks.ts deleted file mode 100644 index 4a6823301..000000000 --- a/src/test/converter/literal-object-callbacks/literal-object-callbacks.ts +++ /dev/null @@ -1,20 +0,0 @@ -let onSuccess: any = function () { }; -let onError: any = function () { }; -let onFinally: any = function () { }; - -const callbackReturn = { - success: (success_callback: () => any) => { - onSuccess = success_callback; - return callbackReturn; - }, - error: (error_callback: () => any) => { - onError = error_callback; - return callbackReturn; - }, - finally: (finally_callback: () => any) => { - onFinally = finally_callback; - return callbackReturn; - } -}; - -export {}; diff --git a/src/test/converter/literal-object-callbacks/specs.json b/src/test/converter/literal-object-callbacks/specs.json deleted file mode 100644 index 4bc558c24..000000000 --- a/src/test/converter/literal-object-callbacks/specs.json +++ /dev/null @@ -1,375 +0,0 @@ -{ - "id": 0, - "name": "typedoc", - "kind": 0, - "flags": {}, - "children": [ - { - "id": 1, - "name": "\"literal-object-callbacks\"", - "kind": 1, - "kindString": "External module", - "flags": { - "isExported": true - }, - "originalName": "%BASE%/literal-object-callbacks/literal-object-callbacks.ts", - "children": [ - { - "id": 4, - "name": "onError", - "kind": 64, - "kindString": "Function", - "flags": { - "isLet": true - }, - "signatures": [ - { - "id": 5, - "name": "onError", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "void" - } - } - ], - "sources": [ - { - "fileName": "literal-object-callbacks.ts", - "line": 2, - "character": 11 - } - ] - }, - { - "id": 6, - "name": "onFinally", - "kind": 64, - "kindString": "Function", - "flags": { - "isLet": true - }, - "signatures": [ - { - "id": 7, - "name": "onFinally", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "void" - } - } - ], - "sources": [ - { - "fileName": "literal-object-callbacks.ts", - "line": 3, - "character": 13 - } - ] - }, - { - "id": 2, - "name": "onSuccess", - "kind": 64, - "kindString": "Function", - "flags": { - "isLet": true - }, - "signatures": [ - { - "id": 3, - "name": "onSuccess", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "void" - } - } - ], - "sources": [ - { - "fileName": "literal-object-callbacks.ts", - "line": 1, - "character": 13 - } - ] - }, - { - "id": 8, - "name": "callbackReturn", - "kind": 2097152, - "kindString": "Object literal", - "flags": { - "isConst": true - }, - "children": [ - { - "id": 14, - "name": "error", - "kind": 64, - "kindString": "Function", - "flags": {}, - "signatures": [ - { - "id": 15, - "name": "error", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 16, - "name": "error_callback", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "reflection", - "declaration": { - "id": 17, - "name": "__type", - "kind": 65536, - "kindString": "Type literal", - "flags": {}, - "signatures": [ - { - "id": 18, - "name": "__call", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "any" - } - } - ], - "sources": [ - { - "fileName": "literal-object-callbacks.ts", - "line": 10, - "character": 27 - } - ] - } - } - } - ], - "type": { - "type": "reference", - "name": "callbackReturn", - "id": 8 - } - } - ], - "sources": [ - { - "fileName": "literal-object-callbacks.ts", - "line": 10, - "character": 9 - } - ] - }, - { - "id": 19, - "name": "finally", - "kind": 64, - "kindString": "Function", - "flags": {}, - "signatures": [ - { - "id": 20, - "name": "finally", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 21, - "name": "finally_callback", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "reflection", - "declaration": { - "id": 22, - "name": "__type", - "kind": 65536, - "kindString": "Type literal", - "flags": {}, - "signatures": [ - { - "id": 23, - "name": "__call", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "any" - } - } - ], - "sources": [ - { - "fileName": "literal-object-callbacks.ts", - "line": 14, - "character": 31 - } - ] - } - } - } - ], - "type": { - "type": "reference", - "name": "callbackReturn", - "id": 8 - } - } - ], - "sources": [ - { - "fileName": "literal-object-callbacks.ts", - "line": 14, - "character": 11 - } - ] - }, - { - "id": 9, - "name": "success", - "kind": 64, - "kindString": "Function", - "flags": {}, - "signatures": [ - { - "id": 10, - "name": "success", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 11, - "name": "success_callback", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "reflection", - "declaration": { - "id": 12, - "name": "__type", - "kind": 65536, - "kindString": "Type literal", - "flags": {}, - "signatures": [ - { - "id": 13, - "name": "__call", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "any" - } - } - ], - "sources": [ - { - "fileName": "literal-object-callbacks.ts", - "line": 6, - "character": 31 - } - ] - } - } - } - ], - "type": { - "type": "reference", - "name": "callbackReturn", - "id": 8 - } - } - ], - "sources": [ - { - "fileName": "literal-object-callbacks.ts", - "line": 6, - "character": 11 - } - ] - } - ], - "groups": [ - { - "title": "Functions", - "kind": 64, - "children": [ - 14, - 19, - 9 - ] - } - ], - "sources": [ - { - "fileName": "literal-object-callbacks.ts", - "line": 5, - "character": 20 - } - ], - "type": { - "type": "intrinsic", - "name": "object" - } - } - ], - "groups": [ - { - "title": "Functions", - "kind": 64, - "children": [ - 4, - 6, - 2 - ] - }, - { - "title": "Object literals", - "kind": 2097152, - "children": [ - 8 - ] - } - ], - "sources": [ - { - "fileName": "literal-object-callbacks.ts", - "line": 1, - "character": 0 - } - ] - } - ], - "groups": [ - { - "title": "External modules", - "kind": 1, - "children": [ - 1 - ] - } - ] -} \ No newline at end of file diff --git a/src/test/converter/literal-object/literal-object.ts b/src/test/converter/literal-object/literal-object.ts deleted file mode 100644 index 84f181620..000000000 --- a/src/test/converter/literal-object/literal-object.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * An object literal. - */ -const objectLiteral = { - valueZ: 'foo', - valueY: function() { return 'foo'; }, - valueX: { - valueZ: 'foo', - valueY: (z: string) => { return {a: 'test', b: z}; }, - valueA: [100, 200, 300] - }, - valueA: 100, - valueB: true -}; - -export { objectLiteral }; diff --git a/src/test/converter/literal-object/specs.json b/src/test/converter/literal-object/specs.json deleted file mode 100644 index 17bf7f02a..000000000 --- a/src/test/converter/literal-object/specs.json +++ /dev/null @@ -1,382 +0,0 @@ -{ - "id": 0, - "name": "typedoc", - "kind": 0, - "flags": {}, - "children": [ - { - "id": 1, - "name": "\"literal-object\"", - "kind": 1, - "kindString": "External module", - "flags": { - "isExported": true - }, - "originalName": "%BASE%/literal-object/literal-object.ts", - "children": [ - { - "id": 2, - "name": "objectLiteral", - "kind": 2097152, - "kindString": "Object literal", - "flags": { - "isExported": true, - "isConst": true - }, - "comment": { - "shortText": "An object literal." - }, - "children": [ - { - "id": 15, - "name": "valueA", - "kind": 32, - "kindString": "Variable", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "literal-object.ts", - "line": 12, - "character": 10 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "100" - }, - { - "id": 16, - "name": "valueB", - "kind": 32, - "kindString": "Variable", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "literal-object.ts", - "line": 13, - "character": 10 - } - ], - "type": { - "type": "intrinsic", - "name": "boolean" - }, - "defaultValue": "true" - }, - { - "id": 3, - "name": "valueZ", - "kind": 32, - "kindString": "Variable", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "literal-object.ts", - "line": 5, - "character": 10 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - }, - "defaultValue": "\"foo\"" - }, - { - "id": 4, - "name": "valueY", - "kind": 64, - "kindString": "Function", - "flags": { - "isExported": true - }, - "signatures": [ - { - "id": 5, - "name": "valueY", - "kind": 4096, - "kindString": "Call signature", - "flags": { - "isExported": true - }, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "sources": [ - { - "fileName": "literal-object.ts", - "line": 6, - "character": 10 - } - ] - }, - { - "id": 6, - "name": "valueX", - "kind": 2097152, - "kindString": "Object literal", - "flags": { - "isExported": true - }, - "children": [ - { - "id": 14, - "name": "valueA", - "kind": 32, - "kindString": "Variable", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "literal-object.ts", - "line": 10, - "character": 14 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "number" - } - }, - "defaultValue": "[100, 200, 300]" - }, - { - "id": 7, - "name": "valueZ", - "kind": 32, - "kindString": "Variable", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "literal-object.ts", - "line": 8, - "character": 14 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - }, - "defaultValue": "\"foo\"" - }, - { - "id": 8, - "name": "valueY", - "kind": 64, - "kindString": "Function", - "flags": { - "isExported": true - }, - "signatures": [ - { - "id": 9, - "name": "valueY", - "kind": 4096, - "kindString": "Call signature", - "flags": { - "isExported": true - }, - "parameters": [ - { - "id": 10, - "name": "z", - "kind": 32768, - "kindString": "Parameter", - "flags": { - "isExported": true - }, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 11, - "name": "__type", - "kind": 65536, - "kindString": "Type literal", - "flags": { - "isExported": true - }, - "children": [ - { - "id": 12, - "name": "a", - "kind": 32, - "kindString": "Variable", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "literal-object.ts", - "line": 9, - "character": 42 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - }, - "defaultValue": "\"test\"" - }, - { - "id": 13, - "name": "b", - "kind": 32, - "kindString": "Variable", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "literal-object.ts", - "line": 9, - "character": 53 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - }, - "defaultValue": "z" - } - ], - "groups": [ - { - "title": "Variables", - "kind": 32, - "children": [ - 12, - 13 - ] - } - ] - } - } - } - ], - "sources": [ - { - "fileName": "literal-object.ts", - "line": 9, - "character": 14 - } - ] - } - ], - "groups": [ - { - "title": "Variables", - "kind": 32, - "children": [ - 14, - 7 - ] - }, - { - "title": "Functions", - "kind": 64, - "children": [ - 8 - ] - } - ], - "sources": [ - { - "fileName": "literal-object.ts", - "line": 7, - "character": 10 - } - ], - "type": { - "type": "intrinsic", - "name": "object" - } - } - ], - "groups": [ - { - "title": "Variables", - "kind": 32, - "children": [ - 15, - 16, - 3 - ] - }, - { - "title": "Functions", - "kind": 64, - "children": [ - 4 - ] - }, - { - "title": "Object literals", - "kind": 2097152, - "children": [ - 6 - ] - } - ], - "sources": [ - { - "fileName": "literal-object.ts", - "line": 4, - "character": 19 - } - ], - "type": { - "type": "intrinsic", - "name": "object" - } - } - ], - "groups": [ - { - "title": "Object literals", - "kind": 2097152, - "children": [ - 2 - ] - } - ], - "sources": [ - { - "fileName": "literal-object.ts", - "line": 1, - "character": 0 - } - ] - } - ], - "groups": [ - { - "title": "External modules", - "kind": 1, - "children": [ - 1 - ] - } - ] -} \ No newline at end of file diff --git a/src/test/converter/literal-type/literal-type.ts b/src/test/converter/literal-type/literal-type.ts deleted file mode 100644 index 147c744cf..000000000 --- a/src/test/converter/literal-type/literal-type.ts +++ /dev/null @@ -1,13 +0,0 @@ -let typeLiteral: { - valueZ: string; - valueY: {(): string; }; - valueX: { - valueZ: string; - valueY: {(z: string): {a: string; b: string}; }; - valueA: number[]; - }; - valueA?: number; - valueB?: boolean; -}; - -export {}; diff --git a/src/test/converter/literal-type/specs.json b/src/test/converter/literal-type/specs.json deleted file mode 100644 index 04a55104a..000000000 --- a/src/test/converter/literal-type/specs.json +++ /dev/null @@ -1,396 +0,0 @@ -{ - "id": 0, - "name": "typedoc", - "kind": 0, - "flags": {}, - "children": [ - { - "id": 1, - "name": "\"literal-type\"", - "kind": 1, - "kindString": "External module", - "flags": { - "isExported": true - }, - "originalName": "%BASE%/literal-type/literal-type.ts", - "children": [ - { - "id": 2, - "name": "typeLiteral", - "kind": 32, - "kindString": "Variable", - "flags": { - "isLet": true - }, - "sources": [ - { - "fileName": "literal-type.ts", - "line": 1, - "character": 15 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 3, - "name": "__type", - "kind": 65536, - "kindString": "Type literal", - "flags": {}, - "children": [ - { - "id": 19, - "name": "valueA", - "kind": 32, - "kindString": "Variable", - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "literal-type.ts", - "line": 9, - "character": 10 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 20, - "name": "valueB", - "kind": 32, - "kindString": "Variable", - "flags": { - "isOptional": true - }, - "sources": [ - { - "fileName": "literal-type.ts", - "line": 10, - "character": 10 - } - ], - "type": { - "type": "intrinsic", - "name": "boolean" - } - }, - { - "id": 8, - "name": "valueX", - "kind": 32, - "kindString": "Variable", - "flags": {}, - "sources": [ - { - "fileName": "literal-type.ts", - "line": 4, - "character": 10 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 9, - "name": "__type", - "kind": 65536, - "kindString": "Type literal", - "flags": {}, - "children": [ - { - "id": 18, - "name": "valueA", - "kind": 32, - "kindString": "Variable", - "flags": {}, - "sources": [ - { - "fileName": "literal-type.ts", - "line": 7, - "character": 14 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "number" - } - } - }, - { - "id": 11, - "name": "valueY", - "kind": 32, - "kindString": "Variable", - "flags": {}, - "sources": [ - { - "fileName": "literal-type.ts", - "line": 6, - "character": 14 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 12, - "name": "__type", - "kind": 65536, - "kindString": "Type literal", - "flags": {}, - "signatures": [ - { - "id": 13, - "name": "__call", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 14, - "name": "z", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 15, - "name": "__type", - "kind": 65536, - "kindString": "Type literal", - "flags": {}, - "children": [ - { - "id": 16, - "name": "a", - "kind": 32, - "kindString": "Variable", - "flags": {}, - "sources": [ - { - "fileName": "literal-type.ts", - "line": 6, - "character": 32 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 17, - "name": "b", - "kind": 32, - "kindString": "Variable", - "flags": {}, - "sources": [ - { - "fileName": "literal-type.ts", - "line": 6, - "character": 43 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "groups": [ - { - "title": "Variables", - "kind": 32, - "children": [ - 16, - 17 - ] - } - ], - "sources": [ - { - "fileName": "literal-type.ts", - "line": 6, - "character": 29 - } - ] - } - } - } - ], - "sources": [ - { - "fileName": "literal-type.ts", - "line": 6, - "character": 15 - } - ] - } - } - }, - { - "id": 10, - "name": "valueZ", - "kind": 32, - "kindString": "Variable", - "flags": {}, - "sources": [ - { - "fileName": "literal-type.ts", - "line": 5, - "character": 14 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "groups": [ - { - "title": "Variables", - "kind": 32, - "children": [ - 18, - 11, - 10 - ] - } - ], - "sources": [ - { - "fileName": "literal-type.ts", - "line": 4, - "character": 11 - } - ] - } - } - }, - { - "id": 5, - "name": "valueY", - "kind": 32, - "kindString": "Variable", - "flags": {}, - "sources": [ - { - "fileName": "literal-type.ts", - "line": 3, - "character": 10 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 6, - "name": "__type", - "kind": 65536, - "kindString": "Type literal", - "flags": {}, - "signatures": [ - { - "id": 7, - "name": "__call", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "sources": [ - { - "fileName": "literal-type.ts", - "line": 3, - "character": 11 - } - ] - } - } - }, - { - "id": 4, - "name": "valueZ", - "kind": 32, - "kindString": "Variable", - "flags": {}, - "sources": [ - { - "fileName": "literal-type.ts", - "line": 2, - "character": 10 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "groups": [ - { - "title": "Variables", - "kind": 32, - "children": [ - 19, - 20, - 8, - 5, - 4 - ] - } - ], - "sources": [ - { - "fileName": "literal-type.ts", - "line": 1, - "character": 16 - } - ] - } - } - } - ], - "groups": [ - { - "title": "Variables", - "kind": 32, - "children": [ - 2 - ] - } - ], - "sources": [ - { - "fileName": "literal-type.ts", - "line": 1, - "character": 0 - } - ] - } - ], - "groups": [ - { - "title": "External modules", - "kind": 1, - "children": [ - 1 - ] - } - ] -} \ No newline at end of file diff --git a/src/test/converter/mixin/mixin.ts b/src/test/converter/mixin/mixin.ts index 2e8c1d8f5..d25328da6 100644 --- a/src/test/converter/mixin/mixin.ts +++ b/src/test/converter/mixin/mixin.ts @@ -1,86 +1,95 @@ -export type AnyFunction = (...input: any[]) => A -export type AnyConstructor = new (...input: any[]) => A -export type Mixin = InstanceType> +// tslint:disable:variable-name + +/** + * Any function + */ +export type AnyFunction = (...input: any[]) => A; + +/** + * Any constructor function + */ +export type AnyConstructor = new (...input: any[]) => A; + +/** + * Mixin type helper + */ +export type Mixin = InstanceType>; /** * Base class */ export class Base { - baseProperty : string = 'init' + baseProperty = 'init'; - baseMethod () : number { - return 42 + baseMethod (): number { + return 42; } } /** * The "mixin function" of the Mixin1 */ -export const Mixin1Func = >(base : T) => +export const Mixin1Func = >(base: T) => /** * Internal class of the Mixin1 */ class Mixin1Class extends base { - property1 : string = 'init' - + property1 = 'init'; - method1 (arg : Mixin1Type) : Mixin1Type[] { - return [ arg, this ] + method1 (arg: Mixin1Type): Mixin1Type[] { + return [ arg, this ]; } -} +}; /** * The "instance type" of the Mixin1 using the interface notation (supports recursive type definition) */ export interface Mixin1Type extends Mixin {} - /** * The "mixin function" of the Mixin2 */ -export const Mixin2 = >(base : T) => +export const Mixin2 = >(base: T) => /** * Internal class of the Mixin2 */ class Mixin2 extends base { - property2 : string = 'init' + property2 = 'init'; - - method2 (arg : Mixin2) : Mixin2[] { - return [ arg, this ] + method2 (arg: Mixin2): Mixin2[] { + return [ arg, this ]; } -} +}; /** * The "instance type" of the Mixin2 using the interface notation (supports recursive type definition) */ export interface Mixin2 extends Mixin {} - /** * The "mixin function" of the Mixin3 */ -export const Mixin3 = >(base : T) => +export const Mixin3 = >(base: T) => /** * Internal class of the Mixin3 */ class Mixin3 extends base { -} +}; /** * The "instance type" of the Mixin3 using the regular type notation (does not work well for recursive type definition) * Is not well supported by the TypeDoc */ -export type Mixin3 = Mixin +export type Mixin3 = Mixin; /** * Class that inherits from Base and consumes Mixin1 and Mixin2, in order. */ export class SomeClassWithMixin extends Mixin2(Mixin1Func(Base)) { - classWithMixinProperty : string = 'init' + classWithMixinProperty = 'init'; - classWithMixinMethod () : string { - return '42' + classWithMixinMethod (): string { + return '42'; } } diff --git a/src/test/converter/mixin/specs.json b/src/test/converter/mixin/specs.json index 1e77a7fe3..6d3e401ad 100644 --- a/src/test/converter/mixin/specs.json +++ b/src/test/converter/mixin/specs.json @@ -37,7 +37,7 @@ "sources": [ { "fileName": "mixin.ts", - "line": 9, + "line": 22, "character": 16 } ], @@ -73,7 +73,7 @@ "sources": [ { "fileName": "mixin.ts", - "line": 11, + "line": 24, "character": 14 } ] @@ -98,7 +98,7 @@ "sources": [ { "fileName": "mixin.ts", - "line": 8, + "line": 21, "character": 17 } ] @@ -126,7 +126,7 @@ "sources": [ { "fileName": "mixin.ts", - "line": 9, + "line": 22, "character": 16 } ], @@ -157,7 +157,7 @@ "sources": [ { "fileName": "mixin.ts", - "line": 81, + "line": 90, "character": 26 } ], @@ -178,7 +178,7 @@ "sources": [ { "fileName": "mixin.ts", - "line": 25, + "line": 38, "character": 13 } ], @@ -209,7 +209,7 @@ "sources": [ { "fileName": "mixin.ts", - "line": 47, + "line": 58, "character": 13 } ], @@ -260,7 +260,7 @@ "sources": [ { "fileName": "mixin.ts", - "line": 11, + "line": 24, "character": 14 } ], @@ -301,7 +301,7 @@ "sources": [ { "fileName": "mixin.ts", - "line": 83, + "line": 92, "character": 24 } ] @@ -362,7 +362,7 @@ "sources": [ { "fileName": "mixin.ts", - "line": 28, + "line": 40, "character": 11 } ], @@ -426,7 +426,7 @@ "sources": [ { "fileName": "mixin.ts", - "line": 50, + "line": 60, "character": 11 } ], @@ -462,7 +462,7 @@ "sources": [ { "fileName": "mixin.ts", - "line": 80, + "line": 89, "character": 31 } ], @@ -547,7 +547,7 @@ "sources": [ { "fileName": "mixin.ts", - "line": 9, + "line": 22, "character": 16 } ], @@ -578,7 +578,7 @@ "sources": [ { "fileName": "mixin.ts", - "line": 25, + "line": 38, "character": 13 } ], @@ -629,7 +629,7 @@ "sources": [ { "fileName": "mixin.ts", - "line": 11, + "line": 24, "character": 14 } ], @@ -695,7 +695,7 @@ "sources": [ { "fileName": "mixin.ts", - "line": 28, + "line": 40, "character": 11 } ], @@ -727,7 +727,7 @@ "sources": [ { "fileName": "mixin.ts", - "line": 36, + "line": 48, "character": 27 } ], @@ -785,7 +785,7 @@ "sources": [ { "fileName": "mixin.ts", - "line": 9, + "line": 22, "character": 16 } ], @@ -816,7 +816,7 @@ "sources": [ { "fileName": "mixin.ts", - "line": 25, + "line": 38, "character": 13 } ], @@ -847,7 +847,7 @@ "sources": [ { "fileName": "mixin.ts", - "line": 47, + "line": 58, "character": 13 } ], @@ -898,7 +898,7 @@ "sources": [ { "fileName": "mixin.ts", - "line": 11, + "line": 24, "character": 14 } ], @@ -969,7 +969,7 @@ "sources": [ { "fileName": "mixin.ts", - "line": 28, + "line": 40, "character": 11 } ], @@ -1033,7 +1033,7 @@ "sources": [ { "fileName": "mixin.ts", - "line": 50, + "line": 60, "character": 11 } ], @@ -1067,7 +1067,7 @@ "sources": [ { "fileName": "mixin.ts", - "line": 58, + "line": 68, "character": 23 } ], @@ -1115,6 +1115,9 @@ "flags": { "isExported": true }, + "comment": { + "shortText": "Any constructor function" + }, "typeParameter": [ { "id": 49, @@ -1129,7 +1132,7 @@ "sources": [ { "fileName": "mixin.ts", - "line": 2, + "line": 11, "character": 26 } ], @@ -1146,7 +1149,7 @@ "sources": [ { "fileName": "mixin.ts", - "line": 2, + "line": 11, "character": 40 } ] @@ -1161,6 +1164,9 @@ "flags": { "isExported": true }, + "comment": { + "shortText": "Any function" + }, "typeParameter": [ { "id": 44, @@ -1175,7 +1181,7 @@ "sources": [ { "fileName": "mixin.ts", - "line": 1, + "line": 6, "character": 23 } ], @@ -1226,7 +1232,7 @@ "sources": [ { "fileName": "mixin.ts", - "line": 1, + "line": 6, "character": 34 } ] @@ -1241,6 +1247,9 @@ "flags": { "isExported": true }, + "comment": { + "shortText": "Mixin type helper" + }, "typeParameter": [ { "id": 52, @@ -1260,7 +1269,7 @@ "sources": [ { "fileName": "mixin.ts", - "line": 3, + "line": 16, "character": 17 } ], @@ -1300,7 +1309,7 @@ "sources": [ { "fileName": "mixin.ts", - "line": 75, + "line": 84, "character": 18 } ], @@ -1408,7 +1417,7 @@ "sources": [ { "fileName": "mixin.ts", - "line": 19, + "line": 32, "character": 23 } ] @@ -1525,7 +1534,7 @@ "sources": [ { "fileName": "mixin.ts", - "line": 42, + "line": 53, "character": 19 } ] @@ -1620,7 +1629,7 @@ "sources": [ { "fileName": "mixin.ts", - "line": 64, + "line": 73, "character": 19 } ] diff --git a/src/test/converter/promise-object/promise-object.ts b/src/test/converter/promise-object/promise-object.ts deleted file mode 100644 index 49056d7c7..000000000 --- a/src/test/converter/promise-object/promise-object.ts +++ /dev/null @@ -1,5 +0,0 @@ -let x: object; -let y: Promise; -let z: Promise; - -export {}; diff --git a/src/test/converter/promise-object/specs.json b/src/test/converter/promise-object/specs.json deleted file mode 100644 index bf08cf0a4..000000000 --- a/src/test/converter/promise-object/specs.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "id": 0, - "name": "typedoc", - "kind": 0, - "flags": {}, - "children": [ - { - "id": 1, - "name": "\"promise-object\"", - "kind": 1, - "kindString": "External module", - "flags": { - "isExported": true - }, - "originalName": "%BASE%/promise-object/promise-object.ts", - "children": [ - { - "id": 2, - "name": "x", - "kind": 32, - "kindString": "Variable", - "flags": { - "isLet": true - }, - "sources": [ - { - "fileName": "promise-object.ts", - "line": 1, - "character": 5 - } - ], - "type": { - "type": "intrinsic", - "name": "object" - } - }, - { - "id": 3, - "name": "y", - "kind": 32, - "kindString": "Variable", - "flags": { - "isLet": true - }, - "sources": [ - { - "fileName": "promise-object.ts", - "line": 2, - "character": 5 - } - ], - "type": { - "type": "reference", - "name": "Promise", - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ] - } - }, - { - "id": 4, - "name": "z", - "kind": 32, - "kindString": "Variable", - "flags": { - "isLet": true - }, - "sources": [ - { - "fileName": "promise-object.ts", - "line": 3, - "character": 5 - } - ], - "type": { - "type": "reference", - "name": "Promise", - "typeArguments": [ - { - "type": "intrinsic", - "name": "object" - } - ] - } - } - ], - "groups": [ - { - "title": "Variables", - "kind": 32, - "children": [ - 2, - 3, - 4 - ] - } - ], - "sources": [ - { - "fileName": "promise-object.ts", - "line": 1, - "character": 0 - } - ] - } - ], - "groups": [ - { - "title": "External modules", - "kind": 1, - "children": [ - 1 - ] - } - ] -} \ No newline at end of file diff --git a/src/test/converter/react/react.d.ts b/src/test/converter/react/react.d.ts deleted file mode 100644 index 5bf24b31d..000000000 --- a/src/test/converter/react/react.d.ts +++ /dev/null @@ -1,2018 +0,0 @@ -// Type definitions for React v0.13.3 -// Project: http://facebook.github.io/react/ -// Definitions by: Asana , AssureSign , Microsoft -// Definitions: https://github.com/borisyankov/DefinitelyTyped - -declare namespace __React { - // - // React Elements - // ---------------------------------------------------------------------- - - type ReactType = ComponentClass | string; - - interface ReactElement

{ - type: string | ComponentClass

; - props: P; - key: string | number; - ref: string | ((component: Component) => any); - } - - interface ClassicElement

extends ReactElement

{ - type: string | ClassicComponentClass

; - ref: string | ((component: ClassicComponent) => any); - } - - interface DOMElement

extends ClassicElement

{ - type: string; - ref: string | ((component: DOMComponent

) => any); - } - - type HTMLElement = DOMElement; - type SVGElement = DOMElement; - - // - // Factories - // ---------------------------------------------------------------------- - - interface Factory

{ - (props?: P, ...children: ReactNode[]): ReactElement

; - } - - interface ClassicFactory

extends Factory

{ - (props?: P, ...children: ReactNode[]): ClassicElement

; - } - - interface DOMFactory

extends ClassicFactory

{ - (props?: P, ...children: ReactNode[]): DOMElement

; - } - - type HTMLFactory = DOMFactory; - type SVGFactory = DOMFactory; - type SVGElementFactory = DOMFactory; - - // - // React Nodes - // http://facebook.github.io/react/docs/glossary.html - // ---------------------------------------------------------------------- - - type ReactText = string | number; - type ReactChild = ReactElement | ReactText; - - // Should be Array but type aliases cannot be recursive - type ReactFragment = {} | Array; - type ReactNode = ReactChild | ReactFragment | boolean; - - // - // Top Level API - // ---------------------------------------------------------------------- - - function createClass(spec: ComponentSpec): ClassicComponentClass

; - - function createFactory

(type: string): DOMFactory

; - function createFactory

(type: ClassicComponentClass

| string): ClassicFactory

; - function createFactory

(type: ComponentClass

): Factory

; - - function createElement

( - type: string, - props?: P, - ...children: ReactNode[]): DOMElement

; - function createElement

( - type: ClassicComponentClass

| string, - props?: P, - ...children: ReactNode[]): ClassicElement

; - function createElement

( - type: ComponentClass

, - props?: P, - ...children: ReactNode[]): ReactElement

; - - function cloneElement

( - element: DOMElement

, - props?: P, - ...children: ReactNode[]): DOMElement

; - function cloneElement

( - element: ClassicElement

, - props?: P, - ...children: ReactNode[]): ClassicElement

; - function cloneElement

( - element: ReactElement

, - props?: P, - ...children: ReactNode[]): ReactElement

; - - function render

( - element: DOMElement

, - container: Element, - callback?: () => any): DOMComponent

; - function render( - element: ClassicElement

, - container: Element, - callback?: () => any): ClassicComponent; - function render( - element: ReactElement

, - container: Element, - callback?: () => any): Component; - - function unmountComponentAtNode(container: Element): boolean; - function renderToString(element: ReactElement): string; - function renderToStaticMarkup(element: ReactElement): string; - function isValidElement(object: {}): boolean; - function initializeTouchEvents(shouldUseTouch: boolean): void; - - function findDOMNode( - componentOrElement: Component | Element): TElement; - function findDOMNode( - componentOrElement: Component | Element): Element; - - var DOM: ReactDOM; - var PropTypes: ReactPropTypes; - var Children: ReactChildren; - - // - // Component API - // ---------------------------------------------------------------------- - - // Base component for plain JS classes - class Component { - constructor(props?: P, context?: any); - setState(f: (prevState: S, props: P) => S, callback?: () => any): void; - setState(state: S, callback?: () => any): void; - forceUpdate(callBack?: () => any): void; - render(): JSX.Element; - props: P; - state: S; - context: {}; - refs: { - [key: string]: Component - }; - } - - interface ClassicComponent extends Component { - replaceState(nextState: S, callback?: () => any): void; - getDOMNode(): TElement; - getDOMNode(): Element; - isMounted(): boolean; - getInitialState?(): S; - setProps(nextProps: P, callback?: () => any): void; - replaceProps(nextProps: P, callback?: () => any): void; - } - - interface DOMComponent

extends ClassicComponent { - tagName: string; - } - - type HTMLComponent = DOMComponent; - type SVGComponent = DOMComponent; - - interface ChildContextProvider { - getChildContext(): CC; - } - - // - // Class Interfaces - // ---------------------------------------------------------------------- - - interface ComponentClass

{ - new(props?: P, context?: any): Component; - propTypes?: ValidationMap

; - contextTypes?: ValidationMap; - childContextTypes?: ValidationMap; - defaultProps?: P; - } - - interface ClassicComponentClass

extends ComponentClass

{ - new(props?: P, context?: any): ClassicComponent; - getDefaultProps?(): P; - displayName?: string; - } - - // - // Component Specs and Lifecycle - // ---------------------------------------------------------------------- - - interface ComponentLifecycle { - componentWillMount?(): void; - componentDidMount?(): void; - componentWillReceiveProps?(nextProps: P, nextContext: any): void; - shouldComponentUpdate?(nextProps: P, nextState: S, nextContext: any): boolean; - componentWillUpdate?(nextProps: P, nextState: S, nextContext: any): void; - componentDidUpdate?(prevProps: P, prevState: S, prevContext: any): void; - componentWillUnmount?(): void; - } - - interface Mixin extends ComponentLifecycle { - mixins?: Mixin; - statics?: { - [key: string]: any; - }; - - displayName?: string; - propTypes?: ValidationMap; - contextTypes?: ValidationMap; - childContextTypes?: ValidationMap - - getDefaultProps?(): P; - getInitialState?(): S; - } - - interface ComponentSpec extends Mixin { - render(): ReactElement; - - [propertyName: string]: any; - } - - // - // Event System - // ---------------------------------------------------------------------- - - interface SyntheticEvent { - bubbles: boolean; - cancelable: boolean; - currentTarget: EventTarget; - defaultPrevented: boolean; - eventPhase: number; - isTrusted: boolean; - nativeEvent: Event; - preventDefault(): void; - stopPropagation(): void; - target: EventTarget; - timeStamp: Date; - type: string; - } - - interface DragEvent extends SyntheticEvent { - dataTransfer: DataTransfer; - } - - interface ClipboardEvent extends SyntheticEvent { - clipboardData: DataTransfer; - } - - interface KeyboardEvent extends SyntheticEvent { - altKey: boolean; - charCode: number; - ctrlKey: boolean; - getModifierState(key: string): boolean; - key: string; - keyCode: number; - locale: string; - location: number; - metaKey: boolean; - repeat: boolean; - shiftKey: boolean; - which: number; - } - - interface FocusEvent extends SyntheticEvent { - relatedTarget: EventTarget; - } - - interface FormEvent extends SyntheticEvent { - } - - interface MouseEvent extends SyntheticEvent { - altKey: boolean; - button: number; - buttons: number; - clientX: number; - clientY: number; - ctrlKey: boolean; - getModifierState(key: string): boolean; - metaKey: boolean; - pageX: number; - pageY: number; - relatedTarget: EventTarget; - screenX: number; - screenY: number; - shiftKey: boolean; - } - - interface TouchEvent extends SyntheticEvent { - altKey: boolean; - changedTouches: TouchList; - ctrlKey: boolean; - getModifierState(key: string): boolean; - metaKey: boolean; - shiftKey: boolean; - targetTouches: TouchList; - touches: TouchList; - } - - interface UIEvent extends SyntheticEvent { - detail: number; - view: AbstractView; - } - - interface WheelEvent extends SyntheticEvent { - deltaMode: number; - deltaX: number; - deltaY: number; - deltaZ: number; - } - - // - // Event Handler Types - // ---------------------------------------------------------------------- - - interface EventHandler { - (event: E): void; - } - - interface DragEventHandler extends EventHandler {} - interface ClipboardEventHandler extends EventHandler {} - interface KeyboardEventHandler extends EventHandler {} - interface FocusEventHandler extends EventHandler {} - interface FormEventHandler extends EventHandler {} - interface MouseEventHandler extends EventHandler {} - interface TouchEventHandler extends EventHandler {} - interface UIEventHandler extends EventHandler {} - interface WheelEventHandler extends EventHandler {} - - // - // Props / DOM Attributes - // ---------------------------------------------------------------------- - - interface Props { - children?: ReactNode; - key?: string | number; - ref?: string | ((component: T) => any); - } - - interface DOMAttributesBase extends Props { - onCopy?: ClipboardEventHandler; - onCut?: ClipboardEventHandler; - onPaste?: ClipboardEventHandler; - onKeyDown?: KeyboardEventHandler; - onKeyPress?: KeyboardEventHandler; - onKeyUp?: KeyboardEventHandler; - onFocus?: FocusEventHandler; - onBlur?: FocusEventHandler; - onChange?: FormEventHandler; - onInput?: FormEventHandler; - onSubmit?: FormEventHandler; - onClick?: MouseEventHandler; - onDoubleClick?: MouseEventHandler; - onDrag?: DragEventHandler; - onDragEnd?: DragEventHandler; - onDragEnter?: DragEventHandler; - onDragExit?: DragEventHandler; - onDragLeave?: DragEventHandler; - onDragOver?: DragEventHandler; - onDragStart?: DragEventHandler; - onDrop?: DragEventHandler; - onMouseDown?: MouseEventHandler; - onMouseEnter?: MouseEventHandler; - onMouseLeave?: MouseEventHandler; - onMouseMove?: MouseEventHandler; - onMouseOut?: MouseEventHandler; - onMouseOver?: MouseEventHandler; - onMouseUp?: MouseEventHandler; - onTouchCancel?: TouchEventHandler; - onTouchEnd?: TouchEventHandler; - onTouchMove?: TouchEventHandler; - onTouchStart?: TouchEventHandler; - onScroll?: UIEventHandler; - onWheel?: WheelEventHandler; - - dangerouslySetInnerHTML?: { - __html: string; - }; - } - - interface DOMAttributes extends DOMAttributesBase> { - } - - // This interface is not complete. Only properties accepting - // unitless numbers are listed here (see CSSProperty.js in React) - interface CSSProperties { - boxFlex?: number; - boxFlexGroup?: number; - columnCount?: number; - flex?: number | string; - flexGrow?: number; - flexShrink?: number; - fontWeight?: number | string; - lineClamp?: number; - lineHeight?: number | string; - opacity?: number; - order?: number; - orphans?: number; - widows?: number; - zIndex?: number; - zoom?: number; - - fontSize?: number | string; - - // SVG-related properties - fillOpacity?: number; - strokeOpacity?: number; - strokeWidth?: number; - - [propertyName: string]: any; - } - - interface HTMLAttributesBase extends DOMAttributesBase { - accept?: string; - acceptCharset?: string; - accessKey?: string; - action?: string; - allowFullScreen?: boolean; - allowTransparency?: boolean; - alt?: string; - async?: boolean; - autoComplete?: boolean; - autoFocus?: boolean; - autoPlay?: boolean; - cellPadding?: number | string; - cellSpacing?: number | string; - charSet?: string; - checked?: boolean; - classID?: string; - className?: string; - cols?: number; - colSpan?: number; - content?: string; - contentEditable?: boolean; - contextMenu?: string; - controls?: any; - coords?: string; - crossOrigin?: string; - data?: string; - dateTime?: string; - defaultChecked?: boolean; - defaultValue?: string; - defer?: boolean; - dir?: string; - disabled?: boolean; - download?: any; - draggable?: boolean; - encType?: string; - form?: string; - formAction?: string; - formEncType?: string; - formMethod?: string; - formNoValidate?: boolean; - formTarget?: string; - frameBorder?: number | string; - headers?: string; - height?: number | string; - hidden?: boolean; - high?: number; - href?: string; - hrefLang?: string; - htmlFor?: string; - httpEquiv?: string; - icon?: string; - id?: string; - label?: string; - lang?: string; - list?: string; - loop?: boolean; - low?: number; - manifest?: string; - marginHeight?: number; - marginWidth?: number; - max?: number | string; - maxLength?: number; - media?: string; - mediaGroup?: string; - method?: string; - min?: number | string; - multiple?: boolean; - muted?: boolean; - name?: string; - noValidate?: boolean; - open?: boolean; - optimum?: number; - pattern?: string; - placeholder?: string; - poster?: string; - preload?: string; - radioGroup?: string; - readOnly?: boolean; - rel?: string; - required?: boolean; - role?: string; - rows?: number; - rowSpan?: number; - sandbox?: string; - scope?: string; - scoped?: boolean; - scrolling?: string; - seamless?: boolean; - selected?: boolean; - shape?: string; - size?: number; - sizes?: string; - span?: number; - spellCheck?: boolean; - src?: string; - srcDoc?: string; - srcSet?: string; - start?: number; - step?: number | string; - style?: CSSProperties; - tabIndex?: number; - target?: string; - title?: string; - type?: string; - useMap?: string; - value?: string; - width?: number | string; - wmode?: string; - - // Non-standard Attributes - autoCapitalize?: boolean; - autoCorrect?: boolean; - property?: string; - itemProp?: string; - itemScope?: boolean; - itemType?: string; - unselectable?: boolean; - } - - interface HTMLAttributes extends HTMLAttributesBase { - } - - interface SVGElementAttributes extends HTMLAttributes { - viewBox?: string; - preserveAspectRatio?: string; - } - - interface SVGAttributes extends DOMAttributes { - ref?: string | ((component: SVGComponent) => void); - - cx?: number | string; - cy?: number | string; - d?: string; - dx?: number | string; - dy?: number | string; - fill?: string; - fillOpacity?: number | string; - fontFamily?: string; - fontSize?: number | string; - fx?: number | string; - fy?: number | string; - gradientTransform?: string; - gradientUnits?: string; - height?: number | string; - markerEnd?: string; - markerMid?: string; - markerStart?: string; - offset?: number | string; - opacity?: number | string; - patternContentUnits?: string; - patternUnits?: string; - points?: string; - preserveAspectRatio?: string; - r?: number | string; - rx?: number | string; - ry?: number | string; - spreadMethod?: string; - stopColor?: string; - stopOpacity?: number | string; - stroke?: string; - strokeDasharray?: string; - strokeLinecap?: string; - strokeOpacity?: number | string; - strokeWidth?: number | string; - textAnchor?: string; - transform?: string; - version?: string; - viewBox?: string; - width?: number | string; - x1?: number | string; - x2?: number | string; - x?: number | string; - y1?: number | string; - y2?: number | string - y?: number | string; - } - - // - // React.DOM - // ---------------------------------------------------------------------- - - interface ReactDOM { - // HTML - a: HTMLFactory; - abbr: HTMLFactory; - address: HTMLFactory; - area: HTMLFactory; - article: HTMLFactory; - aside: HTMLFactory; - audio: HTMLFactory; - b: HTMLFactory; - base: HTMLFactory; - bdi: HTMLFactory; - bdo: HTMLFactory; - big: HTMLFactory; - blockquote: HTMLFactory; - body: HTMLFactory; - br: HTMLFactory; - button: HTMLFactory; - canvas: HTMLFactory; - caption: HTMLFactory; - cite: HTMLFactory; - code: HTMLFactory; - col: HTMLFactory; - colgroup: HTMLFactory; - data: HTMLFactory; - datalist: HTMLFactory; - dd: HTMLFactory; - del: HTMLFactory; - details: HTMLFactory; - dfn: HTMLFactory; - dialog: HTMLFactory; - div: HTMLFactory; - dl: HTMLFactory; - dt: HTMLFactory; - em: HTMLFactory; - embed: HTMLFactory; - fieldset: HTMLFactory; - figcaption: HTMLFactory; - figure: HTMLFactory; - footer: HTMLFactory; - form: HTMLFactory; - h1: HTMLFactory; - h2: HTMLFactory; - h3: HTMLFactory; - h4: HTMLFactory; - h5: HTMLFactory; - h6: HTMLFactory; - head: HTMLFactory; - header: HTMLFactory; - hr: HTMLFactory; - html: HTMLFactory; - i: HTMLFactory; - iframe: HTMLFactory; - img: HTMLFactory; - input: HTMLFactory; - ins: HTMLFactory; - kbd: HTMLFactory; - keygen: HTMLFactory; - label: HTMLFactory; - legend: HTMLFactory; - li: HTMLFactory; - link: HTMLFactory; - main: HTMLFactory; - map: HTMLFactory; - mark: HTMLFactory; - menu: HTMLFactory; - menuitem: HTMLFactory; - meta: HTMLFactory; - meter: HTMLFactory; - nav: HTMLFactory; - noscript: HTMLFactory; - object: HTMLFactory; - ol: HTMLFactory; - optgroup: HTMLFactory; - option: HTMLFactory; - output: HTMLFactory; - p: HTMLFactory; - param: HTMLFactory; - picture: HTMLFactory; - pre: HTMLFactory; - progress: HTMLFactory; - q: HTMLFactory; - rp: HTMLFactory; - rt: HTMLFactory; - ruby: HTMLFactory; - s: HTMLFactory; - samp: HTMLFactory; - script: HTMLFactory; - section: HTMLFactory; - select: HTMLFactory; - small: HTMLFactory; - source: HTMLFactory; - span: HTMLFactory; - strong: HTMLFactory; - style: HTMLFactory; - sub: HTMLFactory; - summary: HTMLFactory; - sup: HTMLFactory; - table: HTMLFactory; - tbody: HTMLFactory; - td: HTMLFactory; - textarea: HTMLFactory; - tfoot: HTMLFactory; - th: HTMLFactory; - thead: HTMLFactory; - time: HTMLFactory; - title: HTMLFactory; - tr: HTMLFactory; - track: HTMLFactory; - u: HTMLFactory; - ul: HTMLFactory; - "var": HTMLFactory; - video: HTMLFactory; - wbr: HTMLFactory; - - // SVG - svg: SVGElementFactory; - circle: SVGFactory; - defs: SVGFactory; - ellipse: SVGFactory; - g: SVGFactory; - line: SVGFactory; - linearGradient: SVGFactory; - mask: SVGFactory; - path: SVGFactory; - pattern: SVGFactory; - polygon: SVGFactory; - polyline: SVGFactory; - radialGradient: SVGFactory; - rect: SVGFactory; - stop: SVGFactory; - text: SVGFactory; - tspan: SVGFactory; - } - - // - // React.PropTypes - // ---------------------------------------------------------------------- - - interface Validator { - (object: T, key: string, componentName: string): Error; - } - - interface Requireable extends Validator { - isRequired: Validator; - } - - interface ValidationMap { - [key: string]: Validator; - } - - interface ReactPropTypes { - any: Requireable; - array: Requireable; - bool: Requireable; - func: Requireable; - number: Requireable; - object: Requireable; - string: Requireable; - node: Requireable; - element: Requireable; - instanceOf(expectedClass: {}): Requireable; - oneOf(types: any[]): Requireable; - oneOfType(types: Validator[]): Requireable; - arrayOf(type: Validator): Requireable; - objectOf(type: Validator): Requireable; - shape(type: ValidationMap): Requireable; - } - - // - // React.Children - // ---------------------------------------------------------------------- - - interface ReactChildren { - map(children: ReactNode, fn: (child: ReactChild, index: number) => T): { [key:string]: T }; - forEach(children: ReactNode, fn: (child: ReactChild, index: number) => any): void; - count(children: ReactNode): number; - only(children: ReactNode): ReactChild; - } - - // - // Browser Interfaces - // https://github.com/nikeee/2048-typescript/blob/master/2048/js/touch.d.ts - // ---------------------------------------------------------------------- - - interface AbstractView { - styleMedia: StyleMedia; - document: Document; - } - - interface Touch { - identifier: number; - target: EventTarget; - screenX: number; - screenY: number; - clientX: number; - clientY: number; - pageX: number; - pageY: number; - } - - interface TouchList { - [index: number]: Touch; - length: number; - item(index: number): Touch; - identifiedTouch(identifier: number): Touch; - } -} - -declare module "react" { - export = __React; -} - -declare module "react/addons" { - // - // React Elements - // ---------------------------------------------------------------------- - - type ReactType = ComponentClass | string; - - interface ReactElement

{ - type: string | ComponentClass

; - props: P; - key: string | number; - ref: string | ((component: Component) => any); - } - - interface ClassicElement

extends ReactElement

{ - type: string | ClassicComponentClass

; - ref: string | ((component: ClassicComponent) => any); - } - - interface DOMElement

extends ClassicElement

{ - type: string; - ref: string | ((component: DOMComponent

) => any); - } - - type HTMLElement = DOMElement; - type SVGElement = DOMElement; - - // - // Factories - // ---------------------------------------------------------------------- - - interface Factory

{ - (props?: P, ...children: ReactNode[]): ReactElement

; - } - - interface ClassicFactory

extends Factory

{ - (props?: P, ...children: ReactNode[]): ClassicElement

; - } - - interface DOMFactory

extends ClassicFactory

{ - (props?: P, ...children: ReactNode[]): DOMElement

; - } - - type HTMLFactory = DOMFactory; - type SVGFactory = DOMFactory; - type SVGElementFactory = DOMFactory; - - // - // React Nodes - // http://facebook.github.io/react/docs/glossary.html - // ---------------------------------------------------------------------- - - type ReactText = string | number; - type ReactChild = ReactElement | ReactText; - - // Should be Array but type aliases cannot be recursive - type ReactFragment = {} | Array; - type ReactNode = ReactChild | ReactFragment | boolean; - - // - // Top Level API - // ---------------------------------------------------------------------- - - function createClass(spec: ComponentSpec): ClassicComponentClass

; - - function createFactory

(type: string): DOMFactory

; - function createFactory

(type: ClassicComponentClass

| string): ClassicFactory

; - function createFactory

(type: ComponentClass

): Factory

; - - function createElement

( - type: string, - props?: P, - ...children: ReactNode[]): DOMElement

; - function createElement

( - type: ClassicComponentClass

| string, - props?: P, - ...children: ReactNode[]): ClassicElement

; - function createElement

( - type: ComponentClass

, - props?: P, - ...children: ReactNode[]): ReactElement

; - - function cloneElement

( - element: DOMElement

, - props?: P, - ...children: ReactNode[]): DOMElement

; - function cloneElement

( - element: ClassicElement

, - props?: P, - ...children: ReactNode[]): ClassicElement

; - function cloneElement

( - element: ReactElement

, - props?: P, - ...children: ReactNode[]): ReactElement

; - - function render

( - element: DOMElement

, - container: Element, - callback?: () => any): DOMComponent

; - function render( - element: ClassicElement

, - container: Element, - callback?: () => any): ClassicComponent; - function render( - element: ReactElement

, - container: Element, - callback?: () => any): Component; - - function unmountComponentAtNode(container: Element): boolean; - function renderToString(element: ReactElement): string; - function renderToStaticMarkup(element: ReactElement): string; - function isValidElement(object: {}): boolean; - function initializeTouchEvents(shouldUseTouch: boolean): void; - - function findDOMNode( - componentOrElement: Component | Element): TElement; - function findDOMNode( - componentOrElement: Component | Element): Element; - - var DOM: ReactDOM; - var PropTypes: ReactPropTypes; - var Children: ReactChildren; - - // - // Component API - // ---------------------------------------------------------------------- - - // Base component for plain JS classes - class Component { - constructor(props?: P, context?: any); - setState(f: (prevState: S, props: P) => S, callback?: () => any): void; - setState(state: S, callback?: () => any): void; - forceUpdate(callBack?: () => any): void; - render(): JSX.Element; - props: P; - state: S; - context: {}; - refs: { - [key: string]: Component - }; - } - - interface ClassicComponent extends Component { - replaceState(nextState: S, callback?: () => any): void; - getDOMNode(): TElement; - getDOMNode(): Element; - isMounted(): boolean; - getInitialState?(): S; - setProps(nextProps: P, callback?: () => any): void; - replaceProps(nextProps: P, callback?: () => any): void; - } - - interface DOMComponent

extends ClassicComponent { - tagName: string; - } - - type HTMLComponent = DOMComponent; - type SVGComponent = DOMComponent; - - interface ChildContextProvider { - getChildContext(): CC; - } - - // - // Class Interfaces - // ---------------------------------------------------------------------- - - interface ComponentClass

{ - new(props?: P, context?: any): Component; - propTypes?: ValidationMap

; - contextTypes?: ValidationMap; - childContextTypes?: ValidationMap; - defaultProps?: P; - } - - interface ClassicComponentClass

extends ComponentClass

{ - new(props?: P, context?: any): ClassicComponent; - getDefaultProps?(): P; - displayName?: string; - } - - // - // Component Specs and Lifecycle - // ---------------------------------------------------------------------- - - interface ComponentLifecycle { - componentWillMount?(): void; - componentDidMount?(): void; - componentWillReceiveProps?(nextProps: P, nextContext: any): void; - shouldComponentUpdate?(nextProps: P, nextState: S, nextContext: any): boolean; - componentWillUpdate?(nextProps: P, nextState: S, nextContext: any): void; - componentDidUpdate?(prevProps: P, prevState: S, prevContext: any): void; - componentWillUnmount?(): void; - } - - interface Mixin extends ComponentLifecycle { - mixins?: Mixin; - statics?: { - [key: string]: any; - }; - - displayName?: string; - propTypes?: ValidationMap; - contextTypes?: ValidationMap; - childContextTypes?: ValidationMap - - getDefaultProps?(): P; - getInitialState?(): S; - } - - interface ComponentSpec extends Mixin { - render(): ReactElement; - - [propertyName: string]: any; - } - - // - // Event System - // ---------------------------------------------------------------------- - - interface SyntheticEvent { - bubbles: boolean; - cancelable: boolean; - currentTarget: EventTarget; - defaultPrevented: boolean; - eventPhase: number; - isTrusted: boolean; - nativeEvent: Event; - preventDefault(): void; - stopPropagation(): void; - target: EventTarget; - timeStamp: Date; - type: string; - } - - interface DragEvent extends SyntheticEvent { - dataTransfer: DataTransfer; - } - - interface ClipboardEvent extends SyntheticEvent { - clipboardData: DataTransfer; - } - - interface KeyboardEvent extends SyntheticEvent { - altKey: boolean; - charCode: number; - ctrlKey: boolean; - getModifierState(key: string): boolean; - key: string; - keyCode: number; - locale: string; - location: number; - metaKey: boolean; - repeat: boolean; - shiftKey: boolean; - which: number; - } - - interface FocusEvent extends SyntheticEvent { - relatedTarget: EventTarget; - } - - interface FormEvent extends SyntheticEvent { - } - - interface MouseEvent extends SyntheticEvent { - altKey: boolean; - button: number; - buttons: number; - clientX: number; - clientY: number; - ctrlKey: boolean; - getModifierState(key: string): boolean; - metaKey: boolean; - pageX: number; - pageY: number; - relatedTarget: EventTarget; - screenX: number; - screenY: number; - shiftKey: boolean; - } - - interface TouchEvent extends SyntheticEvent { - altKey: boolean; - changedTouches: TouchList; - ctrlKey: boolean; - getModifierState(key: string): boolean; - metaKey: boolean; - shiftKey: boolean; - targetTouches: TouchList; - touches: TouchList; - } - - interface UIEvent extends SyntheticEvent { - detail: number; - view: AbstractView; - } - - interface WheelEvent extends SyntheticEvent { - deltaMode: number; - deltaX: number; - deltaY: number; - deltaZ: number; - } - - // - // Event Handler Types - // ---------------------------------------------------------------------- - - interface EventHandler { - (event: E): void; - } - - interface DragEventHandler extends EventHandler {} - interface ClipboardEventHandler extends EventHandler {} - interface KeyboardEventHandler extends EventHandler {} - interface FocusEventHandler extends EventHandler {} - interface FormEventHandler extends EventHandler {} - interface MouseEventHandler extends EventHandler {} - interface TouchEventHandler extends EventHandler {} - interface UIEventHandler extends EventHandler {} - interface WheelEventHandler extends EventHandler {} - - // - // Props / DOM Attributes - // ---------------------------------------------------------------------- - - interface Props { - children?: ReactNode; - key?: string | number; - ref?: string | ((component: T) => any); - } - - interface DOMAttributesBase extends Props { - onCopy?: ClipboardEventHandler; - onCut?: ClipboardEventHandler; - onPaste?: ClipboardEventHandler; - onKeyDown?: KeyboardEventHandler; - onKeyPress?: KeyboardEventHandler; - onKeyUp?: KeyboardEventHandler; - onFocus?: FocusEventHandler; - onBlur?: FocusEventHandler; - onChange?: FormEventHandler; - onInput?: FormEventHandler; - onSubmit?: FormEventHandler; - onClick?: MouseEventHandler; - onDoubleClick?: MouseEventHandler; - onDrag?: DragEventHandler; - onDragEnd?: DragEventHandler; - onDragEnter?: DragEventHandler; - onDragExit?: DragEventHandler; - onDragLeave?: DragEventHandler; - onDragOver?: DragEventHandler; - onDragStart?: DragEventHandler; - onDrop?: DragEventHandler; - onMouseDown?: MouseEventHandler; - onMouseEnter?: MouseEventHandler; - onMouseLeave?: MouseEventHandler; - onMouseMove?: MouseEventHandler; - onMouseOut?: MouseEventHandler; - onMouseOver?: MouseEventHandler; - onMouseUp?: MouseEventHandler; - onTouchCancel?: TouchEventHandler; - onTouchEnd?: TouchEventHandler; - onTouchMove?: TouchEventHandler; - onTouchStart?: TouchEventHandler; - onScroll?: UIEventHandler; - onWheel?: WheelEventHandler; - - dangerouslySetInnerHTML?: { - __html: string; - }; - } - - interface DOMAttributes extends DOMAttributesBase> { - } - - // This interface is not complete. Only properties accepting - // unitless numbers are listed here (see CSSProperty.js in React) - interface CSSProperties { - boxFlex?: number; - boxFlexGroup?: number; - columnCount?: number; - flex?: number | string; - flexGrow?: number; - flexShrink?: number; - fontWeight?: number | string; - lineClamp?: number; - lineHeight?: number | string; - opacity?: number; - order?: number; - orphans?: number; - widows?: number; - zIndex?: number; - zoom?: number; - - fontSize?: number | string; - - // SVG-related properties - fillOpacity?: number; - strokeOpacity?: number; - strokeWidth?: number; - - [propertyName: string]: any; - } - - interface HTMLAttributesBase extends DOMAttributesBase { - accept?: string; - acceptCharset?: string; - accessKey?: string; - action?: string; - allowFullScreen?: boolean; - allowTransparency?: boolean; - alt?: string; - async?: boolean; - autoComplete?: boolean; - autoFocus?: boolean; - autoPlay?: boolean; - cellPadding?: number | string; - cellSpacing?: number | string; - charSet?: string; - checked?: boolean; - classID?: string; - className?: string; - cols?: number; - colSpan?: number; - content?: string; - contentEditable?: boolean; - contextMenu?: string; - controls?: any; - coords?: string; - crossOrigin?: string; - data?: string; - dateTime?: string; - defaultChecked?: boolean; - defaultValue?: string; - defer?: boolean; - dir?: string; - disabled?: boolean; - download?: any; - draggable?: boolean; - encType?: string; - form?: string; - formAction?: string; - formEncType?: string; - formMethod?: string; - formNoValidate?: boolean; - formTarget?: string; - frameBorder?: number | string; - headers?: string; - height?: number | string; - hidden?: boolean; - high?: number; - href?: string; - hrefLang?: string; - htmlFor?: string; - httpEquiv?: string; - icon?: string; - id?: string; - label?: string; - lang?: string; - list?: string; - loop?: boolean; - low?: number; - manifest?: string; - marginHeight?: number; - marginWidth?: number; - max?: number | string; - maxLength?: number; - media?: string; - mediaGroup?: string; - method?: string; - min?: number | string; - multiple?: boolean; - muted?: boolean; - name?: string; - noValidate?: boolean; - open?: boolean; - optimum?: number; - pattern?: string; - placeholder?: string; - poster?: string; - preload?: string; - radioGroup?: string; - readOnly?: boolean; - rel?: string; - required?: boolean; - role?: string; - rows?: number; - rowSpan?: number; - sandbox?: string; - scope?: string; - scoped?: boolean; - scrolling?: string; - seamless?: boolean; - selected?: boolean; - shape?: string; - size?: number; - sizes?: string; - span?: number; - spellCheck?: boolean; - src?: string; - srcDoc?: string; - srcSet?: string; - start?: number; - step?: number | string; - style?: CSSProperties; - tabIndex?: number; - target?: string; - title?: string; - type?: string; - useMap?: string; - value?: string; - width?: number | string; - wmode?: string; - - // Non-standard Attributes - autoCapitalize?: boolean; - autoCorrect?: boolean; - property?: string; - itemProp?: string; - itemScope?: boolean; - itemType?: string; - unselectable?: boolean; - } - - interface HTMLAttributes extends HTMLAttributesBase { - } - - interface SVGElementAttributes extends HTMLAttributes { - viewBox?: string; - preserveAspectRatio?: string; - } - - interface SVGAttributes extends DOMAttributes { - ref?: string | ((component: SVGComponent) => void); - - cx?: number | string; - cy?: number | string; - d?: string; - dx?: number | string; - dy?: number | string; - fill?: string; - fillOpacity?: number | string; - fontFamily?: string; - fontSize?: number | string; - fx?: number | string; - fy?: number | string; - gradientTransform?: string; - gradientUnits?: string; - height?: number | string; - markerEnd?: string; - markerMid?: string; - markerStart?: string; - offset?: number | string; - opacity?: number | string; - patternContentUnits?: string; - patternUnits?: string; - points?: string; - preserveAspectRatio?: string; - r?: number | string; - rx?: number | string; - ry?: number | string; - spreadMethod?: string; - stopColor?: string; - stopOpacity?: number | string; - stroke?: string; - strokeDasharray?: string; - strokeLinecap?: string; - strokeOpacity?: number | string; - strokeWidth?: number | string; - textAnchor?: string; - transform?: string; - version?: string; - viewBox?: string; - width?: number | string; - x1?: number | string; - x2?: number | string; - x?: number | string; - y1?: number | string; - y2?: number | string - y?: number | string; - } - - // - // React.DOM - // ---------------------------------------------------------------------- - - interface ReactDOM { - // HTML - a: HTMLFactory; - abbr: HTMLFactory; - address: HTMLFactory; - area: HTMLFactory; - article: HTMLFactory; - aside: HTMLFactory; - audio: HTMLFactory; - b: HTMLFactory; - base: HTMLFactory; - bdi: HTMLFactory; - bdo: HTMLFactory; - big: HTMLFactory; - blockquote: HTMLFactory; - body: HTMLFactory; - br: HTMLFactory; - button: HTMLFactory; - canvas: HTMLFactory; - caption: HTMLFactory; - cite: HTMLFactory; - code: HTMLFactory; - col: HTMLFactory; - colgroup: HTMLFactory; - data: HTMLFactory; - datalist: HTMLFactory; - dd: HTMLFactory; - del: HTMLFactory; - details: HTMLFactory; - dfn: HTMLFactory; - dialog: HTMLFactory; - div: HTMLFactory; - dl: HTMLFactory; - dt: HTMLFactory; - em: HTMLFactory; - embed: HTMLFactory; - fieldset: HTMLFactory; - figcaption: HTMLFactory; - figure: HTMLFactory; - footer: HTMLFactory; - form: HTMLFactory; - h1: HTMLFactory; - h2: HTMLFactory; - h3: HTMLFactory; - h4: HTMLFactory; - h5: HTMLFactory; - h6: HTMLFactory; - head: HTMLFactory; - header: HTMLFactory; - hr: HTMLFactory; - html: HTMLFactory; - i: HTMLFactory; - iframe: HTMLFactory; - img: HTMLFactory; - input: HTMLFactory; - ins: HTMLFactory; - kbd: HTMLFactory; - keygen: HTMLFactory; - label: HTMLFactory; - legend: HTMLFactory; - li: HTMLFactory; - link: HTMLFactory; - main: HTMLFactory; - map: HTMLFactory; - mark: HTMLFactory; - menu: HTMLFactory; - menuitem: HTMLFactory; - meta: HTMLFactory; - meter: HTMLFactory; - nav: HTMLFactory; - noscript: HTMLFactory; - object: HTMLFactory; - ol: HTMLFactory; - optgroup: HTMLFactory; - option: HTMLFactory; - output: HTMLFactory; - p: HTMLFactory; - param: HTMLFactory; - picture: HTMLFactory; - pre: HTMLFactory; - progress: HTMLFactory; - q: HTMLFactory; - rp: HTMLFactory; - rt: HTMLFactory; - ruby: HTMLFactory; - s: HTMLFactory; - samp: HTMLFactory; - script: HTMLFactory; - section: HTMLFactory; - select: HTMLFactory; - small: HTMLFactory; - source: HTMLFactory; - span: HTMLFactory; - strong: HTMLFactory; - style: HTMLFactory; - sub: HTMLFactory; - summary: HTMLFactory; - sup: HTMLFactory; - table: HTMLFactory; - tbody: HTMLFactory; - td: HTMLFactory; - textarea: HTMLFactory; - tfoot: HTMLFactory; - th: HTMLFactory; - thead: HTMLFactory; - time: HTMLFactory; - title: HTMLFactory; - tr: HTMLFactory; - track: HTMLFactory; - u: HTMLFactory; - ul: HTMLFactory; - "var": HTMLFactory; - video: HTMLFactory; - wbr: HTMLFactory; - - // SVG - svg: SVGElementFactory; - circle: SVGFactory; - defs: SVGFactory; - ellipse: SVGFactory; - g: SVGFactory; - line: SVGFactory; - linearGradient: SVGFactory; - mask: SVGFactory; - path: SVGFactory; - pattern: SVGFactory; - polygon: SVGFactory; - polyline: SVGFactory; - radialGradient: SVGFactory; - rect: SVGFactory; - stop: SVGFactory; - text: SVGFactory; - tspan: SVGFactory; - } - - // - // React.PropTypes - // ---------------------------------------------------------------------- - - interface Validator { - (object: T, key: string, componentName: string): Error; - } - - interface Requireable extends Validator { - isRequired: Validator; - } - - interface ValidationMap { - [key: string]: Validator; - } - - interface ReactPropTypes { - any: Requireable; - array: Requireable; - bool: Requireable; - func: Requireable; - number: Requireable; - object: Requireable; - string: Requireable; - node: Requireable; - element: Requireable; - instanceOf(expectedClass: {}): Requireable; - oneOf(types: any[]): Requireable; - oneOfType(types: Validator[]): Requireable; - arrayOf(type: Validator): Requireable; - objectOf(type: Validator): Requireable; - shape(type: ValidationMap): Requireable; - } - - // - // React.Children - // ---------------------------------------------------------------------- - - interface ReactChildren { - map(children: ReactNode, fn: (child: ReactChild, index: number) => T): { [key:string]: T }; - forEach(children: ReactNode, fn: (child: ReactChild, index: number) => any): void; - count(children: ReactNode): number; - only(children: ReactNode): ReactChild; - } - - // - // Browser Interfaces - // https://github.com/nikeee/2048-typescript/blob/master/2048/js/touch.d.ts - // ---------------------------------------------------------------------- - - interface AbstractView { - styleMedia: StyleMedia; - document: Document; - } - - interface Touch { - identifier: number; - target: EventTarget; - screenX: number; - screenY: number; - clientX: number; - clientY: number; - pageX: number; - pageY: number; - } - - interface TouchList { - [index: number]: Touch; - length: number; - item(index: number): Touch; - identifiedTouch(identifier: number): Touch; - } - - // - // React.addons - // ---------------------------------------------------------------------- - - export module addons { - export var CSSTransitionGroup: CSSTransitionGroup; - export var TransitionGroup: TransitionGroup; - - export var LinkedStateMixin: LinkedStateMixin; - export var PureRenderMixin: PureRenderMixin; - - export function batchedUpdates( - callback: (a: A, b: B) => any, a: A, b: B): void; - export function batchedUpdates(callback: (a: A) => any, a: A): void; - export function batchedUpdates(callback: () => any): void; - - // deprecated: use petehunt/react-classset or JedWatson/classnames - export function classSet(cx: { [key: string]: boolean }): string; - export function classSet(...classList: string[]): string; - - export function cloneWithProps

( - element: DOMElement

, props: P): DOMElement

; - export function cloneWithProps

( - element: ClassicElement

, props: P): ClassicElement

; - export function cloneWithProps

( - element: ReactElement

, props: P): ReactElement

; - - export function createFragment( - object: { [key: string]: ReactNode }): ReactFragment; - - export function update(value: any[], spec: UpdateArraySpec): any[]; - export function update(value: {}, spec: UpdateSpec): any; - - // Development tools - export import Perf = ReactPerf; - export import TestUtils = ReactTestUtils; - } - - // - // React.addons (Transitions) - // ---------------------------------------------------------------------- - - interface TransitionGroupProps { - component?: ReactType; - childFactory?: (child: ReactElement) => ReactElement; - } - - interface CSSTransitionGroupProps extends TransitionGroupProps { - transitionName: string; - transitionAppear?: boolean; - transitionEnter?: boolean; - transitionLeave?: boolean; - } - - type CSSTransitionGroup = ComponentClass; - type TransitionGroup = ComponentClass; - - // - // React.addons (Mixins) - // ---------------------------------------------------------------------- - - interface ReactLink { - value: T; - requestChange(newValue: T): void; - } - - interface LinkedStateMixin extends Mixin { - linkState(key: string): ReactLink; - } - - interface PureRenderMixin extends Mixin { - } - - // - // Reat.addons.update - // ---------------------------------------------------------------------- - - interface UpdateSpec { - $set?: any; - $merge?: {}; - $apply?(value: any): any; - // [key: string]: UpdateSpec; - } - - interface UpdateArraySpec extends UpdateSpec { - $push?: any[]; - $unshift?: any[]; - $splice?: any[][]; - } - - // - // React.addons.Perf - // ---------------------------------------------------------------------- - - interface ComponentPerfContext { - current: string; - owner: string; - } - - interface NumericPerfContext { - [key: string]: number; - } - - interface Measurements { - exclusive: NumericPerfContext; - inclusive: NumericPerfContext; - render: NumericPerfContext; - counts: NumericPerfContext; - writes: NumericPerfContext; - displayNames: { - [key: string]: ComponentPerfContext; - }; - totalTime: number; - } - - module ReactPerf { - export function start(): void; - export function stop(): void; - export function printInclusive(measurements: Measurements[]): void; - export function printExclusive(measurements: Measurements[]): void; - export function printWasted(measurements: Measurements[]): void; - export function printDOM(measurements: Measurements[]): void; - export function getLastMeasurements(): Measurements[]; - } - - // - // React.addons.TestUtils - // ---------------------------------------------------------------------- - - interface MockedComponentClass { - new(): any; - } - - module ReactTestUtils { - export import Simulate = ReactSimulate; - - export function renderIntoDocument

( - element: ReactElement

): Component; - export function renderIntoDocument>( - element: ReactElement): C; - - export function mockComponent( - mocked: MockedComponentClass, mockTagName?: string): typeof ReactTestUtils; - - export function isElementOfType( - element: ReactElement, type: ReactType): boolean; - export function isTextComponent(instance: Component): boolean; - export function isDOMComponent(instance: Component): boolean; - export function isCompositeComponent(instance: Component): boolean; - export function isCompositeComponentWithType( - instance: Component, - type: ComponentClass): boolean; - - export function findAllInRenderedTree( - tree: Component, - fn: (i: Component) => boolean): Component; - - export function scryRenderedDOMComponentsWithClass( - tree: Component, - className: string): DOMComponent[]; - export function findRenderedDOMComponentWithClass( - tree: Component, - className: string): DOMComponent; - - export function scryRenderedDOMComponentsWithTag( - tree: Component, - tagName: string): DOMComponent[]; - export function findRenderedDOMComponentWithTag( - tree: Component, - tagName: string): DOMComponent; - - export function scryRenderedComponentsWithType

( - tree: Component, - type: ComponentClass

): Component[]; - export function scryRenderedComponentsWithType>( - tree: Component, - type: ComponentClass): C[]; - - export function findRenderedComponentWithType

( - tree: Component, - type: ComponentClass

): Component; - export function findRenderedComponentWithType>( - tree: Component, - type: ComponentClass): C; - - export function createRenderer(): ShallowRenderer; - } - - interface SyntheticEventData { - altKey?: boolean; - button?: number; - buttons?: number; - clientX?: number; - clientY?: number; - changedTouches?: TouchList; - charCode?: boolean; - clipboardData?: DataTransfer; - ctrlKey?: boolean; - deltaMode?: number; - deltaX?: number; - deltaY?: number; - deltaZ?: number; - detail?: number; - getModifierState?(key: string): boolean; - key?: string; - keyCode?: number; - locale?: string; - location?: number; - metaKey?: boolean; - pageX?: number; - pageY?: number; - relatedTarget?: EventTarget; - repeat?: boolean; - screenX?: number; - screenY?: number; - shiftKey?: boolean; - targetTouches?: TouchList; - touches?: TouchList; - view?: AbstractView; - which?: number; - } - - interface EventSimulator { - (element: Element, eventData?: SyntheticEventData): void; - (component: Component, eventData?: SyntheticEventData): void; - } - - module ReactSimulate { - export var blur: EventSimulator; - export var change: EventSimulator; - export var click: EventSimulator; - export var cut: EventSimulator; - export var doubleClick: EventSimulator; - export var drag: EventSimulator; - export var dragEnd: EventSimulator; - export var dragEnter: EventSimulator; - export var dragExit: EventSimulator; - export var dragLeave: EventSimulator; - export var dragOver: EventSimulator; - export var dragStart: EventSimulator; - export var drop: EventSimulator; - export var focus: EventSimulator; - export var input: EventSimulator; - export var keyDown: EventSimulator; - export var keyPress: EventSimulator; - export var keyUp: EventSimulator; - export var mouseDown: EventSimulator; - export var mouseEnter: EventSimulator; - export var mouseLeave: EventSimulator; - export var mouseMove: EventSimulator; - export var mouseOut: EventSimulator; - export var mouseOver: EventSimulator; - export var mouseUp: EventSimulator; - export var paste: EventSimulator; - export var scroll: EventSimulator; - export var submit: EventSimulator; - export var touchCancel: EventSimulator; - export var touchEnd: EventSimulator; - export var touchMove: EventSimulator; - export var touchStart: EventSimulator; - export var wheel: EventSimulator; - } - - class ShallowRenderer { - getRenderOutput>(): E; - getRenderOutput(): ReactElement; - render(element: ReactElement, context?: any): void; - unmount(): void; - } -} - -declare namespace JSX { - import React = __React; - - interface Element extends React.ReactElement { } - interface ElementClass extends React.Component { - render(): JSX.Element; - } - interface ElementAttributesProperty { props: {}; } - - interface IntrinsicElements { - // HTML - a: React.HTMLAttributes; - abbr: React.HTMLAttributes; - address: React.HTMLAttributes; - area: React.HTMLAttributes; - article: React.HTMLAttributes; - aside: React.HTMLAttributes; - audio: React.HTMLAttributes; - b: React.HTMLAttributes; - base: React.HTMLAttributes; - bdi: React.HTMLAttributes; - bdo: React.HTMLAttributes; - big: React.HTMLAttributes; - blockquote: React.HTMLAttributes; - body: React.HTMLAttributes; - br: React.HTMLAttributes; - button: React.HTMLAttributes; - canvas: React.HTMLAttributes; - caption: React.HTMLAttributes; - cite: React.HTMLAttributes; - code: React.HTMLAttributes; - col: React.HTMLAttributes; - colgroup: React.HTMLAttributes; - data: React.HTMLAttributes; - datalist: React.HTMLAttributes; - dd: React.HTMLAttributes; - del: React.HTMLAttributes; - details: React.HTMLAttributes; - dfn: React.HTMLAttributes; - dialog: React.HTMLAttributes; - div: React.HTMLAttributes; - dl: React.HTMLAttributes; - dt: React.HTMLAttributes; - em: React.HTMLAttributes; - embed: React.HTMLAttributes; - fieldset: React.HTMLAttributes; - figcaption: React.HTMLAttributes; - figure: React.HTMLAttributes; - footer: React.HTMLAttributes; - form: React.HTMLAttributes; - h1: React.HTMLAttributes; - h2: React.HTMLAttributes; - h3: React.HTMLAttributes; - h4: React.HTMLAttributes; - h5: React.HTMLAttributes; - h6: React.HTMLAttributes; - head: React.HTMLAttributes; - header: React.HTMLAttributes; - hr: React.HTMLAttributes; - html: React.HTMLAttributes; - i: React.HTMLAttributes; - iframe: React.HTMLAttributes; - img: React.HTMLAttributes; - input: React.HTMLAttributes; - ins: React.HTMLAttributes; - kbd: React.HTMLAttributes; - keygen: React.HTMLAttributes; - label: React.HTMLAttributes; - legend: React.HTMLAttributes; - li: React.HTMLAttributes; - link: React.HTMLAttributes; - main: React.HTMLAttributes; - map: React.HTMLAttributes; - mark: React.HTMLAttributes; - menu: React.HTMLAttributes; - menuitem: React.HTMLAttributes; - meta: React.HTMLAttributes; - meter: React.HTMLAttributes; - nav: React.HTMLAttributes; - noscript: React.HTMLAttributes; - object: React.HTMLAttributes; - ol: React.HTMLAttributes; - optgroup: React.HTMLAttributes; - option: React.HTMLAttributes; - output: React.HTMLAttributes; - p: React.HTMLAttributes; - param: React.HTMLAttributes; - picture: React.HTMLAttributes; - pre: React.HTMLAttributes; - progress: React.HTMLAttributes; - q: React.HTMLAttributes; - rp: React.HTMLAttributes; - rt: React.HTMLAttributes; - ruby: React.HTMLAttributes; - s: React.HTMLAttributes; - samp: React.HTMLAttributes; - script: React.HTMLAttributes; - section: React.HTMLAttributes; - select: React.HTMLAttributes; - small: React.HTMLAttributes; - source: React.HTMLAttributes; - span: React.HTMLAttributes; - strong: React.HTMLAttributes; - style: React.HTMLAttributes; - sub: React.HTMLAttributes; - summary: React.HTMLAttributes; - sup: React.HTMLAttributes; - table: React.HTMLAttributes; - tbody: React.HTMLAttributes; - td: React.HTMLAttributes; - textarea: React.HTMLAttributes; - tfoot: React.HTMLAttributes; - th: React.HTMLAttributes; - thead: React.HTMLAttributes; - time: React.HTMLAttributes; - title: React.HTMLAttributes; - tr: React.HTMLAttributes; - track: React.HTMLAttributes; - u: React.HTMLAttributes; - ul: React.HTMLAttributes; - "var": React.HTMLAttributes; - video: React.HTMLAttributes; - wbr: React.HTMLAttributes; - - // SVG - svg: React.SVGElementAttributes; - - circle: React.SVGAttributes; - defs: React.SVGAttributes; - ellipse: React.SVGAttributes; - g: React.SVGAttributes; - line: React.SVGAttributes; - linearGradient: React.SVGAttributes; - mask: React.SVGAttributes; - path: React.SVGAttributes; - pattern: React.SVGAttributes; - polygon: React.SVGAttributes; - polyline: React.SVGAttributes; - radialGradient: React.SVGAttributes; - rect: React.SVGAttributes; - stop: React.SVGAttributes; - text: React.SVGAttributes; - tspan: React.SVGAttributes; - } -} \ No newline at end of file diff --git a/src/test/converter/react/react.tsx b/src/test/converter/react/react.tsx index 966595ed1..9124e2674 100644 --- a/src/test/converter/react/react.tsx +++ b/src/test/converter/react/react.tsx @@ -1,25 +1,17 @@ -/// - -import * as React from "react"; - +declare const React: unknown; interface DemoProps { - name:string; - age:number; + name: string; + age: number; } +class Demo { + private foo: number; -class Demo extends React.Component -{ - private foo:number; - - - constructor(props:DemoProps) { - super(props); + constructor(props: DemoProps) { this.foo = 42; } - render() { return (

diff --git a/src/test/converter/react/specs.json b/src/test/converter/react/specs.json index 02aee7115..d20d42793 100644 --- a/src/test/converter/react/specs.json +++ b/src/test/converter/react/specs.json @@ -19,28 +19,36 @@ "name": "Demo", "kind": 128, "kindString": "Class", - "flags": {}, + "flags": { + "isExported": true + }, "children": [ { "id": 7, "name": "constructor", "kind": 512, "kindString": "Constructor", - "flags": {}, + "flags": { + "isExported": true + }, "signatures": [ { "id": 8, "name": "new Demo", "kind": 16384, "kindString": "Constructor signature", - "flags": {}, + "flags": { + "isExported": true + }, "parameters": [ { "id": 9, "name": "props", "kind": 32768, "kindString": "Parameter", - "flags": {}, + "flags": { + "isExported": true + }, "type": { "type": "reference", "id": 2, @@ -52,48 +60,16 @@ "type": "reference", "id": 5, "name": "Demo" - }, - "overwrites": { - "type": "reference", - "name": "Component.__constructor" } } ], "sources": [ { "fileName": "react.tsx", - "line": 14, - "character": 23 - } - ], - "overwrites": { - "type": "reference", - "name": "Component.__constructor" - } - }, - { - "id": 34, - "name": "context", - "kind": 1024, - "kindString": "Property", - "flags": {}, - "sources": [ - { - "fileName": "react.d.ts", - "line": 142, - "character": 15 + "line": 9, + "character": 24 } - ], - "type": { - "type": "reference", - "id": 15, - "name": "__type" - }, - "inheritedFrom": { - "type": "reference", - "id": 34, - "name": "Component.context" - } + ] }, { "id": 6, @@ -101,12 +77,13 @@ "kind": 1024, "kindString": "Property", "flags": { - "isPrivate": true + "isPrivate": true, + "isExported": true }, "sources": [ { "fileName": "react.tsx", - "line": 14, + "line": 9, "character": 15 } ], @@ -115,450 +92,36 @@ "name": "number" } }, - { - "id": 32, - "name": "props", - "kind": 1024, - "kindString": "Property", - "flags": {}, - "sources": [ - { - "fileName": "react.d.ts", - "line": 140, - "character": 13 - } - ], - "type": { - "type": "reference", - "id": 2, - "name": "DemoProps" - }, - "inheritedFrom": { - "type": "reference", - "id": 32, - "name": "Component.props" - } - }, - { - "id": 35, - "name": "refs", - "kind": 1024, - "kindString": "Property", - "flags": {}, - "sources": [ - { - "fileName": "react.d.ts", - "line": 143, - "character": 12 - } - ], - "type": { - "type": "reflection", - "declaration": { - "id": 36, - "name": "__type", - "kind": 65536, - "kindString": "Type literal", - "flags": {}, - "indexSignature": [ - { - "id": 37, - "name": "__index", - "kind": 8192, - "kindString": "Index signature", - "flags": {}, - "parameters": [ - { - "id": 38, - "name": "key", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "typeArguments": [ - { - "type": "intrinsic", - "name": "any" - }, - { - "type": "intrinsic", - "name": "any" - } - ], - "name": "Component" - } - } - ], - "sources": [ - { - "fileName": "react.d.ts", - "line": 143, - "character": 13 - } - ] - } - }, - "inheritedFrom": { - "type": "reference", - "id": 35, - "name": "Component.refs" - } - }, - { - "id": 33, - "name": "state", - "kind": 1024, - "kindString": "Property", - "flags": {}, - "sources": [ - { - "fileName": "react.d.ts", - "line": 141, - "character": 13 - } - ], - "type": { - "type": "intrinsic", - "name": "any" - }, - "inheritedFrom": { - "type": "reference", - "id": 33, - "name": "Component.state" - } - }, - { - "id": 27, - "name": "forceUpdate", - "kind": 2048, - "kindString": "Method", - "flags": {}, - "signatures": [ - { - "id": 28, - "name": "forceUpdate", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 29, - "name": "callBack", - "kind": 32768, - "kindString": "Parameter", - "flags": { - "isOptional": true - }, - "type": { - "type": "reflection", - "declaration": { - "id": 30, - "name": "__type", - "kind": 65536, - "kindString": "Type literal", - "flags": {}, - "signatures": [ - { - "id": 31, - "name": "__call", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "any" - } - } - ], - "sources": [ - { - "fileName": "react.d.ts", - "line": 138, - "character": 30 - } - ] - } - } - } - ], - "type": { - "type": "intrinsic", - "name": "void" - }, - "inheritedFrom": { - "type": "reference", - "id": 27, - "name": "Component.forceUpdate" - } - } - ], - "sources": [ - { - "fileName": "react.d.ts", - "line": 138, - "character": 19 - } - ], - "inheritedFrom": { - "type": "reference", - "id": 27, - "name": "Component.forceUpdate" - } - }, { "id": 10, "name": "render", "kind": 2048, "kindString": "Method", - "flags": {}, + "flags": { + "isExported": true + }, "signatures": [ { "id": 11, "name": "render", "kind": 4096, "kindString": "Call signature", - "flags": {}, - "type": { - "type": "reference", - "name": "Element" + "flags": { + "isExported": true }, - "overwrites": { - "type": "reference", - "name": "Component.render" - } - } - ], - "sources": [ - { - "fileName": "react.tsx", - "line": 23, - "character": 10 - } - ], - "overwrites": { - "type": "reference", - "name": "Component.render" - } - }, - { - "id": 12, - "name": "setState", - "kind": 2048, - "kindString": "Method", - "flags": {}, - "signatures": [ - { - "id": 13, - "name": "setState", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 14, - "name": "f", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "reflection", - "declaration": { - "id": 15, - "name": "__type", - "kind": 65536, - "kindString": "Type literal", - "flags": {}, - "signatures": [ - { - "id": 16, - "name": "__call", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 17, - "name": "prevState", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "any" - } - }, - { - "id": 18, - "name": "props", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "reference", - "id": 2, - "name": "DemoProps" - } - } - ], - "type": { - "type": "intrinsic", - "name": "any" - } - } - ], - "sources": [ - { - "fileName": "react.d.ts", - "line": 136, - "character": 19 - } - ] - } - } - }, - { - "id": 19, - "name": "callback", - "kind": 32768, - "kindString": "Parameter", - "flags": { - "isOptional": true - }, - "type": { - "type": "reflection", - "declaration": { - "id": 20, - "name": "__type", - "kind": 65536, - "kindString": "Type literal", - "flags": {}, - "signatures": [ - { - "id": 21, - "name": "__call", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "any" - } - } - ], - "sources": [ - { - "fileName": "react.d.ts", - "line": 136, - "character": 61 - } - ] - } - } - } - ], "type": { "type": "intrinsic", - "name": "void" - }, - "inheritedFrom": { - "type": "reference", - "id": 12, - "name": "Component.setState" - } - }, - { - "id": 22, - "name": "setState", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 23, - "name": "state", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "any" - } - }, - { - "id": 24, - "name": "callback", - "kind": 32768, - "kindString": "Parameter", - "flags": { - "isOptional": true - }, - "type": { - "type": "reflection", - "declaration": { - "id": 25, - "name": "__type", - "kind": 65536, - "kindString": "Type literal", - "flags": {}, - "signatures": [ - { - "id": 26, - "name": "__call", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "any" - } - } - ], - "sources": [ - { - "fileName": "react.d.ts", - "line": 137, - "character": 37 - } - ] - } - } - } - ], - "type": { - "type": "intrinsic", - "name": "void" - }, - "inheritedFrom": { - "type": "reference", - "id": 12, - "name": "Component.setState" + "name": "any" } } ], "sources": [ { - "fileName": "react.d.ts", - "line": 136, - "character": 16 - }, - { - "fileName": "react.d.ts", - "line": 137, - "character": 16 + "fileName": "react.tsx", + "line": 15, + "character": 10 } - ], - "inheritedFrom": { - "type": "reference", - "id": 12, - "name": "Component.setState" - } + ] } ], "groups": [ @@ -573,46 +136,23 @@ "title": "Properties", "kind": 1024, "children": [ - 34, - 6, - 32, - 35, - 33 + 6 ] }, { "title": "Methods", "kind": 2048, "children": [ - 27, - 10, - 12 + 10 ] } ], "sources": [ { "fileName": "react.tsx", - "line": 12, + "line": 8, "character": 10 } - ], - "extendedTypes": [ - { - "type": "reference", - "typeArguments": [ - { - "type": "reference", - "id": 2, - "name": "DemoProps" - }, - { - "type": "intrinsic", - "name": "any" - } - ], - "name": "Component" - } ] }, { @@ -620,18 +160,22 @@ "name": "DemoProps", "kind": 256, "kindString": "Interface", - "flags": {}, + "flags": { + "isExported": true + }, "children": [ { "id": 4, "name": "age", "kind": 1024, "kindString": "Property", - "flags": {}, + "flags": { + "isExported": true + }, "sources": [ { "fileName": "react.tsx", - "line": 8, + "line": 5, "character": 7 } ], @@ -645,11 +189,13 @@ "name": "name", "kind": 1024, "kindString": "Property", - "flags": {}, + "flags": { + "isExported": true + }, "sources": [ { "fileName": "react.tsx", - "line": 7, + "line": 4, "character": 8 } ], @@ -672,10 +218,31 @@ "sources": [ { "fileName": "react.tsx", - "line": 6, + "line": 3, "character": 19 } ] + }, + { + "id": 12, + "name": "React", + "kind": 32, + "kindString": "Variable", + "flags": { + "isExported": true, + "isConst": true + }, + "sources": [ + { + "fileName": "react.tsx", + "line": 1, + "character": 19 + } + ], + "type": { + "type": "intrinsic", + "name": "unknown" + } } ], "groups": [ @@ -692,6 +259,13 @@ "children": [ 2 ] + }, + { + "title": "Variables", + "kind": 32, + "children": [ + 12 + ] } ], "sources": [ diff --git a/src/test/converter/this/specs.json b/src/test/converter/this/specs.json deleted file mode 100644 index c47110c47..000000000 --- a/src/test/converter/this/specs.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "id": 0, - "name": "typedoc", - "kind": 0, - "flags": {}, - "children": [ - { - "id": 1, - "name": "\"this\"", - "kind": 1, - "kindString": "External module", - "flags": { - "isExported": true - }, - "originalName": "%BASE%/this/this.ts", - "children": [ - { - "id": 2, - "name": "ChainClass", - "kind": 128, - "kindString": "Class", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "ChainClass comment short text.", - "text": "ChainClass comment text.\n" - }, - "children": [ - { - "id": 3, - "name": "chain", - "kind": 2048, - "kindString": "Method", - "flags": { - "isPublic": true, - "isExported": true - }, - "signatures": [ - { - "id": 4, - "name": "chain", - "kind": 4096, - "kindString": "Call signature", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "Chain method that returns this." - }, - "type": { - "type": "intrinsic", - "name": "this" - } - } - ], - "sources": [ - { - "fileName": "this.ts", - "line": 11, - "character": 13 - } - ] - } - ], - "groups": [ - { - "title": "Methods", - "kind": 2048, - "children": [ - 3 - ] - } - ], - "sources": [ - { - "fileName": "this.ts", - "line": 6, - "character": 23 - } - ] - } - ], - "groups": [ - { - "title": "Classes", - "kind": 128, - "children": [ - 2 - ] - } - ], - "sources": [ - { - "fileName": "this.ts", - "line": 1, - "character": 0 - } - ] - } - ], - "groups": [ - { - "title": "External modules", - "kind": 1, - "children": [ - 1 - ] - } - ] -} \ No newline at end of file diff --git a/src/test/converter/this/this.ts b/src/test/converter/this/this.ts deleted file mode 100644 index 2bd1b5bdb..000000000 --- a/src/test/converter/this/this.ts +++ /dev/null @@ -1,15 +0,0 @@ -/** - * ChainClass comment short text. - * - * ChainClass comment text. - */ -export class ChainClass -{ - /** - * Chain method that returns this. - */ - public chain(): this - { - return this; - } -} diff --git a/src/test/converter/type-operator/specs.json b/src/test/converter/type-operator/specs.json deleted file mode 100644 index 355a21f49..000000000 --- a/src/test/converter/type-operator/specs.json +++ /dev/null @@ -1,200 +0,0 @@ -{ - "id": 0, - "name": "typedoc", - "kind": 0, - "flags": {}, - "children": [ - { - "id": 1, - "name": "\"type-operator\"", - "kind": 1, - "kindString": "External module", - "flags": { - "isExported": true - }, - "originalName": "%BASE%/type-operator/type-operator.ts", - "children": [ - { - "id": 5, - "name": "GenericClass", - "kind": 128, - "kindString": "Class", - "flags": { - "isExported": true - }, - "typeParameter": [ - { - "id": 6, - "name": "T", - "kind": 131072, - "kindString": "Type parameter", - "flags": { - "isExported": true - }, - "type": { - "type": "typeOperator", - "operator": "keyof", - "target": { - "id": 2, - "type": "reference", - "name": "TestClass" - } - } - } - ], - "children": [ - { - "id": 7, - "name": "c", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "type-operator.ts", - "line": 14, - "character": 5 - } - ], - "type": { - "type": "typeParameter", - "name": "T", - "constraint": { - "type": "typeOperator", - "operator": "keyof", - "target": { - "id": 2, - "type": "reference", - "name": "TestClass" - } - } - } - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [ - 7 - ] - } - ], - "sources": [ - { - "fileName": "type-operator.ts", - "line": 13, - "character": 25 - } - ] - }, - { - "id": 2, - "name": "TestClass", - "kind": 128, - "kindString": "Class", - "flags": { - "isExported": true - }, - "comment": { - "shortText": "TestClass comment short text.", - "text": "TestClass comment text.\n", - "tags": [ - { - "tag": "see", - "text": "[[TestClass]] @ fixtures\n" - } - ] - }, - "children": [ - { - "id": 3, - "name": "a", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "type-operator.ts", - "line": 9, - "character": 5 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 4, - "name": "b", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "type-operator.ts", - "line": 10, - "character": 5 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [ - 3, - 4 - ] - } - ], - "sources": [ - { - "fileName": "type-operator.ts", - "line": 8, - "character": 22 - } - ] - } - ], - "groups": [ - { - "title": "Classes", - "kind": 128, - "children": [ - 5, - 2 - ] - } - ], - "sources": [ - { - "fileName": "type-operator.ts", - "line": 1, - "character": 0 - } - ] - } - ], - "groups": [ - { - "title": "External modules", - "kind": 1, - "children": [ - 1 - ] - } - ] -} diff --git a/src/test/converter/union-or-intersection/specs.json b/src/test/converter/types/specs.json similarity index 90% rename from src/test/converter/union-or-intersection/specs.json rename to src/test/converter/types/specs.json index 2e407f988..5bdded4ce 100644 --- a/src/test/converter/union-or-intersection/specs.json +++ b/src/test/converter/types/specs.json @@ -12,7 +12,7 @@ "flags": { "isExported": true }, - "originalName": "%BASE%/union-or-intersection/union-or-intersection.ts", + "originalName": "%BASE%/types/union-or-intersection.ts", "children": [ { "id": 2, @@ -40,7 +40,7 @@ "sources": [ { "fileName": "union-or-intersection.ts", - "line": 9, + "line": 8, "character": 17 } ], @@ -93,7 +93,7 @@ "sources": [ { "fileName": "union-or-intersection.ts", - "line": 20, + "line": 18, "character": 18 } ], @@ -115,7 +115,7 @@ "sources": [ { "fileName": "union-or-intersection.ts", - "line": 15, + "line": 14, "character": 27 } ] @@ -146,7 +146,7 @@ "sources": [ { "fileName": "union-or-intersection.ts", - "line": 41, + "line": 38, "character": 24 } ], @@ -166,13 +166,13 @@ "types": [ { "type": "reference", - "name": "FirstType", - "id": 2 + "id": 2, + "name": "FirstType" }, { "type": "reference", - "name": "SecondType", - "id": 4 + "id": 4, + "name": "SecondType" } ] } @@ -195,7 +195,7 @@ "sources": [ { "fileName": "union-or-intersection.ts", - "line": 36, + "line": 33, "character": 29 } ], @@ -204,13 +204,13 @@ "types": [ { "type": "reference", - "name": "FirstType", - "id": 2 + "id": 2, + "name": "FirstType" }, { "type": "reference", - "name": "ThirdType", - "id": 6 + "id": 6, + "name": "ThirdType" } ] } @@ -229,7 +229,7 @@ "sources": [ { "fileName": "union-or-intersection.ts", - "line": 31, + "line": 28, "character": 22 } ], @@ -238,13 +238,13 @@ "types": [ { "type": "reference", - "name": "FirstType", - "id": 2 + "id": 2, + "name": "FirstType" }, { "type": "reference", - "name": "SecondType", - "id": 4 + "id": 4, + "name": "SecondType" } ] } @@ -264,7 +264,7 @@ "sources": [ { "fileName": "union-or-intersection.ts", - "line": 26, + "line": 24, "character": 26 } ] diff --git a/src/test/converter/union-or-intersection/union-or-intersection.ts b/src/test/converter/types/union-or-intersection.ts similarity index 88% rename from src/test/converter/union-or-intersection/union-or-intersection.ts rename to src/test/converter/types/union-or-intersection.ts index 6e521577f..d637ec7c6 100644 --- a/src/test/converter/union-or-intersection/union-or-intersection.ts +++ b/src/test/converter/types/union-or-intersection.ts @@ -1,8 +1,7 @@ /** * First type for union or intersection type tests. */ -export interface FirstType -{ +export interface FirstType { /** * Property of first type. */ @@ -12,8 +11,7 @@ export interface FirstType /** * Second type for union or intersection type tests. */ -export interface SecondType -{ +export interface SecondType { /** * Property of second type. */ @@ -23,8 +21,7 @@ export interface SecondType /** * Third type for union or intersection type tests. */ -export interface ThirdType -{ +export interface ThirdType { /** * Union Property of third type. */ diff --git a/src/test/converter/variable/specs.json b/src/test/converter/variable/specs.json deleted file mode 100644 index 793b1c733..000000000 --- a/src/test/converter/variable/specs.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "id": 0, - "name": "typedoc", - "kind": 0, - "flags": {}, - "children": [ - { - "id": 1, - "name": "\"variable\"", - "kind": 1, - "kindString": "External module", - "flags": { - "isExported": true - }, - "originalName": "%BASE%/variable/variable.ts", - "children": [ - { - "id": 2, - "name": "myConst", - "kind": 32, - "kindString": "Variable", - "flags": { - "isExported": true, - "isConst": true - }, - "sources": [ - { - "fileName": "variable.ts", - "line": 1, - "character": 20 - } - ], - "type": { - "type": "unknown", - "name": "15" - }, - "defaultValue": "15" - }, - { - "id": 3, - "name": "myLet", - "kind": 32, - "kindString": "Variable", - "flags": { - "isExported": true, - "isLet": true - }, - "sources": [ - { - "fileName": "variable.ts", - "line": 2, - "character": 16 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "15" - }, - { - "id": 4, - "name": "myVar", - "kind": 32, - "kindString": "Variable", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "variable.ts", - "line": 3, - "character": 16 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - }, - "defaultValue": "15" - } - ], - "groups": [ - { - "title": "Variables", - "kind": 32, - "children": [ - 2, - 3, - 4 - ] - } - ], - "sources": [ - { - "fileName": "variable.ts", - "line": 1, - "character": 0 - } - ] - } - ], - "groups": [ - { - "title": "External modules", - "kind": 1, - "children": [ - 1 - ] - } - ] -} \ No newline at end of file diff --git a/src/test/converter/variable/variable.ts b/src/test/converter/variable/variable.ts deleted file mode 100644 index 1ff86660d..000000000 --- a/src/test/converter/variable/variable.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const myConst = 15; -export let myLet = 15; -export var myVar = 15; diff --git a/src/test/converter/array/array.ts b/src/test/converter/variables/array.ts similarity index 100% rename from src/test/converter/array/array.ts rename to src/test/converter/variables/array.ts diff --git a/src/test/converter/destructuring/destructuring.ts b/src/test/converter/variables/destructuring.ts similarity index 100% rename from src/test/converter/destructuring/destructuring.ts rename to src/test/converter/variables/destructuring.ts diff --git a/src/test/converter/variables/literal.ts b/src/test/converter/variables/literal.ts new file mode 100644 index 000000000..5aaba21ec --- /dev/null +++ b/src/test/converter/variables/literal.ts @@ -0,0 +1,50 @@ +/** + * An object literal. + */ +const objectLiteral = { + valueZ: 'foo', + valueY: function() { return 'foo'; }, + valueX: { + valueZ: 'foo', + valueY: (z: string) => { return {a: 'test', b: z}; }, + valueA: [100, 200, 300] + }, + valueA: 100, + valueB: true +}; + +/** + * A typed literal without an initializer. + */ +let typeLiteral: { + valueZ: string; + valueY: {(): string; }; + valueX: { + valueZ: string; + valueY: {(z: string): {a: string; b: string}; }; + valueA: number[]; + }; + valueA?: number; + valueB?: boolean; +}; + +let onSuccess: any = function () { }; +let onError: any = function () { }; +let onFinally: any = function () { }; + +const callbackReturn = { + success: (successCallback: () => any) => { + onSuccess = successCallback; + return callbackReturn; + }, + error: (errorCallback: () => any) => { + onError = errorCallback; + return callbackReturn; + }, + finally: (finallyCallback: () => any) => { + onFinally = finallyCallback; + return callbackReturn; + } +}; + +export { objectLiteral }; diff --git a/src/test/converter/array/specs.json b/src/test/converter/variables/specs.json similarity index 76% rename from src/test/converter/array/specs.json rename to src/test/converter/variables/specs.json index 9cb0422f2..2a03592cc 100644 --- a/src/test/converter/array/specs.json +++ b/src/test/converter/variables/specs.json @@ -12,7 +12,7 @@ "flags": { "isExported": true }, - "originalName": "%BASE%/array/array.ts", + "originalName": "%BASE%/variables/array.ts", "children": [ { "id": 4, @@ -27,7 +27,7 @@ }, "sources": [ { - "fileName": "dist/test/converter/array/array.ts", + "fileName": "dist/test/converter/variables/array.ts", "line": 20, "character": 16 } @@ -4386,7 +4386,7 @@ ], "sources": [ { - "fileName": "dist/test/converter/array/array.ts", + "fileName": "dist/test/converter/variables/array.ts", "line": 25, "character": 20 } @@ -4430,7 +4430,7 @@ ], "sources": [ { - "fileName": "dist/test/converter/array/array.ts", + "fileName": "dist/test/converter/variables/array.ts", "line": 4, "character": 22 } @@ -4450,7 +4450,7 @@ }, "sources": [ { - "fileName": "dist/test/converter/array/array.ts", + "fileName": "dist/test/converter/variables/array.ts", "line": 10, "character": 20 } @@ -4515,7 +4515,7 @@ }, "sources": [ { - "fileName": "dist/test/converter/array/array.ts", + "fileName": "dist/test/converter/variables/array.ts", "line": 15, "character": 19 } @@ -4560,7 +4560,1641 @@ ], "sources": [ { - "fileName": "dist/test/converter/array/array.ts", + "fileName": "dist/test/converter/variables/array.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 234, + "name": "\"destructuring\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/variables/destructuring.ts", + "children": [ + { + "id": 238, + "name": "destructArrayA", + "kind": 32, + "kindString": "Variable", + "flags": {}, + "sources": [ + { + "fileName": "dist/test/converter/variables/destructuring.ts", + "line": 9, + "character": 21 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 239, + "name": "destructArrayB", + "kind": 32, + "kindString": "Variable", + "flags": {}, + "sources": [ + { + "fileName": "dist/test/converter/variables/destructuring.ts", + "line": 9, + "character": 37 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 240, + "name": "destructArrayC", + "kind": 32, + "kindString": "Variable", + "flags": {}, + "sources": [ + { + "fileName": "dist/test/converter/variables/destructuring.ts", + "line": 9, + "character": 53 + } + ], + "type": { + "type": "union", + "types": [ + { + "type": "unknown", + "name": "0" + }, + { + "type": "unknown", + "name": "10" + } + ] + }, + "defaultValue": "10" + }, + { + "id": 244, + "name": "destructArrayWithIgnoresA", + "kind": 32, + "kindString": "Variable", + "flags": {}, + "sources": [ + { + "fileName": "dist/test/converter/variables/destructuring.ts", + "line": 19, + "character": 32 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 245, + "name": "destructArrayWithIgnoresRest", + "kind": 32, + "kindString": "Variable", + "flags": {}, + "sources": [ + { + "fileName": "dist/test/converter/variables/destructuring.ts", + "line": 19, + "character": 67 + } + ], + "type": { + "type": "tuple", + "elements": [ + { + "type": "intrinsic", + "name": "number" + }, + { + "type": "intrinsic", + "name": "number" + } + ] + } + }, + { + "id": 243, + "name": "destructArrayWithRest", + "kind": 32, + "kindString": "Variable", + "flags": {}, + "sources": [ + { + "fileName": "dist/test/converter/variables/destructuring.ts", + "line": 14, + "character": 79 + } + ], + "type": { + "type": "tuple", + "elements": [ + { + "type": "intrinsic", + "name": "number" + }, + { + "type": "intrinsic", + "name": "number" + } + ] + } + }, + { + "id": 241, + "name": "destructArrayWithRestA", + "kind": 32, + "kindString": "Variable", + "flags": {}, + "sources": [ + { + "fileName": "dist/test/converter/variables/destructuring.ts", + "line": 14, + "character": 29 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 242, + "name": "destructArrayWithRestB", + "kind": 32, + "kindString": "Variable", + "flags": {}, + "sources": [ + { + "fileName": "dist/test/converter/variables/destructuring.ts", + "line": 14, + "character": 53 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 235, + "name": "destructObjectA", + "kind": 32, + "kindString": "Variable", + "flags": {}, + "sources": [ + { + "fileName": "dist/test/converter/variables/destructuring.ts", + "line": 4, + "character": 22 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 236, + "name": "destructObjectB", + "kind": 32, + "kindString": "Variable", + "flags": {}, + "sources": [ + { + "fileName": "dist/test/converter/variables/destructuring.ts", + "line": 4, + "character": 39 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 237, + "name": "destructObjectC", + "kind": 32, + "kindString": "Variable", + "flags": {}, + "sources": [ + { + "fileName": "dist/test/converter/variables/destructuring.ts", + "line": 4, + "character": 56 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 246, + "name": "drawText", + "kind": 64, + "kindString": "Function", + "flags": {}, + "signatures": [ + { + "id": 247, + "name": "drawText", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "shortText": "Destructuring function parameters." + }, + "parameters": [ + { + "id": 248, + "name": "__namedParameters", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "originalName": "__0", + "type": { + "type": "reflection", + "declaration": { + "id": 249, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 252, + "name": "bold", + "kind": 32, + "kindString": "Variable", + "flags": {}, + "sources": [ + { + "fileName": "dist/test/converter/variables/destructuring.ts", + "line": 24, + "character": 61 + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + }, + "defaultValue": "false" + }, + { + "id": 251, + "name": "location", + "kind": 32, + "kindString": "Variable", + "flags": {}, + "sources": [ + { + "fileName": "dist/test/converter/variables/destructuring.ts", + "line": 24, + "character": 46 + } + ], + "type": { + "type": "tuple", + "elements": [ + { + "type": "intrinsic", + "name": "number" + }, + { + "type": "intrinsic", + "name": "number" + } + ] + }, + "defaultValue": "[0, 0]" + }, + { + "id": 250, + "name": "text", + "kind": 32, + "kindString": "Variable", + "flags": {}, + "sources": [ + { + "fileName": "dist/test/converter/variables/destructuring.ts", + "line": 24, + "character": 23 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "defaultValue": "\"\"" + } + ], + "groups": [ + { + "title": "Variables", + "kind": 32, + "children": [ + 252, + 251, + 250 + ] + } + ], + "sources": [ + { + "fileName": "dist/test/converter/variables/destructuring.ts", + "line": 24, + "character": 18 + } + ] + } + } + } + ], + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "dist/test/converter/variables/destructuring.ts", + "line": 24, + "character": 17 + } + ] + } + ], + "groups": [ + { + "title": "Variables", + "kind": 32, + "children": [ + 238, + 239, + 240, + 244, + 245, + 243, + 241, + 242, + 235, + 236, + 237 + ] + }, + { + "title": "Functions", + "kind": 64, + "children": [ + 246 + ] + } + ], + "sources": [ + { + "fileName": "dist/test/converter/variables/destructuring.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 253, + "name": "\"literal\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/variables/literal.ts", + "children": [ + { + "id": 269, + "name": "typeLiteral", + "kind": 32, + "kindString": "Variable", + "flags": { + "isLet": true + }, + "comment": { + "shortText": "A typed literal without an initializer." + }, + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 19, + "character": 15 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 270, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 286, + "name": "valueA", + "kind": 32, + "kindString": "Variable", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 27, + "character": 10 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 287, + "name": "valueB", + "kind": 32, + "kindString": "Variable", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 28, + "character": 10 + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + }, + { + "id": 275, + "name": "valueX", + "kind": 32, + "kindString": "Variable", + "flags": {}, + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 22, + "character": 10 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 276, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 285, + "name": "valueA", + "kind": 32, + "kindString": "Variable", + "flags": {}, + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 25, + "character": 14 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "intrinsic", + "name": "number" + } + } + }, + { + "id": 278, + "name": "valueY", + "kind": 32, + "kindString": "Variable", + "flags": {}, + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 24, + "character": 14 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 279, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 280, + "name": "__call", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 281, + "name": "z", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 282, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 283, + "name": "a", + "kind": 32, + "kindString": "Variable", + "flags": {}, + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 24, + "character": 32 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 284, + "name": "b", + "kind": 32, + "kindString": "Variable", + "flags": {}, + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 24, + "character": 43 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Variables", + "kind": 32, + "children": [ + 283, + 284 + ] + } + ], + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 24, + "character": 29 + } + ] + } + } + } + ], + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 24, + "character": 15 + } + ] + } + } + }, + { + "id": 277, + "name": "valueZ", + "kind": 32, + "kindString": "Variable", + "flags": {}, + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 23, + "character": 14 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Variables", + "kind": 32, + "children": [ + 285, + 278, + 277 + ] + } + ], + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 22, + "character": 11 + } + ] + } + } + }, + { + "id": 272, + "name": "valueY", + "kind": 32, + "kindString": "Variable", + "flags": {}, + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 21, + "character": 10 + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 273, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 274, + "name": "__call", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 21, + "character": 11 + } + ] + } + } + }, + { + "id": 271, + "name": "valueZ", + "kind": 32, + "kindString": "Variable", + "flags": {}, + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 20, + "character": 10 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Variables", + "kind": 32, + "children": [ + 286, + 287, + 275, + 272, + 271 + ] + } + ], + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 19, + "character": 16 + } + ] + } + } + }, + { + "id": 290, + "name": "onError", + "kind": 64, + "kindString": "Function", + "flags": { + "isLet": true + }, + "signatures": [ + { + "id": 291, + "name": "onError", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 32, + "character": 11 + } + ] + }, + { + "id": 292, + "name": "onFinally", + "kind": 64, + "kindString": "Function", + "flags": { + "isLet": true + }, + "signatures": [ + { + "id": 293, + "name": "onFinally", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 33, + "character": 13 + } + ] + }, + { + "id": 288, + "name": "onSuccess", + "kind": 64, + "kindString": "Function", + "flags": { + "isLet": true + }, + "signatures": [ + { + "id": 289, + "name": "onSuccess", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "void" + } + } + ], + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 31, + "character": 13 + } + ] + }, + { + "id": 294, + "name": "callbackReturn", + "kind": 2097152, + "kindString": "Object literal", + "flags": { + "isConst": true + }, + "children": [ + { + "id": 300, + "name": "error", + "kind": 64, + "kindString": "Function", + "flags": {}, + "signatures": [ + { + "id": 301, + "name": "error", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 302, + "name": "errorCallback", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 303, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 304, + "name": "__call", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "any" + } + } + ], + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 40, + "character": 26 + } + ] + } + } + } + ], + "type": { + "type": "reference", + "id": 294, + "name": "callbackReturn" + } + } + ], + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 40, + "character": 9 + } + ] + }, + { + "id": 305, + "name": "finally", + "kind": 64, + "kindString": "Function", + "flags": {}, + "signatures": [ + { + "id": 306, + "name": "finally", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 307, + "name": "finallyCallback", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 308, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 309, + "name": "__call", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "any" + } + } + ], + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 44, + "character": 30 + } + ] + } + } + } + ], + "type": { + "type": "reference", + "id": 294, + "name": "callbackReturn" + } + } + ], + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 44, + "character": 11 + } + ] + }, + { + "id": 295, + "name": "success", + "kind": 64, + "kindString": "Function", + "flags": {}, + "signatures": [ + { + "id": 296, + "name": "success", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 297, + "name": "successCallback", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 298, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "signatures": [ + { + "id": 299, + "name": "__call", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "any" + } + } + ], + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 36, + "character": 30 + } + ] + } + } + } + ], + "type": { + "type": "reference", + "id": 294, + "name": "callbackReturn" + } + } + ], + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 36, + "character": 11 + } + ] + } + ], + "groups": [ + { + "title": "Functions", + "kind": 64, + "children": [ + 300, + 305, + 295 + ] + } + ], + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 35, + "character": 20 + } + ], + "type": { + "type": "intrinsic", + "name": "object" + } + }, + { + "id": 254, + "name": "objectLiteral", + "kind": 2097152, + "kindString": "Object literal", + "flags": { + "isExported": true, + "isConst": true + }, + "comment": { + "shortText": "An object literal." + }, + "children": [ + { + "id": 267, + "name": "valueA", + "kind": 32, + "kindString": "Variable", + "flags": { + "isExported": true + }, + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 12, + "character": 10 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + }, + "defaultValue": "100" + }, + { + "id": 268, + "name": "valueB", + "kind": 32, + "kindString": "Variable", + "flags": { + "isExported": true + }, + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 13, + "character": 10 + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + }, + "defaultValue": "true" + }, + { + "id": 255, + "name": "valueZ", + "kind": 32, + "kindString": "Variable", + "flags": { + "isExported": true + }, + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 5, + "character": 10 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "defaultValue": "\"foo\"" + }, + { + "id": 256, + "name": "valueY", + "kind": 64, + "kindString": "Function", + "flags": { + "isExported": true + }, + "signatures": [ + { + "id": 257, + "name": "valueY", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isExported": true + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 6, + "character": 10 + } + ] + }, + { + "id": 258, + "name": "valueX", + "kind": 2097152, + "kindString": "Object literal", + "flags": { + "isExported": true + }, + "children": [ + { + "id": 266, + "name": "valueA", + "kind": 32, + "kindString": "Variable", + "flags": { + "isExported": true + }, + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 10, + "character": 14 + } + ], + "type": { + "type": "array", + "elementType": { + "type": "intrinsic", + "name": "number" + } + }, + "defaultValue": "[100, 200, 300]" + }, + { + "id": 259, + "name": "valueZ", + "kind": 32, + "kindString": "Variable", + "flags": { + "isExported": true + }, + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 8, + "character": 14 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "defaultValue": "\"foo\"" + }, + { + "id": 260, + "name": "valueY", + "kind": 64, + "kindString": "Function", + "flags": { + "isExported": true + }, + "signatures": [ + { + "id": 261, + "name": "valueY", + "kind": 4096, + "kindString": "Call signature", + "flags": { + "isExported": true + }, + "parameters": [ + { + "id": 262, + "name": "z", + "kind": 32768, + "kindString": "Parameter", + "flags": { + "isExported": true + }, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 263, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": { + "isExported": true + }, + "children": [ + { + "id": 264, + "name": "a", + "kind": 32, + "kindString": "Variable", + "flags": { + "isExported": true + }, + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 9, + "character": 42 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "defaultValue": "\"test\"" + }, + { + "id": 265, + "name": "b", + "kind": 32, + "kindString": "Variable", + "flags": { + "isExported": true + }, + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 9, + "character": 53 + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "defaultValue": "z" + } + ], + "groups": [ + { + "title": "Variables", + "kind": 32, + "children": [ + 264, + 265 + ] + } + ] + } + } + } + ], + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 9, + "character": 14 + } + ] + } + ], + "groups": [ + { + "title": "Variables", + "kind": 32, + "children": [ + 266, + 259 + ] + }, + { + "title": "Functions", + "kind": 64, + "children": [ + 260 + ] + } + ], + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 7, + "character": 10 + } + ], + "type": { + "type": "intrinsic", + "name": "object" + } + } + ], + "groups": [ + { + "title": "Variables", + "kind": 32, + "children": [ + 267, + 268, + 255 + ] + }, + { + "title": "Functions", + "kind": 64, + "children": [ + 256 + ] + }, + { + "title": "Object literals", + "kind": 2097152, + "children": [ + 258 + ] + } + ], + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 4, + "character": 19 + } + ], + "type": { + "type": "intrinsic", + "name": "object" + } + } + ], + "groups": [ + { + "title": "Variables", + "kind": 32, + "children": [ + 269 + ] + }, + { + "title": "Functions", + "kind": 64, + "children": [ + 290, + 292, + 288 + ] + }, + { + "title": "Object literals", + "kind": 2097152, + "children": [ + 294, + 254 + ] + } + ], + "sources": [ + { + "fileName": "dist/test/converter/variables/literal.ts", + "line": 1, + "character": 0 + } + ] + }, + { + "id": 310, + "name": "\"variable\"", + "kind": 1, + "kindString": "External module", + "flags": { + "isExported": true + }, + "originalName": "%BASE%/variables/variable.ts", + "children": [ + { + "id": 311, + "name": "myConst", + "kind": 32, + "kindString": "Variable", + "flags": { + "isExported": true, + "isConst": true + }, + "sources": [ + { + "fileName": "dist/test/converter/variables/variable.ts", + "line": 1, + "character": 20 + } + ], + "type": { + "type": "unknown", + "name": "15" + }, + "defaultValue": "15" + }, + { + "id": 312, + "name": "myLet", + "kind": 32, + "kindString": "Variable", + "flags": { + "isExported": true, + "isLet": true + }, + "sources": [ + { + "fileName": "dist/test/converter/variables/variable.ts", + "line": 2, + "character": 16 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + }, + "defaultValue": "15" + }, + { + "id": 313, + "name": "myVar", + "kind": 32, + "kindString": "Variable", + "flags": { + "isExported": true + }, + "sources": [ + { + "fileName": "dist/test/converter/variables/variable.ts", + "line": 4, + "character": 16 + } + ], + "type": { + "type": "intrinsic", + "name": "number" + }, + "defaultValue": "15" + }, + { + "id": 314, + "name": "x", + "kind": 32, + "kindString": "Variable", + "flags": { + "isLet": true + }, + "sources": [ + { + "fileName": "dist/test/converter/variables/variable.ts", + "line": 6, + "character": 5 + } + ], + "type": { + "type": "intrinsic", + "name": "object" + } + }, + { + "id": 315, + "name": "y", + "kind": 32, + "kindString": "Variable", + "flags": { + "isLet": true + }, + "sources": [ + { + "fileName": "dist/test/converter/variables/variable.ts", + "line": 7, + "character": 5 + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + } + ], + "name": "Promise" + } + }, + { + "id": 316, + "name": "z", + "kind": 32, + "kindString": "Variable", + "flags": { + "isLet": true + }, + "sources": [ + { + "fileName": "dist/test/converter/variables/variable.ts", + "line": 8, + "character": 5 + } + ], + "type": { + "type": "reference", + "typeArguments": [ + { + "type": "intrinsic", + "name": "object" + } + ], + "name": "Promise" + } + } + ], + "groups": [ + { + "title": "Variables", + "kind": 32, + "children": [ + 311, + 312, + 313, + 314, + 315, + 316 + ] + } + ], + "sources": [ + { + "fileName": "dist/test/converter/variables/variable.ts", "line": 1, "character": 0 } @@ -4572,7 +6206,10 @@ "title": "External modules", "kind": 1, "children": [ - 1 + 1, + 234, + 253, + 310 ] } ] diff --git a/src/test/converter/variables/variable.ts b/src/test/converter/variables/variable.ts new file mode 100644 index 000000000..175ab1c89 --- /dev/null +++ b/src/test/converter/variables/variable.ts @@ -0,0 +1,8 @@ +export const myConst = 15; +export let myLet = 15; +// tslint:disable-next-line:no-var-keyword +export var myVar = 15; + +let x: object; +let y: Promise; +let z: Promise; diff --git a/src/test/renderer.test.ts b/src/test/renderer.test.ts index 236d7c8c1..50b305da5 100644 --- a/src/test/renderer.test.ts +++ b/src/test/renderer.test.ts @@ -58,7 +58,7 @@ describe('Renderer', function() { it('constructs', function() { app = new Application(); app.bootstrap({ - mode: 'Modules', + mode: 'modules', logger: 'console', target: ScriptTarget.ES5, readme: Path.join(src, '..', 'README.md'), diff --git a/src/test/renderer/specs/classes/_access_.privateclass.html b/src/test/renderer/specs/classes/_access_.privateclass.html index 5d60cff42..c2b8aac66 100644 --- a/src/test/renderer/specs/classes/_access_.privateclass.html +++ b/src/test/renderer/specs/classes/_access_.privateclass.html @@ -230,18 +230,6 @@

Returns void "single-export" -
  • - "typescript-1.3" -
  • -
  • - "typescript-1.4" -
  • -
  • - "typescript-1.5" -
  • -
  • - "variables" -
  • "weird-names"
  • diff --git a/src/test/renderer/specs/classes/_classes_.baseclass.html b/src/test/renderer/specs/classes/_classes_.baseclass.html index e6da0e9ae..431ad7f0b 100644 --- a/src/test/renderer/specs/classes/_classes_.baseclass.html +++ b/src/test/renderer/specs/classes/_classes_.baseclass.html @@ -96,7 +96,7 @@

    Hierarchy

    Implements

    @@ -148,7 +148,7 @@

    constructor

  • Parameters

    @@ -162,7 +162,7 @@

    Returns

    Parameters

    @@ -184,7 +184,7 @@

    Private internalClass

    internalClass: InternalClass<keyof BaseClass>
    @@ -199,7 +199,7 @@

    Protected kind

    kind: number
    @@ -213,9 +213,9 @@

    Protected kind

    name

    name: string
    @@ -230,7 +230,7 @@

    Static instance

    instance: BaseClass
    @@ -246,7 +246,7 @@

    Static instances

    instances: BaseClass[]
  • @@ -263,7 +263,7 @@

    Abstract abstractMethod

    Returns void

    @@ -280,7 +280,7 @@

    arrowFunction

  • @@ -321,7 +321,7 @@

    Private checkName

  • @@ -342,9 +342,9 @@

    getName

    diff --git a/src/test/renderer/specs/classes/_classes_.genericclass.html b/src/test/renderer/specs/classes/_classes_.genericclass.html index acefbd3d1..abcef55a2 100644 --- a/src/test/renderer/specs/classes/_classes_.genericclass.html +++ b/src/test/renderer/specs/classes/_classes_.genericclass.html @@ -144,7 +144,7 @@

    constructor

  • @@ -208,7 +208,7 @@

    Protected p2

    p2: T
    @@ -223,7 +223,7 @@

    p3

    p3: number
    @@ -238,7 +238,7 @@

    Private p4

    p4: number
    @@ -253,7 +253,7 @@

    p5

    p5: string
    @@ -268,7 +268,7 @@

    value

    value: T
    @@ -285,7 +285,7 @@

    getValue

  • Returns T

    @@ -302,7 +302,7 @@

    setValue

  • @@ -361,18 +361,6 @@

    Returns void "single-export"

  • -
  • - "typescript-1.3" -
  • -
  • - "typescript-1.4" -
  • -
  • - "typescript-1.5" -
  • -
  • - "variables" -
  • "weird-names"
  • @@ -429,13 +417,13 @@

    Returns voidSubClassB
  • - INameInterface + NameInterface
  • - IPrintInterface + PrintInterface
  • - IPrintNameInterface + PrintNameInterface
  • diff --git a/src/test/renderer/specs/classes/_classes_.internalclass.html b/src/test/renderer/specs/classes/_classes_.internalclass.html index 2fbfe6bc3..9a6d1f303 100644 --- a/src/test/renderer/specs/classes/_classes_.internalclass.html +++ b/src/test/renderer/specs/classes/_classes_.internalclass.html @@ -117,7 +117,7 @@

    constructor

  • Parameters

    @@ -176,18 +176,6 @@

    Returns "single-export"

  • -
  • - "typescript-1.3" -
  • -
  • - "typescript-1.4" -
  • -
  • - "typescript-1.5" -
  • -
  • - "variables" -
  • "weird-names"
  • @@ -223,13 +211,13 @@

    Returns SubClassB
  • - INameInterface + NameInterface
  • - IPrintInterface + PrintInterface
  • - IPrintNameInterface + PrintNameInterface
  • diff --git a/src/test/renderer/specs/classes/_classes_.nongenericclass.html b/src/test/renderer/specs/classes/_classes_.nongenericclass.html index 51738ff22..9e4f60938 100644 --- a/src/test/renderer/specs/classes/_classes_.nongenericclass.html +++ b/src/test/renderer/specs/classes/_classes_.nongenericclass.html @@ -131,7 +131,7 @@

    constructor

    @@ -196,7 +196,7 @@

    Protected p2

    @@ -212,7 +212,7 @@

    p3

    @@ -228,7 +228,7 @@

    p5

    @@ -244,7 +244,7 @@

    value

    @@ -262,7 +262,7 @@

    getValue

    Returns SubClassB

    @@ -280,7 +280,7 @@

    setValue

    @@ -339,18 +339,6 @@

    Returns void "single-export" -
  • - "typescript-1.3" -
  • -
  • - "typescript-1.4" -
  • -
  • - "typescript-1.5" -
  • -
  • - "variables" -
  • "weird-names"
  • @@ -404,13 +392,13 @@

    Returns voidSubClassB
  • - INameInterface + NameInterface
  • - IPrintInterface + PrintInterface
  • - IPrintNameInterface + PrintNameInterface
  • diff --git a/src/test/renderer/specs/classes/_classes_.subclassa.html b/src/test/renderer/specs/classes/_classes_.subclassa.html index f799d5bcc..6fa8733f2 100644 --- a/src/test/renderer/specs/classes/_classes_.subclassa.html +++ b/src/test/renderer/specs/classes/_classes_.subclassa.html @@ -94,8 +94,8 @@

    Hierarchy

    Implements

    @@ -156,7 +156,7 @@

    constructor

    Parameters

    @@ -171,7 +171,7 @@

    Returns

    Inherited from BaseClass.constructor

    Parameters

    @@ -194,7 +194,7 @@

    Protected kind

    @@ -208,10 +208,10 @@

    Protected kind

    name

    name: string
    @@ -222,7 +222,7 @@

    Static instance

    @@ -239,7 +239,7 @@

    Static instances

    @@ -257,7 +257,7 @@

    nameProperty

  • @@ -271,7 +271,7 @@

    Returns string
    @@ -305,7 +305,7 @@

    readOnlyNameProperty

  • @@ -328,7 +328,7 @@

    writeOnlyNameProperty

  • @@ -366,7 +366,7 @@

    abstractMethod

    Returns void

    @@ -384,7 +384,7 @@

    arrowFunction

    @@ -424,10 +424,10 @@

    getName

    @@ -80,7 +80,7 @@

    Class flattenedClass

    Hierarchy

    • - flattenedClass + FlattenedClass
    @@ -112,13 +112,13 @@

    Constructors

    constructor

    @@ -178,7 +178,7 @@

    callback

    callback: function
    @@ -223,7 +223,7 @@

    indexed

    indexed: object
    @@ -260,7 +260,7 @@

    multipleCallSignatures

    multipleCallSignatures: function
    @@ -279,7 +279,7 @@

    Type declaration

    • @@ -306,7 +306,7 @@
      value: number
  • -

    Returns flattenedClass

    +

    Returns FlattenedClass

    The calling Foo.

    @@ -320,7 +320,7 @@

    options

    options: object
    @@ -401,18 +401,6 @@
    Optional value "single-export" -
  • - "typescript-1.3" -
  • -
  • - "typescript-1.4" -
  • -
  • - "typescript-1.5" -
  • -
  • - "variables" -
  • "weird-names"
  • @@ -423,7 +411,7 @@
    Optional value
  • - flattenedClass + FlattenedClass @@ -131,18 +127,6 @@

    External modules

  • "single-export"
  • -
  • - "typescript-1.3" -
  • -
  • - "typescript-1.4" -
  • -
  • - "typescript-1.5" -
  • -
  • - "variables" -
  • "weird-names"
  • diff --git a/src/test/renderer/specs/index.html b/src/test/renderer/specs/index.html index 84630f6ea..5f075ba8f 100644 --- a/src/test/renderer/specs/index.html +++ b/src/test/renderer/specs/index.html @@ -155,18 +155,6 @@

    Repeated Heading

  • "single-export"
  • -
  • - "typescript-1.3" -
  • -
  • - "typescript-1.4" -
  • -
  • - "typescript-1.5" -
  • -
  • - "variables" -
  • "weird-names"
  • diff --git a/src/test/renderer/specs/interfaces/_classes_.inameinterface.html b/src/test/renderer/specs/interfaces/_classes_.nameinterface.html similarity index 89% rename from src/test/renderer/specs/interfaces/_classes_.inameinterface.html rename to src/test/renderer/specs/interfaces/_classes_.nameinterface.html index dced9f100..3a9d7ebdb 100644 --- a/src/test/renderer/specs/interfaces/_classes_.inameinterface.html +++ b/src/test/renderer/specs/interfaces/_classes_.nameinterface.html @@ -3,7 +3,7 @@ - INameInterface | typedoc + NameInterface | typedoc @@ -59,10 +59,10 @@ "classes"
  • - INameInterface + NameInterface
  • -

    Interface INameInterface

    +

    Interface NameInterface

    @@ -80,10 +80,10 @@

    Interface INameInterface

    Hierarchy

    @@ -124,7 +124,7 @@

    name

    name: string
    @@ -147,7 +147,7 @@

    getName

  • @@ -201,18 +201,6 @@

    Returns string "single-export"

  • -
  • - "typescript-1.3" -
  • -
  • - "typescript-1.4" -
  • -
  • - "typescript-1.5" -
  • -
  • - "variables" -
  • "weird-names"
  • @@ -241,23 +229,23 @@

    Returns string diff --git a/src/test/renderer/specs/interfaces/_classes_.iprintinterface.html b/src/test/renderer/specs/interfaces/_classes_.printinterface.html similarity index 90% rename from src/test/renderer/specs/interfaces/_classes_.iprintinterface.html rename to src/test/renderer/specs/interfaces/_classes_.printinterface.html index 4b483df0f..4442744d7 100644 --- a/src/test/renderer/specs/interfaces/_classes_.iprintinterface.html +++ b/src/test/renderer/specs/interfaces/_classes_.printinterface.html @@ -3,7 +3,7 @@ - IPrintInterface | typedoc + PrintInterface | typedoc @@ -59,10 +59,10 @@ "classes"
  • - IPrintInterface + PrintInterface
  • -

    Interface IPrintInterface

    +

    Interface PrintInterface

    @@ -80,10 +80,10 @@

    Interface IPrintInterface

    Hierarchy

    @@ -114,7 +114,7 @@

    print

  • @@ -174,18 +174,6 @@

    Returns void "single-export"

  • -
  • - "typescript-1.3" -
  • -
  • - "typescript-1.4" -
  • -
  • - "typescript-1.5" -
  • -
  • - "variables" -
  • "weird-names"
  • @@ -212,22 +200,22 @@

    Returns voidSubClassB
  • - INameInterface + NameInterface
  • diff --git a/src/test/renderer/specs/interfaces/_classes_.iprintnameinterface.html b/src/test/renderer/specs/interfaces/_classes_.printnameinterface.html similarity index 85% rename from src/test/renderer/specs/interfaces/_classes_.iprintnameinterface.html rename to src/test/renderer/specs/interfaces/_classes_.printnameinterface.html index a3e02c111..eb252a92e 100644 --- a/src/test/renderer/specs/interfaces/_classes_.iprintnameinterface.html +++ b/src/test/renderer/specs/interfaces/_classes_.printnameinterface.html @@ -3,7 +3,7 @@ - IPrintNameInterface | typedoc + PrintNameInterface | typedoc @@ -59,10 +59,10 @@ "classes"
  • - IPrintNameInterface + PrintNameInterface
  • -

    Interface IPrintNameInterface

    +

    Interface PrintNameInterface

    @@ -80,13 +80,13 @@

    Interface IPrintNameInterface

    Hierarchy

    • - INameInterface + NameInterface
    • - IPrintInterface + PrintInterface
      • - IPrintNameInterface + PrintNameInterface
    • @@ -105,15 +105,15 @@

      Index

      Properties

      Methods

      @@ -126,9 +126,9 @@

      Properties

      name

      name: string
      @@ -150,9 +150,9 @@

      getName

      • @@ -174,9 +174,9 @@

        print

        diff --git a/src/test/renderer/specs/modules/_default_export_.html b/src/test/renderer/specs/modules/_default_export_.html index 62cc68c50..fec686558 100644 --- a/src/test/renderer/specs/modules/_default_export_.html +++ b/src/test/renderer/specs/modules/_default_export_.html @@ -134,18 +134,6 @@

        ExportedClassName

      • "single-export"
      • -
      • - "typescript-1.3" -
      • -
      • - "typescript-1.4" -
      • -
      • - "typescript-1.5" -
      • -
      • - "variables" -
      • "weird-names"
      • diff --git a/src/test/renderer/specs/modules/_enumerations_.html b/src/test/renderer/specs/modules/_enumerations_.html index d03ca4d25..6563a678d 100644 --- a/src/test/renderer/specs/modules/_enumerations_.html +++ b/src/test/renderer/specs/modules/_enumerations_.html @@ -120,18 +120,6 @@

        Enumerations

      • "single-export"
      • -
      • - "typescript-1.3" -
      • -
      • - "typescript-1.4" -
      • -
      • - "typescript-1.5" -
      • -
      • - "variables" -
      • "weird-names"
      • diff --git a/src/test/renderer/specs/modules/_flattened_.html b/src/test/renderer/specs/modules/_flattened_.html index 8f3d73420..d0fe4c1f7 100644 --- a/src/test/renderer/specs/modules/_flattened_.html +++ b/src/test/renderer/specs/modules/_flattened_.html @@ -73,7 +73,7 @@

        Index

        Classes

        @@ -99,7 +99,7 @@

        flattenedCallback

      • @@ -157,7 +157,7 @@

        flattenedIndexSignature

      • @@ -207,7 +207,7 @@

        flattenedParameter

      • @@ -300,18 +300,6 @@

        Returns void "single-export"

      • -
      • - "typescript-1.3" -
      • -
      • - "typescript-1.4" -
      • -
      • - "typescript-1.5" -
      • -
      • - "variables" -
      • "weird-names"
      • @@ -320,7 +308,7 @@

        Returns void

        @@ -278,7 +278,7 @@

        valueY

      • Returns string

        @@ -291,7 +291,7 @@

        valueX

        valueX: object
        @@ -300,7 +300,7 @@

        valueA

        valueA: number[] = [100, 200, 300]
        @@ -310,7 +310,7 @@

        valueZ

        valueZ: string = "foo"
        @@ -324,7 +324,7 @@

        valueY

      • Parameters

        @@ -393,18 +393,6 @@
        b: "single-export"
      • -
      • - "typescript-1.3" -
      • -
      • - "typescript-1.4" -
      • -
      • - "typescript-1.5" -
      • -
      • - "variables" -
      • "weird-names"
      • diff --git a/src/test/renderer/specs/modules/_modules_.mymodule.html b/src/test/renderer/specs/modules/_modules_.mymodule.html index 3f2eafc31..915e9dd77 100644 --- a/src/test/renderer/specs/modules/_modules_.mymodule.html +++ b/src/test/renderer/specs/modules/_modules_.mymodule.html @@ -107,31 +107,31 @@

        Object literals

        Variables

        -

        exportedModuleVariable

        +

        Let exportedModuleVariable

        exportedModuleVariable: string = "foo"
        -

        moduleVariable

        +

        Let moduleVariable

        moduleVariable: number[] = [100, 200]
        -

        moduleVariable2

        +

        Let moduleVariable2

        moduleVariable2: number[]
        @@ -140,11 +140,11 @@

        moduleVariable2

        Object literals

        -

        object

        +

        Let object

        object: object
        @@ -158,7 +158,7 @@

        name

        name: string = "Test"
        @@ -177,7 +177,7 @@

        print

      • @@ -247,18 +247,6 @@

        Returns void "single-export"

      • -
      • - "typescript-1.3" -
      • -
      • - "typescript-1.4" -
      • -
      • - "typescript-1.5" -
      • -
      • - "variables" -
      • "weird-names"
      • diff --git a/src/test/renderer/specs/modules/_modules_.mymodule.mysubmodule.html b/src/test/renderer/specs/modules/_modules_.mymodule.mysubmodule.html index 2e7cfb70b..0e1919cad 100644 --- a/src/test/renderer/specs/modules/_modules_.mymodule.mysubmodule.html +++ b/src/test/renderer/specs/modules/_modules_.mymodule.mysubmodule.html @@ -97,21 +97,21 @@

        Variables

        Variables

        -

        a

        +

        Let a

        a: string
        -

        b

        +

        Let b

        b: string
        @@ -166,18 +166,6 @@

        b

      • "single-export"
      • -
      • - "typescript-1.3" -
      • -
      • - "typescript-1.4" -
      • -
      • - "typescript-1.5" -
      • -
      • - "variables" -
      • "weird-names"
      • diff --git a/src/test/renderer/specs/modules/_single_export_.html b/src/test/renderer/specs/modules/_single_export_.html index 14e624ffc..04cba98a3 100644 --- a/src/test/renderer/specs/modules/_single_export_.html +++ b/src/test/renderer/specs/modules/_single_export_.html @@ -120,18 +120,6 @@

        Classes

      • "single-export"
      • -
      • - "typescript-1.3" -
      • -
      • - "typescript-1.4" -
      • -
      • - "typescript-1.5" -
      • -
      • - "variables" -
      • "weird-names"
      • diff --git a/src/test/renderer/specs/modules/_typescript_1_3_.html b/src/test/renderer/specs/modules/_typescript_1_3_.html deleted file mode 100644 index 81b0bbf17..000000000 --- a/src/test/renderer/specs/modules/_typescript_1_3_.html +++ /dev/null @@ -1,247 +0,0 @@ - - - - - - "typescript-1.3" | typedoc - - - - - -
        -
        -
        -
        - -
        -
        - Options -
        -
        - All -
          -
        • Public
        • -
        • Public/Protected
        • -
        • All
        • -
        -
        - - - - - - -
        -
        - Menu -
        -
        -
        -
        -
        -
        - -

        External module "typescript-1.3"

        -
        -
        -
        -
        -
        -
        -
        -

        Index

        -
        -
        -
        -

        Classes

        - -
        -
        -

        Variables

        - -
        -
        -
        -
        -
        -

        Variables

        -
        - -

        tupleType

        -
        tupleType: [string, ClassWithProtectedMembers] = ['test', new ClassWithProtectedMembers()]
        - -
        -
        -

        A variable with a tuple type.

        -
        -
        -
        -
        -
        - -
        -
        -
        -
        -

        Legend

        -
        -
          -
        • Module
        • -
        • Object literal
        • -
        • Variable
        • -
        • Function
        • -
        • Function with type parameter
        • -
        • Index signature
        • -
        • Type alias
        • -
        • Type alias with type parameter
        • -
        -
          -
        • Enumeration
        • -
        • Enumeration member
        • -
        • Property
        • -
        • Method
        • -
        -
          -
        • Interface
        • -
        • Interface with type parameter
        • -
        • Constructor
        • -
        • Property
        • -
        • Method
        • -
        • Index signature
        • -
        -
          -
        • Class
        • -
        • Class with type parameter
        • -
        • Constructor
        • -
        • Property
        • -
        • Method
        • -
        • Accessor
        • -
        • Index signature
        • -
        -
          -
        • Inherited constructor
        • -
        • Inherited property
        • -
        • Inherited method
        • -
        • Inherited accessor
        • -
        -
          -
        • Protected property
        • -
        • Protected method
        • -
        • Protected accessor
        • -
        -
          -
        • Private property
        • -
        • Private method
        • -
        • Private accessor
        • -
        -
          -
        • Static property
        • -
        • Static method
        • -
        -
        -
        -
        -
        -

        Generated using TypeDoc

        -
        -
        - - - - \ No newline at end of file diff --git a/src/test/renderer/specs/modules/_typescript_1_4_.html b/src/test/renderer/specs/modules/_typescript_1_4_.html deleted file mode 100644 index 55abae1cc..000000000 --- a/src/test/renderer/specs/modules/_typescript_1_4_.html +++ /dev/null @@ -1,554 +0,0 @@ - - - - - - "typescript-1.4" | typedoc - - - - - -
        -
        -
        -
        - -
        -
        - Options -
        -
        - All -
          -
        • Public
        • -
        • Public/Protected
        • -
        • All
        • -
        -
        - - - - - - -
        -
        - Menu -
        -
        -
        -
        -
        -
        - -

        External module "typescript-1.4"

        -
        -
        -
        -
        -
        -
        -
        -
        -
        -

        Examples of features added in TypeScript 1.4.

        -
        -
        -
        see
        -

        https://blogs.msdn.com/b/typescript/archive/2014/11/18/what-s-new-in-the-typescript-type-system.aspx

        -
        -
        -
        -
        -
        -

        Index

        -
        -
        -
        -

        Classes

        - -
        -
        -

        Interfaces

        - -
        -
        -

        Type aliases

        - -
        -
        -

        Variables

        - -
        -
        -

        Functions

        - -
        -
        -
        -
        -
        -

        Type aliases

        -
        - -

        Callback

        -
        Callback: function
        - -
        -
        -

        A type alias of for a callback function.

        -
        -
        -
        -

        Type declaration

        -
          -
        • -
            -
          • (...parameters: string[]): string
          • -
          -
            -
          • -

            Parameters

            -
              -
            • -
              Rest ...parameters: string[]
              -
              -

              The rest parameter.

              -
              -
            • -
            -

            Returns string

            -
          • -
          -
        • -
        -
        -
        -
        - -

        GenericCallback

        -
        GenericCallback: function
        - -
        -
        -

        A type alias of for a generic callback function.

        -
        -
        -
        returns
        -

        Some return value.

        -
        -
        -
        -
        -

        Type declaration

        -
          -
        • -
            -
          • <T>(val: T, index: number, arr: Array<T>): any
          • -
          -
            -
          • -

            Type parameters

            -
              -
            • -

              T

              -
              -

              Some type argument.

              -
              -
            • -
            -

            Parameters

            -
              -
            • -
              val: T
              -
              -

              Some generic value.

              -
              -
            • -
            • -
              index: number
              -
              -

              Some index value.

              -
              -
            • -
            • -
              arr: Array<T>
              -
              -

              A generic array.

              -
              -
            • -
            -

            Returns any

            -
          • -
          -
        • -
        -
        -
        -
        - -

        MyNumber

        -
        MyNumber: number
        - -
        -
        -

        A type alias describing a primitive value.

        -
        -
        -
        -
        - -

        MyRunOptions

        -
        MyRunOptions: RunOptions
        - -
        -
        -

        A type alias describing a reference type.

        -
        -
        -
        -
        - -

        PrimitiveArray

        -
        PrimitiveArray: Array<string | number | boolean>
        - -
        -
        -

        A type alias describing an array.

        -
        -
        -
        -
        -
        -

        Variables

        -
        - -

        callback

        -
        callback: Callback
        - -
        -
        -

        A variable pointing to a type alias.

        -
        -
        -
        -
        - -

        interfaceOrString

        -
        interfaceOrString: RunOptions | string
        - -
        -
        -

        A variable defined using an union type.

        -
        -
        -
        -
        -
        -

        Functions

        -
        - -

        functionUsingTypes

        - - -
        -
        - -

        functionWithGenericCallback

        -
          -
        • functionWithGenericCallback<T>(arr: Array<T>, callback: GenericCallback): any
        • -
        -
          -
        • - -
          -
          -

          A generic function using a generic type alias.

          -
          -
          -

          Type parameters

          -
            -
          • -

            T

            -
            -

            Some type argument.

            -
            -
          • -
          -

          Parameters

          -
            -
          • -
            arr: Array<T>
            -
            -

            A generic array.

            -
            -
          • -
          • -
            callback: GenericCallback
            -
            -

            Some generic type alias callback.

            -
            -
          • -
          -

          Returns any

          -

          Some return value.

          -
        • -
        -
        -
        -
        - -
        -
        -
        -
        -

        Legend

        -
        -
          -
        • Module
        • -
        • Object literal
        • -
        • Variable
        • -
        • Function
        • -
        • Function with type parameter
        • -
        • Index signature
        • -
        • Type alias
        • -
        • Type alias with type parameter
        • -
        -
          -
        • Enumeration
        • -
        • Enumeration member
        • -
        • Property
        • -
        • Method
        • -
        -
          -
        • Interface
        • -
        • Interface with type parameter
        • -
        • Constructor
        • -
        • Property
        • -
        • Method
        • -
        • Index signature
        • -
        -
          -
        • Class
        • -
        • Class with type parameter
        • -
        • Constructor
        • -
        • Property
        • -
        • Method
        • -
        • Accessor
        • -
        • Index signature
        • -
        -
          -
        • Inherited constructor
        • -
        • Inherited property
        • -
        • Inherited method
        • -
        • Inherited accessor
        • -
        -
          -
        • Protected property
        • -
        • Protected method
        • -
        • Protected accessor
        • -
        -
          -
        • Private property
        • -
        • Private method
        • -
        • Private accessor
        • -
        -
          -
        • Static property
        • -
        • Static method
        • -
        -
        -
        -
        -
        -

        Generated using TypeDoc

        -
        -
        - - - - \ No newline at end of file diff --git a/src/test/renderer/specs/modules/_typescript_1_5_.html b/src/test/renderer/specs/modules/_typescript_1_5_.html deleted file mode 100644 index 1d77c3018..000000000 --- a/src/test/renderer/specs/modules/_typescript_1_5_.html +++ /dev/null @@ -1,429 +0,0 @@ - - - - - - "typescript-1.5" | typedoc - - - - - -
        -
        -
        -
        - -
        -
        - Options -
        -
        - All -
          -
        • Public
        • -
        • Public/Protected
        • -
        • All
        • -
        -
        - - - - - - -
        -
        - Menu -
        -
        -
        -
        -
        -
        - -

        External module "typescript-1.5"

        -
        -
        -
        -
        -
        -
        -
        -

        Index

        -
        - -
        -
        -
        -

        Variables

        -
        - -

        destructArrayA

        -
        destructArrayA: number
        - -
        -
        - -

        destructArrayB

        -
        destructArrayB: string
        - -
        -
        - -

        destructArrayC

        -
        destructArrayC: number = 10
        - -
        -
        - -

        destructArrayWithIgnoresA

        -
        destructArrayWithIgnoresA: number
        - -
        -
        - -

        destructArrayWithIgnoresRest

        -
        destructArrayWithIgnoresRest: [number, number]
        - -
        -
        - -

        destructArrayWithRest

        -
        destructArrayWithRest: [number, number]
        - -
        -
        - -

        destructArrayWithRestA

        -
        destructArrayWithRestA: number
        - -
        -
        - -

        destructArrayWithRestB

        -
        destructArrayWithRestB: number
        - -
        -
        - -

        destructObjectA

        -
        destructObjectA: number
        - -
        -
        - -

        destructObjectB

        -
        destructObjectB: string
        - -
        -
        - -

        destructObjectC

        -
        destructObjectC: number
        - -
        -
        -
        -

        Functions

        -
        - -

        drawText

        -
          -
        • drawText(__namedParameters: object): void
        • -
        -
          -
        • - -
          -
          -

          Destructuring function parameters.

          -
          -
          -

          Parameters

          -
            -
          • -
            __namedParameters: object
            -
              -
            • -
              bold: boolean
              -
              -

              Should it be bold?

              -
              -
            • -
            • -
              location: [number, number]
              -
              -

              This is the location

              -
              -
            • -
            • -
              text: string
              -
              -

              This is the text

              -
              -
            • -
            -
          • -
          -

          Returns void

          -
        • -
        -
        -
        -
        - -
        -
        -
        -
        -

        Legend

        -
        -
          -
        • Module
        • -
        • Object literal
        • -
        • Variable
        • -
        • Function
        • -
        • Function with type parameter
        • -
        • Index signature
        • -
        • Type alias
        • -
        • Type alias with type parameter
        • -
        -
          -
        • Enumeration
        • -
        • Enumeration member
        • -
        • Property
        • -
        • Method
        • -
        -
          -
        • Interface
        • -
        • Interface with type parameter
        • -
        • Constructor
        • -
        • Property
        • -
        • Method
        • -
        • Index signature
        • -
        -
          -
        • Class
        • -
        • Class with type parameter
        • -
        • Constructor
        • -
        • Property
        • -
        • Method
        • -
        • Accessor
        • -
        • Index signature
        • -
        -
          -
        • Inherited constructor
        • -
        • Inherited property
        • -
        • Inherited method
        • -
        • Inherited accessor
        • -
        -
          -
        • Protected property
        • -
        • Protected method
        • -
        • Protected accessor
        • -
        -
          -
        • Private property
        • -
        • Private method
        • -
        • Private accessor
        • -
        -
          -
        • Static property
        • -
        • Static method
        • -
        -
        -
        -
        -
        -

        Generated using TypeDoc

        -
        -
        - - - - \ No newline at end of file diff --git a/src/test/renderer/specs/modules/_variables_.html b/src/test/renderer/specs/modules/_variables_.html deleted file mode 100644 index 4d6f3fdfd..000000000 --- a/src/test/renderer/specs/modules/_variables_.html +++ /dev/null @@ -1,272 +0,0 @@ - - - - - - "variables" | typedoc - - - - - -
        -
        -
        -
        - -
        -
        - Options -
        -
        - All -
          -
        • Public
        • -
        • Public/Protected
        • -
        • All
        • -
        -
        - - - - - - -
        -
        - Menu -
        -
        -
        -
        -
        -
        - -

        External module "variables"

        -
        -
        -
        -
        -
        -
        -
        -

        Index

        -
        -
        -
        -

        Variables

        - -
        -
        -
        -
        -
        -

        Variables

        -
        - -

        Const constVariable

        -
        constVariable: "const" = "const"
        - -
        -
        -

        A const variable

        -
        -
        -
        -
        - -

        Let letVariable

        -
        letVariable: string = "let"
        - -
        -
        -

        A let variable

        -
        -
        -
        -
        - -

        varVariable

        -
        varVariable: string = "var"
        - -
        -
        -

        A var variable

        -
        -
        -
        -
        -
        - -
        -
        -
        -
        -

        Legend

        -
        -
          -
        • Module
        • -
        • Object literal
        • -
        • Variable
        • -
        • Function
        • -
        • Function with type parameter
        • -
        • Index signature
        • -
        • Type alias
        • -
        • Type alias with type parameter
        • -
        -
          -
        • Enumeration
        • -
        • Enumeration member
        • -
        • Property
        • -
        • Method
        • -
        -
          -
        • Interface
        • -
        • Interface with type parameter
        • -
        • Constructor
        • -
        • Property
        • -
        • Method
        • -
        • Index signature
        • -
        -
          -
        • Class
        • -
        • Class with type parameter
        • -
        • Constructor
        • -
        • Property
        • -
        • Method
        • -
        • Accessor
        • -
        • Index signature
        • -
        -
          -
        • Inherited constructor
        • -
        • Inherited property
        • -
        • Inherited method
        • -
        • Inherited accessor
        • -
        -
          -
        • Protected property
        • -
        • Protected method
        • -
        • Protected accessor
        • -
        -
          -
        • Private property
        • -
        • Private method
        • -
        • Private accessor
        • -
        -
          -
        • Static property
        • -
        • Static method
        • -
        -
        -
        -
        -
        -

        Generated using TypeDoc

        -
        -
        - - - - \ No newline at end of file diff --git a/src/test/renderer/specs/modules/_weird_names_.html b/src/test/renderer/specs/modules/_weird_names_.html index f114ed2e4..8b984dda6 100644 --- a/src/test/renderer/specs/modules/_weird_names_.html +++ b/src/test/renderer/specs/modules/_weird_names_.html @@ -157,18 +157,6 @@

        =

      • "single-export"
      • -
      • - "typescript-1.3" -
      • -
      • - "typescript-1.4" -
      • -
      • - "typescript-1.5" -
      • -
      • - "variables" -
      • "weird-names"
      • diff --git a/src/test/typedoc.test.ts b/src/test/typedoc.test.ts index 469363bf1..446854ef8 100644 --- a/src/test/typedoc.test.ts +++ b/src/test/typedoc.test.ts @@ -79,21 +79,21 @@ describe('TypeDoc', function() { it('supports directory excludes', function() { const inputFiles = Path.join(__dirname, 'converter'); - application.options.setValue('exclude', [ '**/access' ]); + application.options.setValue('exclude', [ '**/alias' ]); const expanded = application.expandInputFiles([inputFiles]); Assert.strictEqual(expanded.includes(Path.join(inputFiles, 'class', 'class.ts')), true); - Assert.strictEqual(expanded.includes(Path.join(inputFiles, 'access', 'access.ts')), false); + Assert.strictEqual(expanded.includes(Path.join(inputFiles, 'alias', 'alias.ts')), false); Assert.strictEqual(expanded.includes(inputFiles), false); }); it('supports negations in directory excludes', function() { const inputFiles = Path.join(__dirname, 'converter'); - application.options.setValue('exclude', [ '**/!(access)/' ]); + application.options.setValue('exclude', [ '**/!(alias)/' ]); const expanded = application.expandInputFiles([inputFiles]); Assert.strictEqual(expanded.includes(Path.join(inputFiles, 'class', 'class.ts')), false); - Assert.strictEqual(expanded.includes(Path.join(inputFiles, 'access', 'access.ts')), true); + Assert.strictEqual(expanded.includes(Path.join(inputFiles, 'alias', 'alias.ts')), true); Assert.strictEqual(expanded.includes(inputFiles), false); }); }); diff --git a/test/converter/constructor-type/constructor-type.ts b/test/converter/constructor-type/constructor-type.ts deleted file mode 100644 index e9375ca53..000000000 --- a/test/converter/constructor-type/constructor-type.ts +++ /dev/null @@ -1,15 +0,0 @@ -/// - -interface IConstructor { - - // No return type defined. Used the parent one. - new(x:String, y:String); - - // A return type is defined and is the same as the parent one. - new(x:String, y:String) : IConstructor; - - // A return type is defined and is not the same as the parent one. - new(x:String, y:String) : IInstance; -} - -interface IInstance {} diff --git a/test/converter/constructor-type/specs.json b/test/converter/constructor-type/specs.json deleted file mode 100644 index 453ddea7e..000000000 --- a/test/converter/constructor-type/specs.json +++ /dev/null @@ -1,219 +0,0 @@ -{ - "id": 0, - "name": "typedoc", - "kind": 0, - "flags": {}, - "children": [ - { - "id": 1, - "name": "\"constructor-type\"", - "kind": 1, - "kindString": "External module", - "flags": { - "isExported": true - }, - "originalName": "%BASE%/constructor-type/constructor-type.ts", - "children": [ - { - "id": 2, - "name": "IConstructor", - "kind": 256, - "kindString": "Interface", - "flags": {}, - "children": [ - { - "id": 3, - "name": "constructor", - "kind": 512, - "kindString": "Constructor", - "flags": {}, - "signatures": [ - { - "id": 4, - "name": "new IConstructor", - "kind": 16384, - "kindString": "Constructor signature", - "flags": {}, - "parameters": [ - { - "id": 5, - "name": "x", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "reference", - "name": "String" - } - }, - { - "id": 6, - "name": "y", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "reference", - "name": "String" - } - } - ], - "type": { - "type": "reference", - "name": "IConstructor", - "id": 2 - } - }, - { - "id": 7, - "name": "new IConstructor", - "kind": 16384, - "kindString": "Constructor signature", - "flags": {}, - "parameters": [ - { - "id": 8, - "name": "x", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "reference", - "name": "String" - } - }, - { - "id": 9, - "name": "y", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "reference", - "name": "String" - } - } - ], - "type": { - "type": "reference", - "name": "IConstructor", - "id": 2 - } - }, - { - "id": 10, - "name": "new IConstructor", - "kind": 16384, - "kindString": "Constructor signature", - "flags": {}, - "parameters": [ - { - "id": 11, - "name": "x", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "reference", - "name": "String" - } - }, - { - "id": 12, - "name": "y", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "reference", - "name": "String" - } - } - ], - "type": { - "type": "reference", - "name": "IInstance", - "id": 13 - } - } - ], - "sources": [ - { - "fileName": "constructor-type.ts", - "line": 3, - "character": 24 - }, - { - "fileName": "constructor-type.ts", - "line": 6, - "character": 28 - }, - { - "fileName": "constructor-type.ts", - "line": 9, - "character": 43 - } - ] - } - ], - "groups": [ - { - "title": "Constructors", - "kind": 512, - "children": [ - 3 - ] - } - ], - "sources": [ - { - "fileName": "constructor-type.ts", - "line": 3, - "character": 22 - } - ] - }, - { - "id": 13, - "name": "IInstance", - "kind": 256, - "kindString": "Interface", - "flags": {}, - "sources": [ - { - "fileName": "constructor-type.ts", - "line": 15, - "character": 19 - } - ] - } - ], - "groups": [ - { - "title": "Interfaces", - "kind": 256, - "children": [ - 2, - 13 - ] - } - ], - "sources": [ - { - "fileName": "constructor-type.ts", - "line": 1, - "character": 0 - } - ] - } - ], - "groups": [ - { - "title": "External modules", - "kind": 1, - "children": [ - 1 - ] - } - ] -} \ No newline at end of file