执行过npm install命令的vue-element-admin源码
康凯
2022-05-20 aa4c235a8ca67ea8b731f90c951a465e92c0a865
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
import { LinkifyIt } from 'linkify-it'
 
import State = require('./rules_core/state_core');
import StateBlock = require('./rules_block/state_block');
import StateInline = require('./rules_inline/state_inline');
 
import Core = require('./parser_core');
import ParserBlock = require('./parser_block');
import ParserInline = require('./parser_inline');
 
import Renderer = require('./renderer');
import Ruler = require('./ruler');
import Token = require('./token');
 
export = MarkdownIt;
export as namespace markdownit;
 
declare const MarkdownIt: MarkdownItConstructor;
 
interface MarkdownItConstructor {
    new (): MarkdownIt;
    new (presetName: "commonmark" | "zero" | "default", options?: MarkdownIt.Options): MarkdownIt;
    new (options: MarkdownIt.Options): MarkdownIt;
    (): MarkdownIt;
    (presetName: "commonmark" | "zero" | "default", options ?: MarkdownIt.Options): MarkdownIt;
    (options: MarkdownIt.Options): MarkdownIt;
}
 
interface MarkdownIt {
    render(md: string, env?: any): string;
    renderInline(md: string, env?: any): string;
    parse(src: string, env: any): Token[];
    parseInline(src: string, env: any): Token[];
 
    /*
    // The following only works in 3.0
    // Since it's still not allowed to target 3.0, i'll leave the code commented out
 
    use<T extends Array<any> = any[]>(
        plugin: (md: MarkdownIt, ...params: T) => void,
        ...params: T
    ): MarkdownIt;
    */
 
    use(plugin: (md: MarkdownIt, ...params: any[]) => void, ...params: any[]): MarkdownIt;
 
    utils: {
        assign(obj: any): any;
        isString(obj: any): boolean;
        has(object: any, key: string): boolean;
        unescapeMd(str: string): string;
        unescapeAll(str: string): string;
        isValidEntityCode(str: any): boolean;
        fromCodePoint(str: string): string;
        escapeHtml(str: string): string;
        arrayReplaceAt(src: any[], pos: number, newElements: any[]): any[]
        isSpace(str: any): boolean;
        isWhiteSpace(str: any): boolean
        isMdAsciiPunct(str: any): boolean;
        isPunctChar(str: any): boolean;
        escapeRE(str: string): string;
        normalizeReference(str: string): string;
    }
 
    disable(rules: string[] | string, ignoreInvalid?: boolean): MarkdownIt;
    enable(rules: string[] | string, ignoreInvalid?: boolean): MarkdownIt;
    set(options: MarkdownIt.Options): MarkdownIt;
    normalizeLink(url: string): string;
    normalizeLinkText(url: string): string;
    validateLink(url: string): boolean;
    block: ParserBlock;
    core: Core;
    helpers: any;
    inline: ParserInline;
    linkify: LinkifyIt;
    renderer: Renderer;
}
 
declare module MarkdownIt {
    interface Options {
        html?: boolean;
        xhtmlOut?: boolean;
        breaks?: boolean;
        langPrefix?: string;
        linkify?: boolean;
        typographer?: boolean;
        quotes?: string;
        highlight?: (str: string, lang: string) => void;
    }
 
    interface Rule<S extends State = State> {
        (state: S, silent?: boolean): boolean | void;
    }
 
    interface RuleInline extends Rule<StateInline> {}
    interface RuleBlock extends Rule<StateBlock> {}
 
    interface RulerInline extends Ruler<StateInline> {}
    interface RulerBlock extends Ruler<StateBlock> {}
 
    type TokenRender = (tokens: Token[], index: number, options: any, env: any, self: Renderer) => void;
 
    interface Delimiter {
        close: boolean;
        end: number;
        jump: number;
        length: number;
        level: number;
        marker: number;
        open: boolean;
        token: number;
    }
}