Closed cascornelissen closed 3 weeks ago
That is because the this that is passed in is a Renderer
not a RendererObject
.
The function signature in typescript should be
heading(this: Renderer, token: Tokens.Heading): string {
Based on the works as intended
label I assume not, but is it not possible to type this
correctly on the side of marked?
You are creating the function so you need to type it correctly. The function signature I provided is the way you would create the correctly typed function.
Marked version: 13.0.0
Describe the bug A clear and concise description of what the bug is.
To Reproduce Trying to migrate an extension by following the notes of the release results in code that's incompatible with the TypeScript types. The cause seems to be that
RendererObject
refers toRendererApi
which is defined asOmit<_Renderer, "constructor" | "options" | "parser">
soparser
is being omitted?Expected behavior The example works as expected.