discord-markdown icon indicating copy to clipboard operation
discord-markdown copied to clipboard

toHTML Error CustomOutput

Open SrGobi opened this issue 3 years ago • 1 comments
trafficstars

It seems that the package contains an error in the transcription to TypeScript, I have been investigating and the problem seems to be another package installed in the same simple-markdown@latestversion Generic type 'Output' requires 1 type argument (s) document: node_modules/simple-markdown/simple-markdown.d.ts line: 64

    node: ASTNode,
    state?: OptionalState
) => Result;

Thanks a lot. image

SrGobi avatar Dec 29 '21 18:12 SrGobi

I have tried to solve the problem by adding a result with the following format even though I don't know which one to place because I don't fully understand the system export function toHTML(source: string, options?: HTMLOptions, customParser?: markdown.Parser, customOutput?: markdown.Output<string>): string; image export function toHTML(source: string, options?: HTMLOptions, customParser?: markdown.Parser, customOutput?: markdown.Output<any>): string;

SrGobi avatar Dec 29 '21 18:12 SrGobi