Skip to content

Commit

Permalink
fix(core): add '?' for optional type declarations in tables
Browse files Browse the repository at this point in the history
  • Loading branch information
tgreyuk committed Sep 1, 2024
1 parent ba8956c commit c0744f0
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 16 deletions.
5 changes: 5 additions & 0 deletions .changeset/silent-starfishes-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'typedoc-plugin-markdown': patch
---

- Add '?' for optional type declarations in tables
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export type LiteralType = {
/**
* comment for x
*/
x: string;
x?: string;
/**
* comment for y
*/
Expand All @@ -115,7 +115,7 @@ export type LiteralType = {
/**
* comment for y.y
*/
y: boolean | string;
y?: boolean | string;
/**
* comment for y.z
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -504,9 +504,9 @@ Comments for someFunctionWithArrow
\`string\`
### x
### x?
> **x**: \`string\`
> \`optional\` **x**: \`string\`
comment for x
Expand All @@ -522,9 +522,9 @@ comment for y
comment for y.x
### y.y
### y.y?
> **y**: \`boolean\` \\| \`string\`
> \`optional\` **y**: \`boolean\` \\| \`string\`
comment for y.y
Expand Down Expand Up @@ -635,10 +635,10 @@ Comments for someFunctionWithArrow
\`string\`
### x
### x?
\`\`\`ts
x: string;
optional x: string;
\`\`\`
comment for x
Expand All @@ -663,10 +663,10 @@ x: string;
comment for y.x
### y.y
### y.y?
\`\`\`ts
y: boolean | string;
optional y: boolean | string;
\`\`\`
comment for y.y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ Comments for someFunctionWithArrow
\`string\`
### x
### x?
> **x**: \`string\`
> \`optional\` **x**: \`string\`
comment for x
Expand All @@ -131,9 +131,9 @@ comment for y
comment for y.x
### y.y
### y.y?
> **y**: \`boolean\` \\| \`string\`
> \`optional\` **y**: \`boolean\` \\| \`string\`
comment for y.y
Expand Down Expand Up @@ -227,10 +227,10 @@ Comments for LiteralType
| Name | Type | Description |
| :------ | :------ | :------ |
| \`someFunctionWithArrow\` | () => \`string\` | Comments for someFunctionWithArrow |
| \`x\` | \`string\` | comment for x |
| \`x\`? | \`string\` | comment for x |
| \`y\` | \`object\` | comment for y |
| \`y.x\` | \`string\` | comment for y.x |
| \`y.y\` | \`boolean\` \\| \`string\` | comment for y.y |
| \`y.y\`? | \`boolean\` \\| \`string\` | comment for y.y |
| \`y.z\` | (\`x\`: \`string\`) => \`string\` | comment for y.z |
| \`z\` | (\`x\`: \`string\`) => \`string\` | - |
| \`get accessorA\` | [\`Promise\`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\\<\`string\`\\> | Comments for accessorA getter |
Expand Down

0 comments on commit c0744f0

Please sign in to comment.