I have a typescript error when using prefix and parents of mdast-util-toc options.
My environment
OS: macOS Catalina 10.15.7
Env: TypeScript 4.1.5
Steps to reproduce
Write below code on types/remark-toc-tests.ts:
remark().use(toc, {
prefix: 'prefix-'
})
Expected behavior
no error.
Actual behavior
I have an error.
Argument of type '{ prefix: string; }' is not assignable to parameter of type 'Pick<TOCOptions, "heading" | "maxDepth" | "tight" | "skip">'.
Object literal may only specify known properties, and 'prefix' does not exist in type 'Pick<TOCOptions, "heading" | "maxDepth" | "tight" | "skip">'.ts(2345)
Problem
I have a typescript error when using
prefix
andparents
ofmdast-util-toc
options.My environment
Steps to reproduce
Write below code on
types/remark-toc-tests.ts
:Expected behavior
no error.
Actual behavior
I have an error.