diff --git a/src/rehype-katex.ts b/src/rehype-katex.ts index 6fb04dd..cf31000 100644 --- a/src/rehype-katex.ts +++ b/src/rehype-katex.ts @@ -41,15 +41,16 @@ const expressionOfMdxJsxExpressionAttribute = ( export type RehypeKatexPlugin = import("unified").Plugin< [ - Readonly<{ - dynamicSuffix?: () => string; - }>, + | Readonly<{ + dynamicSuffix?: () => string; + }> + | undefined, ], Root >; const rehypeKatex: RehypeKatexPlugin = ({ dynamicSuffix = () => Math.random().toString(36).slice(2), -}) => { +} = {}) => { return async (tree, file) => { const dynamicKeyName = `_rehypeKatexContext${dynamicSuffix()}`; tree.children.unshift({