diff --git a/CHANGELOG.md b/CHANGELOG.md index 250b46d95..cfbb06b23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ These TODOs will be resolved before a full release. ([GitHub project](https://gi - Node 12 is no longer officially supported as it has gone end of life as of 2022-04-30. It might still work, but may stop working at any time. - Dropped support for TypeScript before 4.6. +- TypeDoc will now produce warnings for bracketed links (`[[ target ]]`). Use `{@link target}` instead. The `{@link}` syntax will be recognized by [TypeScript 4.3](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-3.html#editor-support-for-link-tags) and later and used to provide better intellisense. TypeDoc version 0.24.0 will remove support for `[[ target ]]` style links. - `extends` in typedoc.json is now resolved using NodeJS module resolution, so a local path must begin with `./`. - In the JSON output for `DeclarationReflection`s, `getSignature` is no longer a one-tuple. - In the JSON output for `DeclarationReflection`s, `setSignature` is no longer a one-tuple. @@ -23,7 +24,6 @@ These TODOs will be resolved before a full release. ([GitHub project](https://gi - The deprecated `listInvalidSymbolLinks` option has been removed. Use `validation.invalidLink` instead. - The deprecated `true` and `false` values have been removed from `--emit`, to migrate replace `true` with `"both"` and `false` with `"docs"`. - Links are no longer be resolved against a global list of all symbols. See [the documentation](https://typedoc.org/guides/link-resolution/) for details on link resolution. -- TypeDoc will now produce warnings for bracketed links (`[[ target ]]`). Use `{@link target}` instead. The `{@link}` syntax will be recognized by [TypeScript 4.3](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-3.html#editor-support-for-link-tags) and later and used to provide better intellisense. TypeDoc version 0.24.0 will remove support for `[[ target ]]` style links. - The `validation.invalidLink` option is now on by default. - `reflection.decorates`, `reflection.decorators`, and their corresponding interfaces have been removed as no code in TypeDoc used them. - The shape of the `Comment` class has changed significantly to support multiple tag kinds. @@ -68,6 +68,8 @@ These TODOs will be resolved before a full release. ([GitHub project](https://gi - TypeDoc will now automatically inherit documentation from classes `implements` by other interfaces/classes. - Fixed `@inheritDoc` on accessors, #1927. - JS exports defined as `exports.foo = ...` will now be converted as variables rather than properties. +- The `excludeNotDocumented` option will no longer hide a module if it has a documentation comment, #1948. +- Prevent `--excludeNotDocumented` from hiding properties of type literals (`a` in `function fn(p: { a: string })`), #1752. - Corrected schema generation for https://typedoc.org/schema.json ### Thanks! diff --git a/src/lib/converter/context.ts b/src/lib/converter/context.ts index 40312ab13..aba377e9b 100644 --- a/src/lib/converter/context.ts +++ b/src/lib/converter/context.ts @@ -240,7 +240,7 @@ export class Context { } shouldIgnore(symbol: ts.Symbol) { - return this.converter.shouldIgnore(symbol, this.checker); + return this.converter.shouldIgnore(symbol); } /** diff --git a/src/lib/converter/converter.ts b/src/lib/converter/converter.ts index c093f0854..9385ef994 100644 --- a/src/lib/converter/converter.ts +++ b/src/lib/converter/converter.ts @@ -12,7 +12,6 @@ import { convertSymbol } from "./symbols"; import { createMinimatch, matchesAny } from "../utils/paths"; import type { IMinimatch } from "minimatch"; import { hasAllFlags, hasAnyFlag } from "../utils/enum"; -import { resolveAliasedSymbol } from "./utils/symbols"; import type { DocumentationEntryPoint } from "../utils/entry-point"; import type { CommentParserConfig } from "./comments"; @@ -224,11 +223,9 @@ export class Converter extends ChildableComponent< const allExports = getExports(context, node, symbol); - if ( - allExports.every((exp) => this.shouldIgnore(exp, context.checker)) - ) { + if (allExports.every((exp) => this.shouldIgnore(exp))) { this.owner.logger.verbose( - `Ignoring entry point ${entryName} since all members will be ignored.` + `All members of ${entryName} are excluded, ignoring entry point.` ); return; } @@ -292,28 +289,18 @@ export class Converter extends ChildableComponent< this.trigger(Converter.EVENT_RESOLVE_END, context); } - /** @internal */ - shouldIgnore(symbol: ts.Symbol, checker: ts.TypeChecker) { - if ( - this.excludeNotDocumented && - // If the enum is included, we should include members even if not documented. - !hasAllFlags(symbol.flags, ts.SymbolFlags.EnumMember) && - resolveAliasedSymbol(symbol, checker).getDocumentationComment( - checker - ).length === 0 - ) { - return true; - } - + /** + * Used to determine if we should immediately bail when creating a reflection. + * Note: This should not be used for excludeNotDocumented because we don't have enough + * information at this point since comment discovery hasn't happened. + * @internal + */ + shouldIgnore(symbol: ts.Symbol) { if (this.isExcluded(symbol)) { return true; } - if (!this.excludeExternals) { - return false; - } - - return this.isExternal(symbol); + return this.excludeExternals && this.isExternal(symbol); } private isExcluded(symbol: ts.Symbol) { diff --git a/src/lib/converter/plugins/CommentPlugin.ts b/src/lib/converter/plugins/CommentPlugin.ts index ebf095925..bad7f66f1 100644 --- a/src/lib/converter/plugins/CommentPlugin.ts +++ b/src/lib/converter/plugins/CommentPlugin.ts @@ -63,6 +63,9 @@ export class CommentPlugin extends ConverterComponent { @BindOption("excludeProtected") excludeProtected!: boolean; + @BindOption("excludeNotDocumented") + excludeNotDocumented!: boolean; + /** * Create a new CommentPlugin instance. */ @@ -375,7 +378,7 @@ export class CommentPlugin extends ConverterComponent { * * @param reflection Reflection to check if hidden */ - private isHidden(reflection: Reflection) { + private isHidden(reflection: Reflection): boolean { const comment = reflection.comment; if ( @@ -393,6 +396,30 @@ export class CommentPlugin extends ConverterComponent { } if (!comment) { + if (this.excludeNotDocumented) { + // Only allow excludeNotDocumented to exclude root level reflections + if (!(reflection instanceof DeclarationReflection)) { + return false; + } + + // excludeNotDocumented should hide a module only if it has no visible children + if (reflection.kindOf(ReflectionKind.SomeModule)) { + if (!reflection.children) { + return true; + } + return reflection.children.every((child) => + this.isHidden(child) + ); + } + + // enum members should all be included if the parent enum is documented + if (reflection.kind === ReflectionKind.EnumMember) { + return false; + } + + // excludeNotDocumented should never hide parts of "type" reflections + return inTypeLiteral(reflection) === false; + } return false; } @@ -404,6 +431,16 @@ export class CommentPlugin extends ConverterComponent { } } +function inTypeLiteral(refl: Reflection | undefined) { + while (refl) { + if (refl.kind === ReflectionKind.TypeLiteral) { + return true; + } + refl = refl.parent; + } + return false; +} + // Moves tags like `@param foo.bar docs for bar` into the `bar` property of the `foo` parameter. function moveNestedParamTags(comment: Comment, parameter: ParameterReflection) { const visitor: Partial = { diff --git a/src/lib/converter/symbols.ts b/src/lib/converter/symbols.ts index 847c3c57d..9701fa5e5 100644 --- a/src/lib/converter/symbols.ts +++ b/src/lib/converter/symbols.ts @@ -336,8 +336,7 @@ function convertTypeAlias( context.finalizeDeclarationReflection(reflection); // Do this after finalization so that the CommentPlugin can get @typeParam tags - // from the parent comment. Ugly, but works for now. Should be cleaned up with TSDoc - // support. + // from the parent comment. Ugly, but works for now. Should be cleaned up eventually. reflection.typeParameters = declaration.typeParameters?.map((param) => createTypeParamReflection(param, context.withScope(reflection)) ); diff --git a/src/test/converter/exports/no-doc-members.ts b/src/test/converter/exports/no-doc-members.ts new file mode 100644 index 000000000..274f79d65 --- /dev/null +++ b/src/test/converter/exports/no-doc-members.ts @@ -0,0 +1,6 @@ +/** + * This module has documentation, but no exported members do. + * @see https://github.com/TypeStrong/typedoc/issues/1948 + * @module + */ +export const abc = 123; diff --git a/src/test/converter/exports/specs.json b/src/test/converter/exports/specs.json index 0205c3de4..52bc3e298 100644 --- a/src/test/converter/exports/specs.json +++ b/src/test/converter/exports/specs.json @@ -12,7 +12,7 @@ "flags": {}, "children": [ { - "id": 46, + "id": 48, "name": "GH1453Helper", "kind": 8388608, "kindString": "Reference", @@ -28,7 +28,7 @@ "target": 35 }, { - "id": 39, + "id": 41, "name": "Mod", "kind": 8388608, "kindString": "Reference", @@ -44,7 +44,7 @@ "target": 29 }, { - "id": 41, + "id": 43, "name": "Mod2", "kind": 8388608, "kindString": "Reference", @@ -68,7 +68,7 @@ "target": 29 }, { - "id": 40, + "id": 42, "name": "ModDefault", "kind": 8388608, "kindString": "Reference", @@ -84,7 +84,7 @@ "target": 36 }, { - "id": 45, + "id": 47, "name": "ThisModule", "kind": 8388608, "kindString": "Reference", @@ -100,7 +100,7 @@ "target": 34 }, { - "id": 42, + "id": 44, "name": "a", "kind": 8388608, "kindString": "Reference", @@ -116,7 +116,7 @@ "target": 30 }, { - "id": 43, + "id": 45, "name": "b", "kind": 8388608, "kindString": "Reference", @@ -140,7 +140,7 @@ "target": 31 }, { - "id": 38, + "id": 40, "name": "c", "kind": 8388608, "kindString": "Reference", @@ -398,14 +398,14 @@ { "title": "References", "children": [ - 46, - 39, + 48, 41, - 40, - 45, - 42, 43, - 38 + 42, + 47, + 44, + 45, + 40 ] }, { @@ -853,6 +853,95 @@ "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/exports/mod.ts#L8" } ] + }, + { + "id": 38, + "name": "no-doc-members", + "kind": 2, + "kindString": "Module", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "This module has documentation, but no exported members do." + } + ], + "blockTags": [ + { + "tag": "@see", + "content": [ + { + "kind": "text", + "text": "https://github.com/TypeStrong/typedoc/issues/1948" + } + ] + } + ] + }, + "children": [ + { + "id": 39, + "name": "abc", + "kind": 32, + "kindString": "Variable", + "flags": { + "isConst": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "This module has documentation, but no exported members do." + } + ], + "blockTags": [ + { + "tag": "@see", + "content": [ + { + "kind": "text", + "text": "https://github.com/TypeStrong/typedoc/issues/1948" + } + ] + }, + { + "tag": "@module", + "content": [] + } + ] + }, + "sources": [ + { + "fileName": "no-doc-members.ts", + "line": 6, + "character": 13, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/exports/no-doc-members.ts#L6" + } + ], + "type": { + "type": "literal", + "value": 123 + }, + "defaultValue": "123" + } + ], + "groups": [ + { + "title": "Variables", + "children": [ + 39 + ] + } + ], + "sources": [ + { + "fileName": "no-doc-members.ts", + "line": 6, + "character": 0, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/exports/no-doc-members.ts#L6" + } + ] } ], "groups": [ @@ -863,7 +952,8 @@ 1, 6, 8, - 29 + 29, + 38 ] } ] diff --git a/src/test/converter/exports/specs.nodoc.json b/src/test/converter/exports/specs.nodoc.json new file mode 100644 index 000000000..02ffd820a --- /dev/null +++ b/src/test/converter/exports/specs.nodoc.json @@ -0,0 +1,333 @@ +{ + "id": 0, + "name": "typedoc", + "kind": 1, + "flags": {}, + "children": [ + { + "id": 14, + "name": "export", + "kind": 2, + "kindString": "Module", + "flags": {}, + "children": [ + { + "id": 43, + "name": "Mod2", + "kind": 8388608, + "kindString": "Reference", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "This is a comment for Mod that overwrites the one specified in \"mod\"" + } + ] + }, + "sources": [ + { + "fileName": "export.ts", + "line": 14, + "character": 12, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/exports/export.ts#L14" + } + ], + "target": 29 + }, + { + "id": 45, + "name": "b", + "kind": 8388608, + "kindString": "Reference", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "An export of a local under a different name." + } + ] + }, + "sources": [ + { + "fileName": "mod.ts", + "line": 13, + "character": 14, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/exports/mod.ts#L13" + } + ], + "target": 31 + } + ], + "groups": [ + { + "title": "References", + "children": [ + 43, + 45 + ] + } + ], + "sources": [ + { + "fileName": "export.ts", + "line": 1, + "character": 0, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/exports/export.ts#L1" + } + ] + }, + { + "id": 29, + "name": "mod", + "kind": 2, + "kindString": "Module", + "flags": {}, + "children": [ + { + "id": 31, + "name": "b", + "kind": 8388608, + "kindString": "Reference", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "An export of a local under a different name." + } + ] + }, + "sources": [ + { + "fileName": "mod.ts", + "line": 13, + "character": 14, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/exports/mod.ts#L13" + } + ], + "target": 30 + }, + { + "id": 32, + "name": "c", + "kind": 8388608, + "kindString": "Reference", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "An export with a module specifier that comes from this file." + } + ] + }, + "sources": [ + { + "fileName": "mod.ts", + "line": 18, + "character": 14, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/exports/mod.ts#L18" + } + ], + "target": 30 + }, + { + "id": 30, + "name": "a", + "kind": 32, + "kindString": "Variable", + "flags": { + "isConst": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Doc comment for Mod" + } + ] + }, + "sources": [ + { + "fileName": "mod.ts", + "line": 8, + "character": 13, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/exports/mod.ts#L8" + } + ], + "type": { + "type": "literal", + "value": 1 + }, + "defaultValue": "1" + }, + { + "id": 36, + "name": "default", + "kind": 64, + "kindString": "Function", + "flags": {}, + "sources": [ + { + "fileName": "mod.ts", + "line": 23, + "character": 0, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/exports/mod.ts#L23" + } + ], + "signatures": [ + { + "id": 37, + "name": "default", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Will not be re-exported from export.ts using export * from..." + } + ] + }, + "type": { + "type": "intrinsic", + "name": "void" + } + } + ] + } + ], + "groups": [ + { + "title": "References", + "children": [ + 31, + 32 + ] + }, + { + "title": "Variables", + "children": [ + 30 + ] + }, + { + "title": "Functions", + "children": [ + 36 + ] + } + ], + "sources": [ + { + "fileName": "mod.ts", + "line": 8, + "character": 0, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/exports/mod.ts#L8" + } + ] + }, + { + "id": 38, + "name": "no-doc-members", + "kind": 2, + "kindString": "Module", + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "This module has documentation, but no exported members do." + } + ], + "blockTags": [ + { + "tag": "@see", + "content": [ + { + "kind": "text", + "text": "https://github.com/TypeStrong/typedoc/issues/1948" + } + ] + } + ] + }, + "children": [ + { + "id": 39, + "name": "abc", + "kind": 32, + "kindString": "Variable", + "flags": { + "isConst": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "This module has documentation, but no exported members do." + } + ], + "blockTags": [ + { + "tag": "@see", + "content": [ + { + "kind": "text", + "text": "https://github.com/TypeStrong/typedoc/issues/1948" + } + ] + }, + { + "tag": "@module", + "content": [] + } + ] + }, + "sources": [ + { + "fileName": "no-doc-members.ts", + "line": 6, + "character": 13, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/exports/no-doc-members.ts#L6" + } + ], + "type": { + "type": "literal", + "value": 123 + }, + "defaultValue": "123" + } + ], + "groups": [ + { + "title": "Variables", + "children": [ + 39 + ] + } + ], + "sources": [ + { + "fileName": "no-doc-members.ts", + "line": 6, + "character": 0, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/exports/no-doc-members.ts#L6" + } + ] + } + ], + "groups": [ + { + "title": "Modules", + "children": [ + 14, + 29, + 38 + ] + } + ] +} diff --git a/src/test/converter/variables/specs.nodoc.json b/src/test/converter/variables/specs.nodoc.json index de99e9d70..423f4542a 100644 --- a/src/test/converter/variables/specs.nodoc.json +++ b/src/test/converter/variables/specs.nodoc.json @@ -25,53 +25,6 @@ } ] }, - "children": [ - { - "id": 3, - "name": "constructor", - "kind": 512, - "kindString": "Constructor", - "flags": {}, - "signatures": [ - { - "id": 4, - "name": "new Array", - "kind": 16384, - "kindString": "Constructor signature", - "flags": {}, - "typeParameter": [ - { - "id": 5, - "name": "T", - "kind": 131072, - "kindString": "Type parameter", - "flags": {} - } - ], - "type": { - "type": "reference", - "id": 2, - "typeArguments": [ - { - "type": "reference", - "id": 5, - "name": "T" - } - ], - "name": "Array" - } - } - ] - } - ], - "groups": [ - { - "title": "Constructors", - "children": [ - 3 - ] - } - ], "sources": [ { "fileName": "array.ts", @@ -111,37 +64,6 @@ } ] }, - "children": [ - { - "id": 10, - "name": "constructor", - "kind": 512, - "kindString": "Constructor", - "flags": {}, - "signatures": [ - { - "id": 11, - "name": "new Foo", - "kind": 16384, - "kindString": "Constructor signature", - "flags": {}, - "type": { - "type": "reference", - "id": 9, - "name": "Foo" - } - } - ] - } - ], - "groups": [ - { - "title": "Constructors", - "children": [ - 10 - ] - } - ], "sources": [ { "fileName": "array.ts", @@ -165,47 +87,6 @@ } ] }, - "children": [ - { - "id": 13, - "name": "constructor", - "kind": 512, - "kindString": "Constructor", - "flags": {}, - "signatures": [ - { - "id": 14, - "name": "new FooList", - "kind": 16384, - "kindString": "Constructor signature", - "flags": {}, - "type": { - "type": "reference", - "id": 12, - "name": "FooList" - }, - "inheritedFrom": { - "type": "reference", - "id": 4, - "name": "Array.constructor" - } - } - ], - "inheritedFrom": { - "type": "reference", - "id": 3, - "name": "Array.constructor" - } - } - ], - "groups": [ - { - "title": "Constructors", - "children": [ - 13 - ] - } - ], "sources": [ { "fileName": "array.ts", @@ -438,14 +319,14 @@ ] }, { - "id": 19, + "id": 30, "name": "literal", "kind": 2, "kindString": "Module", "flags": {}, "children": [ { - "id": 22, + "id": 70, "name": "objectLiteral", "kind": 32, "kindString": "Variable", @@ -471,11 +352,409 @@ "type": { "type": "reflection", "declaration": { - "id": 23, + "id": 71, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, + "children": [ + { + "id": 89, + "name": "[toStringTag]", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "literal.ts", + "line": 19, + "character": 4, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/variables/literal.ts#L19" + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "defaultValue": "\"computed\"" + }, + { + "id": 90, + "name": "literal", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "literal.ts", + "line": 20, + "character": 4, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/variables/literal.ts#L20" + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + }, + "defaultValue": "true" + }, + { + "id": 91, + "name": "literal2", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "literal.ts", + "line": 21, + "character": 4, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/variables/literal.ts#L21" + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + }, + "defaultValue": "true" + }, + { + "id": 87, + "name": "valueA", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "literal.ts", + "line": 17, + "character": 4, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/variables/literal.ts#L17" + } + ], + "type": { + "type": "intrinsic", + "name": "number" + }, + "defaultValue": "100" + }, + { + "id": 88, + "name": "valueB", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "literal.ts", + "line": 18, + "character": 4, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/variables/literal.ts#L18" + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + }, + "defaultValue": "true" + }, + { + "id": 76, + "name": "valueX", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "literal.ts", + "line": 10, + "character": 4, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/variables/literal.ts#L10" + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 77, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 86, + "name": "valueA", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "literal.ts", + "line": 15, + "character": 8, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/variables/literal.ts#L15" + } + ], + "type": { + "type": "array", + "elementType": { + "type": "intrinsic", + "name": "number" + } + }, + "defaultValue": "..." + }, + { + "id": 79, + "name": "valueY", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "literal.ts", + "line": 12, + "character": 8, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/variables/literal.ts#L12" + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 80, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "sources": [ + { + "fileName": "literal.ts", + "line": 12, + "character": 16, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/variables/literal.ts#L12" + } + ], + "signatures": [ + { + "id": 81, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 82, + "name": "z", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 83, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 84, + "name": "a", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "literal.ts", + "line": 13, + "character": 21, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/variables/literal.ts#L13" + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "defaultValue": "\"test\"" + }, + { + "id": 85, + "name": "b", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "literal.ts", + "line": 13, + "character": 32, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/variables/literal.ts#L13" + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "defaultValue": "z" + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 84, + 85 + ] + } + ], + "sources": [ + { + "fileName": "literal.ts", + "line": 13, + "character": 19, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/variables/literal.ts#L13" + } + ] + } + } + } + ] + } + }, + "defaultValue": "..." + }, + { + "id": 78, + "name": "valueZ", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "literal.ts", + "line": 11, + "character": 8, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/variables/literal.ts#L11" + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "defaultValue": "\"foo\"" + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 86, + 79, + 78 + ] + } + ], + "sources": [ + { + "fileName": "literal.ts", + "line": 10, + "character": 12, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/variables/literal.ts#L10" + } + ] + } + }, + "defaultValue": "..." + }, + { + "id": 73, + "name": "valueY", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "literal.ts", + "line": 7, + "character": 4, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/variables/literal.ts#L7" + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 74, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "sources": [ + { + "fileName": "literal.ts", + "line": 7, + "character": 12, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/variables/literal.ts#L7" + } + ], + "signatures": [ + { + "id": 75, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ] + } + }, + "defaultValue": "..." + }, + { + "id": 72, + "name": "valueZ", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "literal.ts", + "line": 6, + "character": 4, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/variables/literal.ts#L6" + } + ], + "type": { + "type": "intrinsic", + "name": "string" + }, + "defaultValue": "\"foo\"" + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 89, + 90, + 91, + 87, + 88, + 76, + 73, + 72 + ] + } + ], "sources": [ { "fileName": "literal.ts", @@ -489,7 +768,7 @@ "defaultValue": "..." }, { - "id": 20, + "id": 31, "name": "typeLiteral", "kind": 32, "kindString": "Variable", @@ -513,11 +792,340 @@ "type": { "type": "reflection", "declaration": { - "id": 21, + "id": 32, "name": "__type", "kind": 65536, "kindString": "Type literal", "flags": {}, + "children": [ + { + "id": 48, + "name": "valueA", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "literal.ts", + "line": 35, + "character": 4, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/variables/literal.ts#L35" + } + ], + "type": { + "type": "intrinsic", + "name": "number" + } + }, + { + "id": 49, + "name": "valueB", + "kind": 1024, + "kindString": "Property", + "flags": { + "isOptional": true + }, + "sources": [ + { + "fileName": "literal.ts", + "line": 36, + "character": 4, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/variables/literal.ts#L36" + } + ], + "type": { + "type": "intrinsic", + "name": "boolean" + } + }, + { + "id": 37, + "name": "valueX", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "literal.ts", + "line": 30, + "character": 4, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/variables/literal.ts#L30" + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 38, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 47, + "name": "valueA", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "literal.ts", + "line": 33, + "character": 8, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/variables/literal.ts#L33" + } + ], + "type": { + "type": "array", + "elementType": { + "type": "intrinsic", + "name": "number" + } + } + }, + { + "id": 40, + "name": "valueY", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "literal.ts", + "line": 32, + "character": 8, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/variables/literal.ts#L32" + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 41, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "sources": [ + { + "fileName": "literal.ts", + "line": 32, + "character": 16, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/variables/literal.ts#L32" + } + ], + "signatures": [ + { + "id": 42, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "parameters": [ + { + "id": 43, + "name": "z", + "kind": 32768, + "kindString": "Parameter", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 44, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "children": [ + { + "id": 45, + "name": "a", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "literal.ts", + "line": 32, + "character": 33, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/variables/literal.ts#L32" + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 46, + "name": "b", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "literal.ts", + "line": 32, + "character": 44, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/variables/literal.ts#L32" + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 45, + 46 + ] + } + ], + "sources": [ + { + "fileName": "literal.ts", + "line": 32, + "character": 31, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/variables/literal.ts#L32" + } + ] + } + } + } + ] + } + } + }, + { + "id": 39, + "name": "valueZ", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "literal.ts", + "line": 31, + "character": 8, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/variables/literal.ts#L31" + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 47, + 40, + 39 + ] + } + ], + "sources": [ + { + "fileName": "literal.ts", + "line": 30, + "character": 12, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/variables/literal.ts#L30" + } + ] + } + } + }, + { + "id": 34, + "name": "valueY", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "literal.ts", + "line": 29, + "character": 4, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/variables/literal.ts#L29" + } + ], + "type": { + "type": "reflection", + "declaration": { + "id": 35, + "name": "__type", + "kind": 65536, + "kindString": "Type literal", + "flags": {}, + "sources": [ + { + "fileName": "literal.ts", + "line": 29, + "character": 12, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/variables/literal.ts#L29" + } + ], + "signatures": [ + { + "id": 36, + "name": "__type", + "kind": 4096, + "kindString": "Call signature", + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ] + } + } + }, + { + "id": 33, + "name": "valueZ", + "kind": 1024, + "kindString": "Property", + "flags": {}, + "sources": [ + { + "fileName": "literal.ts", + "line": 28, + "character": 4, + "url": "https://github.com/TypeStrong/typedoc/blob/fake/src/test/converter/variables/literal.ts#L28" + } + ], + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 48, + 49, + 37, + 34, + 33 + ] + } + ], "sources": [ { "fileName": "literal.ts", @@ -534,8 +1142,8 @@ { "title": "Variables", "children": [ - 22, - 20 + 70, + 31 ] } ], @@ -555,7 +1163,7 @@ "children": [ 1, 15, - 19 + 30 ] } ]