From fb46266b43f2a45acf1800a4a9b385270bc24042 Mon Sep 17 00:00:00 2001 From: tgreyuk Date: Mon, 2 Dec 2024 23:30:54 +0000 Subject: [PATCH] fix(core): fixed spacing around inline object declarations --- .changeset/twenty-pots-sort.md | 5 +++ .../helpers/get-description-for-comment.ts | 2 +- .../context/helpers/get-hierarchy-type.ts | 2 +- .../theme/context/helpers/get-return-type.ts | 5 ++- .../partials/type.reflection.declaration.ts | 2 +- .../specs/__snapshots__/comments.spec.ts.snap | 6 +-- .../objects-and-params.spec.ts.snap | 44 +++++++++---------- .../reflection.function.spec.ts.snap | 12 ++--- .../reflection.type-alias.spec.ts.snap | 6 +-- .../specs/__snapshots__/utils.spec.ts.snap | 2 +- .../__snapshots__/vitepress.spec.ts.snap | 2 +- 11 files changed, 48 insertions(+), 40 deletions(-) create mode 100644 .changeset/twenty-pots-sort.md diff --git a/.changeset/twenty-pots-sort.md b/.changeset/twenty-pots-sort.md new file mode 100644 index 000000000..ba79926c4 --- /dev/null +++ b/.changeset/twenty-pots-sort.md @@ -0,0 +1,5 @@ +--- +'typedoc-plugin-markdown': patch +--- + +- Fixed spacing around inline object declarations. diff --git a/packages/typedoc-plugin-markdown/src/theme/context/helpers/get-description-for-comment.ts b/packages/typedoc-plugin-markdown/src/theme/context/helpers/get-description-for-comment.ts index e0f35e7e4..6e0ecd7d3 100644 --- a/packages/typedoc-plugin-markdown/src/theme/context/helpers/get-description-for-comment.ts +++ b/packages/typedoc-plugin-markdown/src/theme/context/helpers/get-description-for-comment.ts @@ -4,7 +4,7 @@ import { Comment } from 'typedoc'; export function getDescriptionForComment( this: MarkdownThemeContext, comment: Comment, -) { +): string | null { if (comment?.summary?.length) { return this.helpers .getCommentParts(comment.summary) diff --git a/packages/typedoc-plugin-markdown/src/theme/context/helpers/get-hierarchy-type.ts b/packages/typedoc-plugin-markdown/src/theme/context/helpers/get-hierarchy-type.ts index 48a324e1d..fc384f2de 100644 --- a/packages/typedoc-plugin-markdown/src/theme/context/helpers/get-hierarchy-type.ts +++ b/packages/typedoc-plugin-markdown/src/theme/context/helpers/get-hierarchy-type.ts @@ -6,7 +6,7 @@ export function getHierarchyType( this: MarkdownThemeContext, model: SomeType, options?: { isTarget: boolean }, -) { +): string { return options?.isTarget ? backTicks(model.toString()) : this.partials.someType(model); diff --git a/packages/typedoc-plugin-markdown/src/theme/context/helpers/get-return-type.ts b/packages/typedoc-plugin-markdown/src/theme/context/helpers/get-return-type.ts index 3d54f15c6..90d169be7 100644 --- a/packages/typedoc-plugin-markdown/src/theme/context/helpers/get-return-type.ts +++ b/packages/typedoc-plugin-markdown/src/theme/context/helpers/get-return-type.ts @@ -2,7 +2,10 @@ import { codeBlock } from '@plugin/libs/markdown/index.js'; import { MarkdownThemeContext } from '@plugin/theme/index.js'; import { ReflectionType, SomeType } from 'typedoc'; -export function getReturnType(this: MarkdownThemeContext, model?: SomeType) { +export function getReturnType( + this: MarkdownThemeContext, + model?: SomeType, +): string { if (model) { const returnType = this.partials.someType(model); if ( diff --git a/packages/typedoc-plugin-markdown/src/theme/context/partials/type.reflection.declaration.ts b/packages/typedoc-plugin-markdown/src/theme/context/partials/type.reflection.declaration.ts index e3f5a207d..241f9663c 100644 --- a/packages/typedoc-plugin-markdown/src/theme/context/partials/type.reflection.declaration.ts +++ b/packages/typedoc-plugin-markdown/src/theme/context/partials/type.reflection.declaration.ts @@ -58,7 +58,7 @@ export function declarationType( }); } return types - ? `\\{${shouldFormat ? '\n' : ''}${types.join('')} \\}` + ? `\\{${shouldFormat ? `\n${types.join('')}` : ` ${types.join(' ')}`} \\}` : '\\{\\}'; } return '\\{\\}'; diff --git a/packages/typedoc-plugin-markdown/test/specs/__snapshots__/comments.spec.ts.snap b/packages/typedoc-plugin-markdown/test/specs/__snapshots__/comments.spec.ts.snap index 8441ee687..0373d199a 100644 --- a/packages/typedoc-plugin-markdown/test/specs/__snapshots__/comments.spec.ts.snap +++ b/packages/typedoc-plugin-markdown/test/specs/__snapshots__/comments.spec.ts.snap @@ -541,7 +541,7 @@ exports[`Comments should get tables for type declarations: (Output File Strategy exports[`Comments should get tables for type declarations: (Output File Strategy "members") (Option Group "2") 1`] = ` "# Type Alias: TypeDeclarationTable -> **TypeDeclarationTable**: \\{\`declaration1\`: \`boolean\`;\`declaration2\`: \`boolean\`;\`declaration4\`: \`100\`; \\} +> **TypeDeclarationTable**: \\{ \`declaration1\`: \`boolean\`; \`declaration2\`: \`boolean\`; \`declaration4\`: \`100\`; \\} ## Type declaration @@ -619,7 +619,7 @@ to generate the binary output for input validation. exports[`Comments should get tables for type declarations: (Output File Strategy "members") (Option Group "2") 2`] = ` "# Variable: TypeDeclarationTable -> **TypeDeclarationTable**: \\{\`declaration1\`: \`string\`;\`declaration2\`: \`number\`; \\} +> **TypeDeclarationTable**: \\{ \`declaration1\`: \`string\`; \`declaration2\`: \`number\`; \\} ## Type declaration @@ -707,7 +707,7 @@ Other block tags exports[`Comments should get variable with block tags: (Output File Strategy "members") (Option Group "2") 1`] = ` "# Type Alias: typeWithBlockTags -> **typeWithBlockTags**: \\{\`x\`: \`string\`; \\} +> **typeWithBlockTags**: \\{ \`x\`: \`string\`; \\} Variable with block tags summary diff --git a/packages/typedoc-plugin-markdown/test/specs/__snapshots__/objects-and-params.spec.ts.snap b/packages/typedoc-plugin-markdown/test/specs/__snapshots__/objects-and-params.spec.ts.snap index dcb968f0e..7440f98be 100644 --- a/packages/typedoc-plugin-markdown/test/specs/__snapshots__/objects-and-params.spec.ts.snap +++ b/packages/typedoc-plugin-markdown/test/specs/__snapshots__/objects-and-params.spec.ts.snap @@ -63,7 +63,7 @@ Comments for prop ### propReturningObjectDeclaration -> **propReturningObjectDeclaration**: \\{\`a\`: \`boolean\`;\`b\`: \`string\`; \\} +> **propReturningObjectDeclaration**: \\{ \`a\`: \`boolean\`; \`b\`: \`string\`; \\} Comments for propReturningObjectDeclaration @@ -79,7 +79,7 @@ Comments for propReturningObjectDeclaration ### propReturningObjectDeclarations -> **propReturningObjectDeclarations**: \\{\`a\`: \`boolean\`;\`b\`: \`string\`; \\} & \\{\`c\`: \`boolean\`;\`d\`: \`string\`; \\} +> **propReturningObjectDeclarations**: \\{ \`a\`: \`boolean\`; \`b\`: \`string\`; \\} & \\{ \`c\`: \`boolean\`; \`d\`: \`string\`; \\} Comments for propReturningObjectDeclarations @@ -127,7 +127,7 @@ Comments for propReturningSignatureDeclarations ### propWithFunction() -> **propWithFunction**: (\`options\`: \\{\`a\`: \`boolean\`;\`b\`: \`string\`; \\}) => \`boolean\` +> **propWithFunction**: (\`options\`: \\{ \`a\`: \`boolean\`; \`b\`: \`string\`; \\}) => \`boolean\` Comments for propWithFunction @@ -151,7 +151,7 @@ Comments for propWithFunction ### propWithProps -> **propWithProps**: \\{\`callbacks\`: \`Partial\`\\<[\`CallbacksOptions\`](../classes/CallbacksOptions.md)\\<[\`DisposableClass\`](../classes/DisposableClass.md), [\`ClassWithModifiers\`](../classes/ClassWithModifiers.md)\\>\\>;\`nestedPropA\`: \`string\`;\`nestedPropB\`: \`boolean\`;\`nestedPropC\`: \\{\`nestedPropCA\`: \`string\`; \\};\`nestedPropD\`: () => \`boolean\`; \\} +> **propWithProps**: \\{ \`callbacks\`: \`Partial\`\\<[\`CallbacksOptions\`](../classes/CallbacksOptions.md)\\<[\`DisposableClass\`](../classes/DisposableClass.md), [\`ClassWithModifiers\`](../classes/ClassWithModifiers.md)\\>\\>; \`nestedPropA\`: \`string\`; \`nestedPropB\`: \`boolean\`; \`nestedPropC\`: \\{ \`nestedPropCA\`: \`string\`; \\}; \`nestedPropD\`: () => \`boolean\`; \\} Comments for propWithProps @@ -175,7 +175,7 @@ Comments for nestedPropB #### nestedPropC -> **nestedPropC**: \\{\`nestedPropCA\`: \`string\`; \\} +> **nestedPropC**: \\{ \`nestedPropCA\`: \`string\`; \\} Comments for nestedPropC @@ -234,13 +234,13 @@ Comments for BasicInterface exports[`Objects And Params should compile function returning a promise: (Output File Strategy "members") (Option Group "1") 1`] = ` "# Function: functionReturningAPromise() -> **functionReturningAPromise**(): [\`Promise\`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\\<\\{\`prop\`: \`string\`; \\}\\> +> **functionReturningAPromise**(): [\`Promise\`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\\<\\{ \`prop\`: \`string\`; \\}\\> Comments for function ## Returns -[\`Promise\`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\\<\\{\`prop\`: \`string\`; \\}\\> +[\`Promise\`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\\<\\{ \`prop\`: \`string\`; \\}\\> Return comments @@ -312,13 +312,13 @@ Return comments exports[`Objects And Params should compile function returning an object: (Output File Strategy "members") (Option Group "1") 1`] = ` "# Function: functionReturningAnObject() -> **functionReturningAnObject**(): \\{\`x\`: \`number\`;\`y\`: \`number\`; \\} +> **functionReturningAnObject**(): \\{ \`x\`: \`number\`; \`y\`: \`number\`; \\} Comments for function ## Returns -\\{\`x\`: \`number\`;\`y\`: \`number\`; \\} +\\{ \`x\`: \`number\`; \`y\`: \`number\`; \\} Return comments @@ -372,7 +372,7 @@ y: number = 2; exports[`Objects And Params should compile function with nested parameters: (Output File Strategy "members") (Option Group "1") 1`] = ` "# Function: functionWithNestedParameters() -> **functionWithNestedParameters**(\`params\`: \\{\`name\`: \`string\`;\`nestedObj\`: \\{\`name\`: \`string\`;\`obj\`: \\{\`name\`: () => \`void\`; \\};\`value\`: \`number\`; \\};\`parent\`: \`number\`; \\}, \`context\`: \`any\`, \`somethingElse\`?: \`string\`): \`boolean\` +> **functionWithNestedParameters**(\`params\`: \\{ \`name\`: \`string\`; \`nestedObj\`: \\{ \`name\`: \`string\`; \`obj\`: \\{ \`name\`: () => \`void\`; \\}; \`value\`: \`number\`; \\}; \`parent\`: \`number\`; \\}, \`context\`: \`any\`, \`somethingElse\`?: \`string\`): \`boolean\` Some nested params. @@ -390,7 +390,7 @@ The name of the new group. #### nestedObj -\\{\`name\`: \`string\`;\`obj\`: \\{\`name\`: () => \`void\`; \\};\`value\`: \`number\`; \\} +\\{ \`name\`: \`string\`; \`obj\`: \\{ \`name\`: () => \`void\`; \\}; \`value\`: \`number\`; \\} A nested object. @@ -400,7 +400,7 @@ A nested object. #### nestedObj.obj -\\{\`name\`: () => \`void\`; \\} +\\{ \`name\`: () => \`void\`; \\} #### nestedObj.obj.name @@ -476,7 +476,7 @@ Some nested params. exports[`Objects And Params should compile intersection type: (Output File Strategy "members") (Option Group "1") 1`] = ` "# Type Alias: IntersectionType -> **IntersectionType**: [\`TupleType\`](TupleType.md) & [\`ArrayType\`](ArrayType.md) & \\{\`bar\`: \`number\`; \\} +> **IntersectionType**: [\`TupleType\`](TupleType.md) & [\`ArrayType\`](ArrayType.md) & \\{ \`bar\`: \`number\`; \\} Comments for IntersectionType @@ -512,7 +512,7 @@ bar: number; exports[`Objects And Params should compile literal type: (Output File Strategy "members") (Option Group "1") 1`] = ` "# Type Alias: LiteralType -> **LiteralType**: \\{\`someFunctionWithArrow\`: () => \`string\`;\`x\`: \`string\`;\`y\`: \\{\`x\`: \`string\`;\`y\`: \`boolean\` \\| \`string\`;\`z\`: (\`x\`: \`string\`) => \`string\`; \\};\`z\`: (\`x\`: \`string\`) => \`string\`;get set \`accessorA\`: [\`Promise\`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\\<\`string\`\\>;get set \`accessorB\`: \`string\`;\`someFunction\`: [\`Promise\`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\\<\`any\`\\>; \\} +> **LiteralType**: \\{ \`someFunctionWithArrow\`: () => \`string\`; \`x\`: \`string\`; \`y\`: \\{ \`x\`: \`string\`; \`y\`: \`boolean\` \\| \`string\`; \`z\`: (\`x\`: \`string\`) => \`string\`; \\}; \`z\`: (\`x\`: \`string\`) => \`string\`; get set \`accessorA\`: [\`Promise\`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\\<\`string\`\\>; get set \`accessorB\`: \`string\`; \`someFunction\`: [\`Promise\`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\\<\`any\`\\>; \\} Comments for LiteralType @@ -536,7 +536,7 @@ comment for x ### y -> **y**: \\{\`x\`: \`string\`;\`y\`: \`boolean\` \\| \`string\`;\`z\`: (\`x\`: \`string\`) => \`string\`; \\} +> **y**: \\{ \`x\`: \`string\`; \`y\`: \`boolean\` \\| \`string\`; \`z\`: (\`x\`: \`string\`) => \`string\`; \\} comment for y @@ -786,7 +786,7 @@ Comments for someFunction exports[`Objects And Params should compile object with symbol: (Output File Strategy "members") (Option Group "1") 1`] = ` "# Variable: objectWithSymbol -> \`const\` **objectWithSymbol**: \\{\`[sym]\`: \`string\`; \\} +> \`const\` **objectWithSymbol**: \\{ \`[sym]\`: \`string\`; \\} Comments variable with symbol @@ -826,7 +826,7 @@ Comments for symbol exports[`Objects And Params should compile union type: (Output File Strategy "members") (Option Group "1") 1`] = ` "# Type Alias: UnionType -> **UnionType**: \`string\` \\| \`boolean\` \\| \\{\`z\`: \`string\`; \\} +> **UnionType**: \`string\` \\| \`boolean\` \\| \\{ \`z\`: \`string\`; \\} Comments for UnionType " @@ -848,7 +848,7 @@ Comments for UnionType exports[`Objects And Params should compile variable assigned to an object literal: (Output File Strategy "members") (Option Group "1") 1`] = ` "# Variable: objectLiteralVariable -> \`const\` **objectLiteralVariable**: \\{\`valueA\`: \`number\`;\`valueB\`: \`boolean\`;\`valueX\`: \\{\`valueA\`: \`number\`[];\`valueY\`: (\`z\`: \`string\`) => \\{\`a\`: \`string\`;\`b\`: \`string\`;\`c\`: \\{\`a\`: \`number\`;\`b\`: \`number\`; \\}; \\};\`valueZ\`: \`string\`; \\};\`valueY\`: (\`unionParam\`: \`"a"\` \\| \`"b"\`, \`_undercoreParam_\`: \`string\`) => \`string\`; \\} +> \`const\` **objectLiteralVariable**: \\{ \`valueA\`: \`number\`; \`valueB\`: \`boolean\`; \`valueX\`: \\{ \`valueA\`: \`number\`[]; \`valueY\`: (\`z\`: \`string\`) => \\{ \`a\`: \`string\`; \`b\`: \`string\`; \`c\`: \\{ \`a\`: \`number\`; \`b\`: \`number\`; \\}; \\}; \`valueZ\`: \`string\`; \\}; \`valueY\`: (\`unionParam\`: \`"a"\` \\| \`"b"\`, \`_undercoreParam_\`: \`string\`) => \`string\`; \\} Comments for objectLiteralVariable @@ -870,7 +870,7 @@ Comments for valueA ### valueX -> **valueX**: \\{\`valueA\`: \`number\`[];\`valueY\`: (\`z\`: \`string\`) => \\{\`a\`: \`string\`;\`b\`: \`string\`;\`c\`: \\{\`a\`: \`number\`;\`b\`: \`number\`; \\}; \\};\`valueZ\`: \`string\`; \\} +> **valueX**: \\{ \`valueA\`: \`number\`[]; \`valueY\`: (\`z\`: \`string\`) => \\{ \`a\`: \`string\`; \`b\`: \`string\`; \`c\`: \\{ \`a\`: \`number\`; \`b\`: \`number\`; \\}; \\}; \`valueZ\`: \`string\`; \\} Comments for valueX @@ -882,7 +882,7 @@ Comment for valueX.valueA #### valueX.valueY() -> **valueY**: (\`z\`: \`string\`) => \\{\`a\`: \`string\`;\`b\`: \`string\`;\`c\`: \\{\`a\`: \`number\`;\`b\`: \`number\`; \\}; \\} +> **valueY**: (\`z\`: \`string\`) => \\{ \`a\`: \`string\`; \`b\`: \`string\`; \`c\`: \\{ \`a\`: \`number\`; \`b\`: \`number\`; \\}; \\} ##### Parameters @@ -892,7 +892,7 @@ Comment for valueX.valueA ##### Returns -\\{\`a\`: \`string\`;\`b\`: \`string\`;\`c\`: \\{\`a\`: \`number\`;\`b\`: \`number\`; \\}; \\} +\\{ \`a\`: \`string\`; \`b\`: \`string\`; \`c\`: \\{ \`a\`: \`number\`; \`b\`: \`number\`; \\}; \\} ###### a @@ -904,7 +904,7 @@ Comment for valueX.valueA ###### c -> **c**: \\{\`a\`: \`number\`;\`b\`: \`number\`; \\} +> **c**: \\{ \`a\`: \`number\`; \`b\`: \`number\`; \\} ###### c.a diff --git a/packages/typedoc-plugin-markdown/test/specs/__snapshots__/reflection.function.spec.ts.snap b/packages/typedoc-plugin-markdown/test/specs/__snapshots__/reflection.function.spec.ts.snap index 5984605ac..82e584a59 100644 --- a/packages/typedoc-plugin-markdown/test/specs/__snapshots__/reflection.function.spec.ts.snap +++ b/packages/typedoc-plugin-markdown/test/specs/__snapshots__/reflection.function.spec.ts.snap @@ -924,7 +924,7 @@ The name of the new group. #### nestedObj -\\{\`name\`: \`string\`;\`obj\`: \\{\`name\`: () => \`void\`; \\};\`value\`: \`number\`; \\} +\\{ \`name\`: \`string\`; \`obj\`: \\{ \`name\`: () => \`void\`; \\}; \`value\`: \`number\`; \\} A nested object. @@ -934,7 +934,7 @@ A nested object. #### nestedObj.obj -\\{\`name\`: () => \`void\`; \\} +\\{ \`name\`: () => \`void\`; \\} #### nestedObj.obj.name @@ -1268,7 +1268,7 @@ Comments for primitiveUnions Comments for objectUnionsUseful -\\{\`a\`: \`string\`;\`b\`: \`1\`; \\} | \\{\`a\`: \`number\`;\`b\`: \`1\`;\`c\`: \\{\`x\`: \`string\`; \\}; \\} +\\{ \`a\`: \`string\`; \`b\`: \`1\`; \\} | \\{ \`a\`: \`number\`; \`b\`: \`1\`; \`c\`: \\{ \`x\`: \`string\`; \\}; \\} ### mixedUnions @@ -1276,7 +1276,7 @@ Comments for mixedUnions \`string\` | \`number\` | -\\{\`a\`: \`string\`;\`b\`: \`string\`; \\} +\\{ \`a\`: \`string\`; \`b\`: \`string\`; \\} Comments for mixedUnions @@ -1294,13 +1294,13 @@ b comments | -\\{\`a\`: \\{\`y\`: \`string\`;\`z\`: \`string\`; \\}; \\} +\\{ \`a\`: \\{ \`y\`: \`string\`; \`z\`: \`string\`; \\}; \\} Comments for mixedUnions #### a -\\{\`y\`: \`string\`;\`z\`: \`string\`; \\} +\\{ \`y\`: \`string\`; \`z\`: \`string\`; \\} Comments for a diff --git a/packages/typedoc-plugin-markdown/test/specs/__snapshots__/reflection.type-alias.spec.ts.snap b/packages/typedoc-plugin-markdown/test/specs/__snapshots__/reflection.type-alias.spec.ts.snap index 063f0e258..3a8130982 100644 --- a/packages/typedoc-plugin-markdown/test/specs/__snapshots__/reflection.type-alias.spec.ts.snap +++ b/packages/typedoc-plugin-markdown/test/specs/__snapshots__/reflection.type-alias.spec.ts.snap @@ -765,7 +765,7 @@ Union with template strings exports[`Type Alias Reflection should compile union type: (Output File Strategy "members") (Option Group "1") 1`] = ` "# Type Alias: UnionType -> **UnionType**: \`string\` \\| \`boolean\` \\| \\{\`z\`: \`string\`; \\} +> **UnionType**: \`string\` \\| \`boolean\` \\| \\{ \`z\`: \`string\`; \\} Comments for UnionType @@ -795,7 +795,7 @@ Comments for UnionType exports[`Type Alias Reflection should compile useful union type: (Output File Strategy "members") (Option Group "1") 1`] = ` "# Type Alias: UsefulUnionType -> **UsefulUnionType**: \`string\` \\| \`boolean\` \\| \\{\`z\`: \`string\`; \\} +> **UsefulUnionType**: \`string\` \\| \`boolean\` \\| \\{ \`z\`: \`string\`; \\} Comments for useful UnionType @@ -805,7 +805,7 @@ Comments for useful UnionType \`boolean\` -\\{\`z\`: \`string\`; \\} +\\{ \`z\`: \`string\`; \\} ### z diff --git a/packages/typedoc-plugin-markdown/test/specs/__snapshots__/utils.spec.ts.snap b/packages/typedoc-plugin-markdown/test/specs/__snapshots__/utils.spec.ts.snap index 0d25a06f9..3428b7bf7 100644 --- a/packages/typedoc-plugin-markdown/test/specs/__snapshots__/utils.spec.ts.snap +++ b/packages/typedoc-plugin-markdown/test/specs/__snapshots__/utils.spec.ts.snap @@ -205,7 +205,7 @@ const originalDoubleQuote = "hello"; exports[`Utils should get variable with brackets: (Output File Strategy "members") (Option Group "1") 1`] = ` "# Variable: variableWithChars -> \`const\` **variableWithChars**: \\{\`\`: \`string\`;\`\`: \`string\`;\`\`: \`string\`; \\} +> \`const\` **variableWithChars**: \\{ \`\`: \`string\`; \`\`: \`string\`; \`\`: \`string\`; \\} ## Type declaration diff --git a/packages/typedoc-vitepress-theme/test/specs/__snapshots__/vitepress.spec.ts.snap b/packages/typedoc-vitepress-theme/test/specs/__snapshots__/vitepress.spec.ts.snap index 54c9a1ccd..28e2f1df2 100644 --- a/packages/typedoc-vitepress-theme/test/specs/__snapshots__/vitepress.spec.ts.snap +++ b/packages/typedoc-vitepress-theme/test/specs/__snapshots__/vitepress.spec.ts.snap @@ -92,6 +92,6 @@ exports[`VitePress should output docs with vitepress theme 1`] = ` exports[`VitePress should output members that require anchor slugification 1`] = ` "# Interface: InterfaceA -See [InterfaceB._prop_with_underscore_](InterfaceB.md#prop-with-underscore) +See [InterfaceB.\\_prop\\_with\\_underscore\\_](InterfaceB.md#prop-with-underscore) " `;