( depth: number, content: string | PhrasingContent[], )
| 63 | } |
| 64 | |
| 65 | function createHeading( |
| 66 | depth: number, |
| 67 | content: string | PhrasingContent[], |
| 68 | ): Heading { |
| 69 | const children = Array.isArray(content) |
| 70 | ? content |
| 71 | : [{ type: "text", value: content }]; |
| 72 | |
| 73 | return { |
| 74 | type: "heading", |
| 75 | depth: Math.min(Math.max(depth, 1), 6), |
| 76 | children, |
| 77 | }; |
| 78 | } |
| 79 | |
| 80 | function createInlineCode(value: string): PhrasingContent { |
| 81 | return { type: "inlineCode", value }; |
no outgoing calls
no test coverage detected