You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
vitepress/patches/markdown-it-anchor@8.6.7.patch

30 lines
1.3 KiB

diff --git a/types/index.d.ts b/types/index.d.ts
index 7c94aae194faa66ca006ace98cdb0dee82a3e471..0377cace7c4a9653d4ecf963babffd4bd68494b0 100644
--- a/types/index.d.ts
+++ b/types/index.d.ts
@@ -1,10 +1,10 @@
-import MarkdownIt = require('markdown-it');
-import Token = require('markdown-it/lib/token');
-import State = require('markdown-it/lib/rules_core/state_core');
+import MarkdownIt from 'markdown-it';
+import Token from 'markdown-it/lib/token.mjs';
+import StateCore from 'markdown-it/lib/rules_core/state_core.mjs';
declare namespace anchor {
- export type RenderHref = (slug: string, state: State) => string;
- export type RenderAttrs = (slug: string, state: State) => Record<string, string | number>;
+ export type RenderHref = (slug: string, state: StateCore) => string;
+ export type RenderAttrs = (slug: string, state: StateCore) => Record<string, string | number>;
export interface PermalinkOptions {
class?: string,
@@ -37,7 +37,7 @@ declare namespace anchor {
placement?: 'before' | 'after'
}
- export type PermalinkGenerator = (slug: string, opts: PermalinkOptions, state: State, index: number) => void;
+ export type PermalinkGenerator = (slug: string, opts: PermalinkOptions, state: StateCore, index: number) => void;
export interface AnchorInfo {
slug: string;