valeriangalliat / markdown-it-anchor

A markdown-it plugin that adds an `id` attribute to headings and optionally permalinks.
The Unlicense
291 stars 72 forks source link

incorrect type for permalink.headerLink() #108

Closed benblazak closed 2 years ago

benblazak commented 2 years ago

https://github.com/valeriangalliat/markdown-it-anchor/blob/7a64eec879b7f1617800680ef87e5ac6235ed79a/types/index.d.ts#L56

Should probably allow for options, like the other types nearby.

TypeScript complains e.g. about permalink: MarkdownItAnchor.permalink.headerLink({ safariReaderFix: true }).

Workaround: Put a // @ts-ignore above the line.

valeriangalliat commented 2 years ago

Thanks for reporting! I just fixed this in v8.6.1 so you can remove your // @ts-ignore. Sorry for the late reply :)

benblazak commented 2 years ago

thanks!