diff --git a/examples/packages/library1/src/index.ts b/examples/packages/library1/src/index.ts index 26de664..d1ed6bf 100644 --- a/examples/packages/library1/src/index.ts +++ b/examples/packages/library1/src/index.ts @@ -14,6 +14,8 @@ export type B = number /** * A dumb type + * + * @typeParam T - a type template */ export type DumbType = { foo: T } @@ -124,6 +126,7 @@ export function add(a: number, b: number): number { * un dummy * * @param dummy - A dummy + * @typeParam T - a type template */ export function undumbify(dummy: DumbType): T { return dummy.foo @@ -161,7 +164,10 @@ export interface AddCallable { * @param a target 1 * @param b target 2 * @returns added value - * + * + * @typeParam A - a target 1 Type + * @typeParam B - a target 2 Type + * * @public */ (a: A, b: B): number @@ -170,7 +176,6 @@ export interface AddCallable { * @param a target 1 * @param b target 2 * @returns added string value - * * @public */ (a: A, b: B): string @@ -196,6 +201,8 @@ export interface MyOptions { * @remarks * This is remarks of Calculator class * + * @typeParam T - A type of calcualator class + * * @example * ```javascript * const c = new Calculator() @@ -205,18 +212,18 @@ export interface MyOptions { * * @public */ -export class Calculator implements Calculatable { +export class Calculator implements Calculatable { /** * calcurator types */ - type: string + type: T /** * Conssutructor of usage * * @param type calculator type */ - constructor(type: string) { + constructor(type: T) { this.type = type } diff --git a/src/processor/utils.ts b/src/processor/utils.ts index 041ba70..a98174c 100644 --- a/src/processor/utils.ts +++ b/src/processor/utils.ts @@ -72,6 +72,33 @@ export function buildFunctionContent( builder.newline() } + // type params + if (docs.typeParams && docs.typeParams.count > 0) { + builder.pushline(`**Type parameters**`) + builder.newline() + builder.pushline(`| Parameter | Description |`) + builder.pushline(`| --- | --- |`) + for (const p of docs.typeParams.blocks) { + builder.pushline( + `| ${p.parameterName} | ${ + p.content + ? getDocSectionContent( + model, + pkg, + // @ts-ignore TODO: + p.content, + item, + style, + resolver, + customTags + ) + : '' + } |` + ) + } + builder.newline() + } + // parameters const itemParam = item as ApiParameterListMixin if (itemParam.parameters) { @@ -369,6 +396,33 @@ export function buildContentForClassinizable( builder.newline() } + // type params + if (docs.typeParams && docs.typeParams.count > 0) { + builder.pushline(`**Type parameters**`) + builder.newline() + builder.pushline(`| Parameter | Description |`) + builder.pushline(`| --- | --- |`) + for (const p of docs.typeParams.blocks) { + builder.pushline( + `| ${p.parameterName} | ${ + p.content + ? getDocSectionContent( + model, + pkg, + // @ts-ignore TODO: + p.content, + item, + style, + resolver, + customTags + ) + : '' + } |` + ) + } + builder.newline() + } + // parameters const itemParam = item as ApiParameterListMixin if ( @@ -722,6 +776,33 @@ export function buildTypeAliasContent( builder.newline() } + // type params + if (docs.typeParams && docs.typeParams.count > 0) { + builder.pushline(`**Type parameters**`) + builder.newline() + builder.pushline(`| Parameter | Description |`) + builder.pushline(`| --- | --- |`) + for (const p of docs.typeParams.blocks) { + builder.pushline( + `| ${p.parameterName} | ${ + p.content + ? getDocSectionContent( + model, + pkg, + // @ts-ignore TODO: + p.content, + item, + style, + resolver, + customTags + ) + : '' + } |` + ) + } + builder.newline() + } + // remarks if (docs.remarksBlock) { builder.pushline(`${'#'.repeat(base + 1)} Remarks`) diff --git a/test/__snapshots__/generator.test.ts.snap b/test/__snapshots__/generator.test.ts.snap index 92e1fa4..9b2296b 100644 --- a/test/__snapshots__/generator.test.ts.snap +++ b/test/__snapshots__/generator.test.ts.snap @@ -32,6 +32,12 @@ export declare type DumbType = { }; \`\`\` +**Type parameters** + +| Parameter | Description | +| --- | --- | +| T | a type template | + ## FallbackLocale Falback Locale @@ -119,6 +125,12 @@ un dummy export declare function undumbify(dummy: DumbType): T; \`\`\` +**Type parameters** + +| Parameter | Description | +| --- | --- | +| T | a type template | + ### Parameters | Parameter | Type | Description | @@ -152,6 +164,13 @@ add callable object (a: A, b: B): number; \`\`\` +**Type parameters** + +| Parameter | Description | +| --- | --- | +| A | a target 1 Type | +| B | a target 2 Type | + *Parameters* | Parameter | Type | Description | @@ -263,9 +282,15 @@ Calculator class **Signature:** \`\`\`typescript -export declare class Calculator implements Calculatable +export declare class Calculator implements Calculatable \`\`\` +**Type parameters** + +| Parameter | Description | +| --- | --- | +| T | A type of calcualator class | + ### Remarks This is remarks of Calculator class @@ -287,14 +312,14 @@ Conssutructor of usage **Signature:** \`\`\`typescript -constructor(type: string); +constructor(type: T); \`\`\` *Parameters* | Parameter | Type | Description | | --- | --- | --- | -| type | string | calculator type | +| type | T | calculator type | ### Methods @@ -349,7 +374,7 @@ calcurator types **Signature:** \`\`\`typescript -type: string; +type: T; \`\`\` @@ -607,6 +632,12 @@ export declare type DumbType = { }; \`\`\` +**Type parameters** + +| Parameter | Description | +| --- | --- | +| T | a type template | + ## FallbackLocale Falback Locale @@ -694,6 +725,12 @@ un dummy export declare function undumbify(dummy: DumbType): T; \`\`\` +**Type parameters** + +| Parameter | Description | +| --- | --- | +| T | a type template | + ### Parameters | Parameter | Type | Description | @@ -727,6 +764,13 @@ add callable object (a: A, b: B): number; \`\`\` +**Type parameters** + +| Parameter | Description | +| --- | --- | +| A | a target 1 Type | +| B | a target 2 Type | + *Parameters* | Parameter | Type | Description | @@ -838,9 +882,15 @@ Calculator class **Signature:** \`\`\`typescript -export declare class Calculator implements Calculatable +export declare class Calculator implements Calculatable \`\`\` +**Type parameters** + +| Parameter | Description | +| --- | --- | +| T | A type of calcualator class | + ### Remarks This is remarks of Calculator class @@ -862,14 +912,14 @@ Conssutructor of usage **Signature:** \`\`\`typescript -constructor(type: string); +constructor(type: T); \`\`\` *Parameters* | Parameter | Type | Description | | --- | --- | --- | -| type | string | calculator type | +| type | T | calculator type | ### Methods @@ -924,7 +974,7 @@ calcurator types **Signature:** \`\`\`typescript -type: string; +type: T; \`\`\` @@ -1182,6 +1232,12 @@ export declare type DumbType = { }; \`\`\` +**Type parameters** + +| Parameter | Description | +| --- | --- | +| T | a type template | + ## FallbackLocale Falback Locale @@ -1269,6 +1325,12 @@ un dummy export declare function undumbify(dummy: DumbType): T; \`\`\` +**Type parameters** + +| Parameter | Description | +| --- | --- | +| T | a type template | + ### Parameters | Parameter | Type | Description | @@ -1302,6 +1364,13 @@ add callable object (a: A, b: B): number; \`\`\` +**Type parameters** + +| Parameter | Description | +| --- | --- | +| A | a target 1 Type | +| B | a target 2 Type | + *Parameters* | Parameter | Type | Description | @@ -1413,9 +1482,15 @@ Calculator class **Signature:** \`\`\`typescript -export declare class Calculator implements Calculatable +export declare class Calculator implements Calculatable \`\`\` +**Type parameters** + +| Parameter | Description | +| --- | --- | +| T | A type of calcualator class | + ### Remarks This is remarks of Calculator class @@ -1437,14 +1512,14 @@ Conssutructor of usage **Signature:** \`\`\`typescript -constructor(type: string); +constructor(type: T); \`\`\` *Parameters* | Parameter | Type | Description | | --- | --- | --- | -| type | string | calculator type | +| type | T | calculator type | ### Methods @@ -1499,7 +1574,7 @@ calcurator types **Signature:** \`\`\`typescript -type: string; +type: T; \`\`\` diff --git a/test/__snapshots__/mutli.test.ts.snap b/test/__snapshots__/mutli.test.ts.snap index 8a3c44c..947e045 100644 --- a/test/__snapshots__/mutli.test.ts.snap +++ b/test/__snapshots__/mutli.test.ts.snap @@ -368,9 +368,15 @@ Calculator class **Signature:** \`\`\`typescript -export declare class Calculator implements Calculatable +export declare class Calculator implements Calculatable \`\`\` +**Type parameters** + +| Parameter | Description | +| --- | --- | +| T | A type of calcualator class | + ### Remarks This is remarks of Calculator class @@ -392,14 +398,14 @@ Conssutructor of usage **Signature:** \`\`\`typescript -constructor(type: string); +constructor(type: T); \`\`\` *Parameters* | Parameter | Type | Description | | --- | --- | --- | -| type | string | calculator type | +| type | T | calculator type | ### Methods @@ -454,7 +460,7 @@ calcurator types **Signature:** \`\`\`typescript -type: string; +type: T; \`\`\` @@ -554,6 +560,12 @@ un dummy export declare function undumbify(dummy: DumbType): T; \`\`\` +**Type parameters** + +| Parameter | Description | +| --- | --- | +| T | a type template | + ### Parameters | Parameter | Type | Description | @@ -587,6 +599,13 @@ add callable object (a: A, b: B): number; \`\`\` +**Type parameters** + +| Parameter | Description | +| --- | --- | +| A | a target 1 Type | +| B | a target 2 Type | + *Parameters* | Parameter | Type | Description | @@ -721,6 +740,12 @@ export declare type DumbType = { }; \`\`\` +**Type parameters** + +| Parameter | Description | +| --- | --- | +| T | a type template | + ## FallbackLocale Falback Locale diff --git a/test/__snapshots__/toc.test.ts.snap b/test/__snapshots__/toc.test.ts.snap index 500ddb7..fd1c5d6 100644 --- a/test/__snapshots__/toc.test.ts.snap +++ b/test/__snapshots__/toc.test.ts.snap @@ -59,6 +59,12 @@ export declare type DumbType = { }; \`\`\` +**Type parameters** + +| Parameter | Description | +| --- | --- | +| T | a type template | + ### FallbackLocale Falback Locale @@ -143,6 +149,12 @@ un dummy export declare function undumbify(dummy: DumbType): T; \`\`\` +**Type parameters** + +| Parameter | Description | +| --- | --- | +| T | a type template | + #### Parameters | Parameter | Type | Description | @@ -173,6 +185,13 @@ add callable object (a: A, b: B): number; \`\`\` +**Type parameters** + +| Parameter | Description | +| --- | --- | +| A | a target 1 Type | +| B | a target 2 Type | + *Parameters* | Parameter | Type | Description | @@ -281,9 +300,15 @@ Calculator class **Signature:** \`\`\`typescript -export declare class Calculator implements Calculatable +export declare class Calculator implements Calculatable \`\`\` +**Type parameters** + +| Parameter | Description | +| --- | --- | +| T | A type of calcualator class | + ### Remarks This is remarks of Calculator class @@ -305,14 +330,14 @@ Conssutructor of usage **Signature:** \`\`\`typescript -constructor(type: string); +constructor(type: T); \`\`\` *Parameters* | Parameter | Type | Description | | --- | --- | --- | -| type | string | calculator type | +| type | T | calculator type | #### Methods @@ -367,7 +392,7 @@ calcurator types **Signature:** \`\`\`typescript -type: string; +type: T; \`\`\` diff --git a/test/fixtures/library1.api.json b/test/fixtures/library1.api.json index ad15308..2348c13 100644 --- a/test/fixtures/library1.api.json +++ b/test/fixtures/library1.api.json @@ -1,1260 +1,1273 @@ -{ - "metadata": { - "toolPackage": "@microsoft/api-extractor", - "toolVersion": "7.15.2", - "schemaVersion": 1004, - "oldestForwardsCompatibleVersion": 1001, - "tsdocConfig": { - "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", - "noStandardTags": true, - "tagDefinitions": [ - { - "tagName": "@alpha", - "syntaxKind": "modifier" - }, - { - "tagName": "@beta", - "syntaxKind": "modifier" - }, - { - "tagName": "@defaultValue", - "syntaxKind": "block" - }, - { - "tagName": "@decorator", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@deprecated", - "syntaxKind": "block" - }, - { - "tagName": "@eventProperty", - "syntaxKind": "modifier" - }, - { - "tagName": "@example", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@experimental", - "syntaxKind": "modifier" - }, - { - "tagName": "@inheritDoc", - "syntaxKind": "inline" - }, - { - "tagName": "@internal", - "syntaxKind": "modifier" - }, - { - "tagName": "@label", - "syntaxKind": "inline" - }, - { - "tagName": "@link", - "syntaxKind": "inline", - "allowMultiple": true - }, - { - "tagName": "@override", - "syntaxKind": "modifier" - }, - { - "tagName": "@packageDocumentation", - "syntaxKind": "modifier" - }, - { - "tagName": "@param", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@privateRemarks", - "syntaxKind": "block" - }, - { - "tagName": "@public", - "syntaxKind": "modifier" - }, - { - "tagName": "@readonly", - "syntaxKind": "modifier" - }, - { - "tagName": "@remarks", - "syntaxKind": "block" - }, - { - "tagName": "@returns", - "syntaxKind": "block" - }, - { - "tagName": "@sealed", - "syntaxKind": "modifier" - }, - { - "tagName": "@see", - "syntaxKind": "block" - }, - { - "tagName": "@throws", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@typeParam", - "syntaxKind": "block", - "allowMultiple": true - }, - { - "tagName": "@virtual", - "syntaxKind": "modifier" - }, - { - "tagName": "@betaDocumentation", - "syntaxKind": "modifier" - }, - { - "tagName": "@internalRemarks", - "syntaxKind": "block" - }, - { - "tagName": "@preapproved", - "syntaxKind": "modifier" - } - ], - "supportForTags": { - "@alpha": true, - "@beta": true, - "@defaultValue": true, - "@decorator": true, - "@deprecated": true, - "@eventProperty": true, - "@example": true, - "@experimental": true, - "@inheritDoc": true, - "@internal": true, - "@label": true, - "@link": true, - "@override": true, - "@packageDocumentation": true, - "@param": true, - "@privateRemarks": true, - "@public": true, - "@readonly": true, - "@remarks": true, - "@returns": true, - "@sealed": true, - "@see": true, - "@throws": true, - "@typeParam": true, - "@virtual": true, - "@betaDocumentation": true, - "@internalRemarks": true, - "@preapproved": true - } - } - }, - "kind": "Package", - "canonicalReference": "library1!", - "docComment": "", - "name": "library1", - "members": [ - { - "kind": "EntryPoint", - "canonicalReference": "library1!", - "name": "", - "members": [ - { - "kind": "TypeAlias", - "canonicalReference": "library1!A:type", - "docComment": "/**\n * A\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type A = " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "releaseTag": "Public", - "name": "A", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Function", - "canonicalReference": "library1!add:function(1)", - "docComment": "/**\n * add function : `x`\n *\n * @remarks\n *\n * This is add function remarks: {@link ErrorCodes}.\n *\n * See {@link https://foo.bar.com/api/add | add}.\n *\n * @param a - target `1`\n *\n * @param b - target 2\n *\n * @returns result as `a` + `b`\n *\n * @throws\n *\n * `SyntaxError` this is syntax error\n *\n * @throws\n *\n * `Error` this is general error\n *\n * @example\n *\n * example of `add` function:\n * ```javascript\n * console.log(add(1, 1))\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function add(a: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", b: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "a", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "parameterName": "b", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - } - ], - "name": "add" - }, - { - "kind": "Interface", - "canonicalReference": "library1!AddCallable:interface", - "docComment": "/**\n * Add Callable interface\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface AddCallable " - } - ], - "releaseTag": "Public", - "name": "AddCallable", - "members": [ - { - "kind": "CallSignature", - "canonicalReference": "library1!AddCallable:call(1)", - "docComment": "/**\n * add callable object\n *\n * @param a - target 1\n *\n * @param b - target 2\n *\n * @returns added value\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "(a: " - }, - { - "kind": "Content", - "text": "A" - }, - { - "kind": "Content", - "text": ", b: " - }, - { - "kind": "Content", - "text": "B" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "returnTypeTokenRange": { - "startIndex": 13, - "endIndex": 14 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "a", - "parameterTypeTokenRange": { - "startIndex": 9, - "endIndex": 10 - } - }, - { - "parameterName": "b", - "parameterTypeTokenRange": { - "startIndex": 11, - "endIndex": 12 - } - } - ], - "typeParameters": [ - { - "typeParameterName": "A", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - }, - { - "typeParameterName": "B", - "constraintTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "defaultTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - } - } - ] - }, - { - "kind": "CallSignature", - "canonicalReference": "library1!AddCallable:call(2)", - "docComment": "/**\n * add callable object\n *\n * @param a - target 1\n *\n * @param b - target 2\n *\n * @returns added string value\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "(a: " - }, - { - "kind": "Content", - "text": "A" - }, - { - "kind": "Content", - "text": ", b: " - }, - { - "kind": "Content", - "text": "B" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "returnTypeTokenRange": { - "startIndex": 13, - "endIndex": 14 - }, - "releaseTag": "Public", - "overloadIndex": 2, - "parameters": [ - { - "parameterName": "a", - "parameterTypeTokenRange": { - "startIndex": 9, - "endIndex": 10 - } - }, - { - "parameterName": "b", - "parameterTypeTokenRange": { - "startIndex": 11, - "endIndex": 12 - } - } - ], - "typeParameters": [ - { - "typeParameterName": "A", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "defaultTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - }, - { - "typeParameterName": "B", - "constraintTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "defaultTypeTokenRange": { - "startIndex": 7, - "endIndex": 8 - } - } - ] - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "TypeAlias", - "canonicalReference": "library1!B:type", - "docComment": "/**\n * {@link A}\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type B = " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "releaseTag": "Public", - "name": "B", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Interface", - "canonicalReference": "library1!Calculatable:interface", - "docComment": "/**\n * Calculatable interface\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface Calculatable " - } - ], - "releaseTag": "Public", - "name": "Calculatable", - "members": [ - { - "kind": "MethodSignature", - "canonicalReference": "library1!Calculatable#add:member(1)", - "docComment": "/**\n * add method\n *\n * @param a - target 1\n *\n * @param b - target 2\n *\n * @returns added value\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "add(a: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", b: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "a", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "parameterName": "b", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - } - ], - "name": "add" - }, - { - "kind": "PropertySignature", - "canonicalReference": "library1!Calculatable#PI:member", - "docComment": "/**\n * PI\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "PI: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "PI", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Class", - "canonicalReference": "library1!Calculator:class", - "docComment": "/**\n * Calculator class\n *\n * @remarks\n *\n * This is remarks of Calculator class\n *\n * @example\n * ```javascript\n * const c = new Calculator()\n * const v1 = c.add(1, 1)\n * const v2 = c.sub(1, 1)\n * ```\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare class Calculator implements " - }, - { - "kind": "Reference", - "text": "Calculatable", - "canonicalReference": "library1!Calculatable:interface" - }, - { - "kind": "Content", - "text": " " - } - ], - "releaseTag": "Public", - "name": "Calculator", - "members": [ - { - "kind": "Constructor", - "canonicalReference": "library1!Calculator:constructor(1)", - "docComment": "/**\n * Conssutructor of usage\n *\n * @param type - calculator type\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "constructor(type: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ");" - } - ], - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "type", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ] - }, - { - "kind": "Method", - "canonicalReference": "library1!Calculator#add:member(1)", - "docComment": "/**\n * add method\n *\n * @param a - target 1\n *\n * @param b - target 2\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "add(a: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", b: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "a", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "parameterName": "b", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - } - ], - "name": "add" - }, - { - "kind": "Property", - "canonicalReference": "library1!Calculator#PI:member", - "docComment": "/**\n * PI\n *\n * @returns 3.14\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "PI: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "PI", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false - }, - { - "kind": "Method", - "canonicalReference": "library1!Calculator#sub:member(1)", - "docComment": "/**\n * sub method\n *\n * @param a - target 1\n *\n * @param b - target 2\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "sub(a: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ", b: " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "number" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "isStatic": false, - "returnTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "a", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "parameterName": "b", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - } - } - ], - "name": "sub" - }, - { - "kind": "Property", - "canonicalReference": "library1!Calculator#type:member", - "docComment": "/**\n * calcurator types\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "type: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": false, - "releaseTag": "Public", - "name": "type", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isStatic": false - } - ], - "implementsTokenRanges": [ - { - "startIndex": 1, - "endIndex": 3 - } - ] - }, - { - "kind": "Variable", - "canonicalReference": "library1!Config:var", - "docComment": "/**\n * Configrations\n *\n * @defaultValue\n *\n * `{}`\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "Config: " - }, - { - "kind": "Content", - "text": "{\n [name: string]: unknown;\n}" - } - ], - "releaseTag": "Public", - "name": "Config", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "library1!DumbType:type", - "docComment": "/**\n * A dumb type\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type DumbType = " - }, - { - "kind": "Content", - "text": "{\n foo: T;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "releaseTag": "Public", - "name": "DumbType", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Enum", - "canonicalReference": "library1!ErrorCodes:enum", - "docComment": "/**\n * Error Code\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare enum ErrorCodes " - } - ], - "releaseTag": "Public", - "name": "ErrorCodes", - "members": [ - { - "kind": "EnumMember", - "canonicalReference": "library1!ErrorCodes.InvalidFormat:member", - "docComment": "/**\n * Invalid format\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "InvalidFormat = " - }, - { - "kind": "Content", - "text": "1" - } - ], - "releaseTag": "Public", - "name": "InvalidFormat", - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "EnumMember", - "canonicalReference": "library1!ErrorCodes.Succcess:member", - "docComment": "/**\n * Success\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "Succcess = " - }, - { - "kind": "Content", - "text": "0" - } - ], - "releaseTag": "Public", - "name": "Succcess", - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ] - }, - { - "kind": "TypeAlias", - "canonicalReference": "library1!FallbackLocale:type", - "docComment": "/**\n * Falback Locale\n *\n * @remarks\n *\n * This is remarks of `Fallback Locale`\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type FallbackLocale = " - }, - { - "kind": "Reference", - "text": "Locale", - "canonicalReference": "library1!Locale:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "Locale", - "canonicalReference": "library1!Locale:type" - }, - { - "kind": "Content", - "text": "[] | {\n [locale in string]: " - }, - { - "kind": "Reference", - "text": "Locale", - "canonicalReference": "library1!Locale:type" - }, - { - "kind": "Content", - "text": "[];\n} | false" - }, - { - "kind": "Content", - "text": ";" - } - ], - "releaseTag": "Public", - "name": "FallbackLocale", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 7 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "library1!Locale:type", - "docComment": "/**\n * Locale\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type Locale = " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "releaseTag": "Public", - "name": "Locale", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "library1!LocaleMessage:type", - "docComment": "/**\n * Locale Message resources\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare type LocaleMessage = " - }, - { - "kind": "Content", - "text": "string | " - }, - { - "kind": "Reference", - "text": "LocaleMessage", - "canonicalReference": "library1!LocaleMessage:type" - }, - { - "kind": "Content", - "text": "[]" - }, - { - "kind": "Content", - "text": ";" - } - ], - "releaseTag": "Public", - "name": "LocaleMessage", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, - { - "kind": "Interface", - "canonicalReference": "library1!MyOptions:interface", - "docComment": "/**\n * My Options\n *\n * @public\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export interface MyOptions " - } - ], - "releaseTag": "Public", - "name": "MyOptions", - "members": [ - { - "kind": "PropertySignature", - "canonicalReference": "library1!MyOptions#field:member", - "docComment": "/**\n * Field\n *\n * @defaultValue\n *\n * `'simple'`\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "field?: " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "isOptional": true, - "releaseTag": "Public", - "name": "field", - "propertyTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ], - "extendsTokenRanges": [] - }, - { - "kind": "Enum", - "canonicalReference": "library1!TokenChars:enum", - "docComment": "/**\n * Token Characters\n *\n * @remarks\n *\n * This is remarks of Token Chararaceters\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare enum TokenChars " - } - ], - "releaseTag": "Public", - "name": "TokenChars", - "members": [ - { - "kind": "EnumMember", - "canonicalReference": "library1!TokenChars.Modulo:member", - "docComment": "/**\n * Modulo charactor\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "Modulo = " - }, - { - "kind": "Content", - "text": "\"%\"" - } - ], - "releaseTag": "Public", - "name": "Modulo", - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "EnumMember", - "canonicalReference": "library1!TokenChars.Plus:member", - "docComment": "/**\n * Plus charactor\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "Plus = " - }, - { - "kind": "Content", - "text": "\"+\"" - } - ], - "releaseTag": "Public", - "name": "Plus", - "initializerTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - } - ] - }, - { - "kind": "Function", - "canonicalReference": "library1!undumbify:function(1)", - "docComment": "/**\n * un dummy\n *\n * @param dummy - A dummy\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "export declare function undumbify(dummy: " - }, - { - "kind": "Reference", - "text": "DumbType", - "canonicalReference": "library1!DumbType:type" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "T" - }, - { - "kind": "Content", - "text": ";" - } - ], - "returnTypeTokenRange": { - "startIndex": 4, - "endIndex": 5 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "dummy", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - } - ], - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "name": "undumbify" - }, - { - "kind": "Variable", - "canonicalReference": "library1!VERSION:var", - "docComment": "/**\n * app version\n *\n * @remarks\n *\n * you can lookup application version that is semver format.\n *\n * @example\n * ```javascript\n * console.log(VERSION)\n * ```\n *\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "VERSION = \"1.0.0\"" - } - ], - "releaseTag": "Public", - "name": "VERSION", - "variableTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ] - } - ] -} +{ + "metadata": { + "toolPackage": "@microsoft/api-extractor", + "toolVersion": "7.15.2", + "schemaVersion": 1004, + "oldestForwardsCompatibleVersion": 1001, + "tsdocConfig": { + "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", + "noStandardTags": true, + "tagDefinitions": [ + { + "tagName": "@alpha", + "syntaxKind": "modifier" + }, + { + "tagName": "@beta", + "syntaxKind": "modifier" + }, + { + "tagName": "@defaultValue", + "syntaxKind": "block" + }, + { + "tagName": "@decorator", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@deprecated", + "syntaxKind": "block" + }, + { + "tagName": "@eventProperty", + "syntaxKind": "modifier" + }, + { + "tagName": "@example", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@experimental", + "syntaxKind": "modifier" + }, + { + "tagName": "@inheritDoc", + "syntaxKind": "inline" + }, + { + "tagName": "@internal", + "syntaxKind": "modifier" + }, + { + "tagName": "@label", + "syntaxKind": "inline" + }, + { + "tagName": "@link", + "syntaxKind": "inline", + "allowMultiple": true + }, + { + "tagName": "@override", + "syntaxKind": "modifier" + }, + { + "tagName": "@packageDocumentation", + "syntaxKind": "modifier" + }, + { + "tagName": "@param", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@privateRemarks", + "syntaxKind": "block" + }, + { + "tagName": "@public", + "syntaxKind": "modifier" + }, + { + "tagName": "@readonly", + "syntaxKind": "modifier" + }, + { + "tagName": "@remarks", + "syntaxKind": "block" + }, + { + "tagName": "@returns", + "syntaxKind": "block" + }, + { + "tagName": "@sealed", + "syntaxKind": "modifier" + }, + { + "tagName": "@see", + "syntaxKind": "block" + }, + { + "tagName": "@throws", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@typeParam", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@virtual", + "syntaxKind": "modifier" + }, + { + "tagName": "@betaDocumentation", + "syntaxKind": "modifier" + }, + { + "tagName": "@internalRemarks", + "syntaxKind": "block" + }, + { + "tagName": "@preapproved", + "syntaxKind": "modifier" + } + ], + "supportForTags": { + "@alpha": true, + "@beta": true, + "@defaultValue": true, + "@decorator": true, + "@deprecated": true, + "@eventProperty": true, + "@example": true, + "@experimental": true, + "@inheritDoc": true, + "@internal": true, + "@label": true, + "@link": true, + "@override": true, + "@packageDocumentation": true, + "@param": true, + "@privateRemarks": true, + "@public": true, + "@readonly": true, + "@remarks": true, + "@returns": true, + "@sealed": true, + "@see": true, + "@throws": true, + "@typeParam": true, + "@virtual": true, + "@betaDocumentation": true, + "@internalRemarks": true, + "@preapproved": true + } + } + }, + "kind": "Package", + "canonicalReference": "library1!", + "docComment": "", + "name": "library1", + "members": [ + { + "kind": "EntryPoint", + "canonicalReference": "library1!", + "name": "", + "members": [ + { + "kind": "TypeAlias", + "canonicalReference": "library1!A:type", + "docComment": "/**\n * A\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare type A = " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "A", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Function", + "canonicalReference": "library1!add:function(1)", + "docComment": "/**\n * add function : `x`\n *\n * @remarks\n *\n * This is add function remarks: {@link ErrorCodes}.\n *\n * See {@link https://foo.bar.com/api/add | add}.\n *\n * @param a - target `1`\n *\n * @param b - target 2\n *\n * @returns result as `a` + `b`\n *\n * @throws\n *\n * `SyntaxError` this is syntax error\n *\n * @throws\n *\n * `Error` this is general error\n *\n * @example\n *\n * example of `add` function:\n * ```javascript\n * console.log(add(1, 1))\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function add(a: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", b: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "a", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "parameterName": "b", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ], + "name": "add" + }, + { + "kind": "Interface", + "canonicalReference": "library1!AddCallable:interface", + "docComment": "/**\n * Add Callable interface\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface AddCallable " + } + ], + "releaseTag": "Public", + "name": "AddCallable", + "members": [ + { + "kind": "CallSignature", + "canonicalReference": "library1!AddCallable:call(1)", + "docComment": "/**\n * add callable object\n *\n * @param a - target 1\n *\n * @param b - target 2\n *\n * @typeParam A - a target 1 Type\n *\n * @typeParam B - a target 2 Type\n *\n * @returns added value\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "(a: " + }, + { + "kind": "Content", + "text": "A" + }, + { + "kind": "Content", + "text": ", b: " + }, + { + "kind": "Content", + "text": "B" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "returnTypeTokenRange": { + "startIndex": 13, + "endIndex": 14 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "a", + "parameterTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + } + }, + { + "parameterName": "b", + "parameterTypeTokenRange": { + "startIndex": 11, + "endIndex": 12 + } + } + ], + "typeParameters": [ + { + "typeParameterName": "A", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + }, + { + "typeParameterName": "B", + "constraintTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "defaultTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + } + } + ] + }, + { + "kind": "CallSignature", + "canonicalReference": "library1!AddCallable:call(2)", + "docComment": "/**\n * add callable object\n *\n * @param a - target 1\n *\n * @param b - target 2\n *\n * @returns added string value\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "(a: " + }, + { + "kind": "Content", + "text": "A" + }, + { + "kind": "Content", + "text": ", b: " + }, + { + "kind": "Content", + "text": "B" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "returnTypeTokenRange": { + "startIndex": 13, + "endIndex": 14 + }, + "releaseTag": "Public", + "overloadIndex": 2, + "parameters": [ + { + "parameterName": "a", + "parameterTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + } + }, + { + "parameterName": "b", + "parameterTypeTokenRange": { + "startIndex": 11, + "endIndex": 12 + } + } + ], + "typeParameters": [ + { + "typeParameterName": "A", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "defaultTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + }, + { + "typeParameterName": "B", + "constraintTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "defaultTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + } + } + ] + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "library1!B:type", + "docComment": "/**\n * {@link A}\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare type B = " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "B", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Interface", + "canonicalReference": "library1!Calculatable:interface", + "docComment": "/**\n * Calculatable interface\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface Calculatable " + } + ], + "releaseTag": "Public", + "name": "Calculatable", + "members": [ + { + "kind": "MethodSignature", + "canonicalReference": "library1!Calculatable#add:member(1)", + "docComment": "/**\n * add method\n *\n * @param a - target 1\n *\n * @param b - target 2\n *\n * @returns added value\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "add(a: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", b: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "a", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "parameterName": "b", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ], + "name": "add" + }, + { + "kind": "PropertySignature", + "canonicalReference": "library1!Calculatable#PI:member", + "docComment": "/**\n * PI\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "PI: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "PI", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "library1!Calculator:class", + "docComment": "/**\n * Calculator class\n *\n * @remarks\n *\n * This is remarks of Calculator class\n *\n * @typeParam T - A type of calcualator class\n *\n * @example\n * ```javascript\n * const c = new Calculator()\n * const v1 = c.add(1, 1)\n * const v2 = c.sub(1, 1)\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class Calculator implements " + }, + { + "kind": "Reference", + "text": "Calculatable", + "canonicalReference": "library1!Calculatable:interface" + }, + { + "kind": "Content", + "text": " " + } + ], + "releaseTag": "Public", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "Calculator", + "members": [ + { + "kind": "Constructor", + "canonicalReference": "library1!Calculator:constructor(1)", + "docComment": "/**\n * Conssutructor of usage\n *\n * @param type - calculator type\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(type: " + }, + { + "kind": "Content", + "text": "T" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "type", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ] + }, + { + "kind": "Method", + "canonicalReference": "library1!Calculator#add:member(1)", + "docComment": "/**\n * add method\n *\n * @param a - target 1\n *\n * @param b - target 2\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "add(a: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", b: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "a", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "parameterName": "b", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ], + "name": "add" + }, + { + "kind": "Property", + "canonicalReference": "library1!Calculator#PI:member", + "docComment": "/**\n * PI\n *\n * @returns 3.14\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "PI: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "PI", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + }, + { + "kind": "Method", + "canonicalReference": "library1!Calculator#sub:member(1)", + "docComment": "/**\n * sub method\n *\n * @param a - target 1\n *\n * @param b - target 2\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "sub(a: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ", b: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "a", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "parameterName": "b", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + } + ], + "name": "sub" + }, + { + "kind": "Property", + "canonicalReference": "library1!Calculator#type:member", + "docComment": "/**\n * calcurator types\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "type: " + }, + { + "kind": "Content", + "text": "T" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "type", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isStatic": false + } + ], + "implementsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 3 + } + ] + }, + { + "kind": "Variable", + "canonicalReference": "library1!Config:var", + "docComment": "/**\n * Configrations\n *\n * @defaultValue\n *\n * `{}`\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "Config: " + }, + { + "kind": "Content", + "text": "{\n [name: string]: unknown;\n}" + } + ], + "releaseTag": "Public", + "name": "Config", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "library1!DumbType:type", + "docComment": "/**\n * A dumb type\n *\n * @typeParam T - a type template\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare type DumbType = " + }, + { + "kind": "Content", + "text": "{\n foo: T;\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "DumbType", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Enum", + "canonicalReference": "library1!ErrorCodes:enum", + "docComment": "/**\n * Error Code\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare enum ErrorCodes " + } + ], + "releaseTag": "Public", + "name": "ErrorCodes", + "members": [ + { + "kind": "EnumMember", + "canonicalReference": "library1!ErrorCodes.InvalidFormat:member", + "docComment": "/**\n * Invalid format\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "InvalidFormat = " + }, + { + "kind": "Content", + "text": "1" + } + ], + "releaseTag": "Public", + "name": "InvalidFormat", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "EnumMember", + "canonicalReference": "library1!ErrorCodes.Succcess:member", + "docComment": "/**\n * Success\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "Succcess = " + }, + { + "kind": "Content", + "text": "0" + } + ], + "releaseTag": "Public", + "name": "Succcess", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ] + }, + { + "kind": "TypeAlias", + "canonicalReference": "library1!FallbackLocale:type", + "docComment": "/**\n * Falback Locale\n *\n * @remarks\n *\n * This is remarks of `Fallback Locale`\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare type FallbackLocale = " + }, + { + "kind": "Reference", + "text": "Locale", + "canonicalReference": "library1!Locale:type" + }, + { + "kind": "Content", + "text": " | " + }, + { + "kind": "Reference", + "text": "Locale", + "canonicalReference": "library1!Locale:type" + }, + { + "kind": "Content", + "text": "[] | {\n [locale in string]: " + }, + { + "kind": "Reference", + "text": "Locale", + "canonicalReference": "library1!Locale:type" + }, + { + "kind": "Content", + "text": "[];\n} | false" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "FallbackLocale", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 7 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "library1!Locale:type", + "docComment": "/**\n * Locale\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare type Locale = " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "Locale", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "library1!LocaleMessage:type", + "docComment": "/**\n * Locale Message resources\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare type LocaleMessage = " + }, + { + "kind": "Content", + "text": "string | " + }, + { + "kind": "Reference", + "text": "LocaleMessage", + "canonicalReference": "library1!LocaleMessage:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "LocaleMessage", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Interface", + "canonicalReference": "library1!MyOptions:interface", + "docComment": "/**\n * My Options\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface MyOptions " + } + ], + "releaseTag": "Public", + "name": "MyOptions", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "library1!MyOptions#field:member", + "docComment": "/**\n * Field\n *\n * @defaultValue\n *\n * `'simple'`\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "field?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "field", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Enum", + "canonicalReference": "library1!TokenChars:enum", + "docComment": "/**\n * Token Characters\n *\n * @remarks\n *\n * This is remarks of Token Chararaceters\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare enum TokenChars " + } + ], + "releaseTag": "Public", + "name": "TokenChars", + "members": [ + { + "kind": "EnumMember", + "canonicalReference": "library1!TokenChars.Modulo:member", + "docComment": "/**\n * Modulo charactor\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "Modulo = " + }, + { + "kind": "Content", + "text": "\"%\"" + } + ], + "releaseTag": "Public", + "name": "Modulo", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "EnumMember", + "canonicalReference": "library1!TokenChars.Plus:member", + "docComment": "/**\n * Plus charactor\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "Plus = " + }, + { + "kind": "Content", + "text": "\"+\"" + } + ], + "releaseTag": "Public", + "name": "Plus", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ] + }, + { + "kind": "Function", + "canonicalReference": "library1!undumbify:function(1)", + "docComment": "/**\n * un dummy\n *\n * @param dummy - A dummy\n *\n * @typeParam T - a type template\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function undumbify(dummy: " + }, + { + "kind": "Reference", + "text": "DumbType", + "canonicalReference": "library1!DumbType:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "T" + }, + { + "kind": "Content", + "text": ";" + } + ], + "returnTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "dummy", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "undumbify" + }, + { + "kind": "Variable", + "canonicalReference": "library1!VERSION:var", + "docComment": "/**\n * app version\n *\n * @remarks\n *\n * you can lookup application version that is semver format.\n *\n * @example\n * ```javascript\n * console.log(VERSION)\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "VERSION = \"1.0.0\"" + } + ], + "releaseTag": "Public", + "name": "VERSION", + "variableTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ] + } + ] +}