UNPKG

@ztl-uwu/nuxt-content

Version:

Write your content inside your Nuxt app

40 lines (39 loc) 1.71 kB
/** * @typedef {import('micromark-util-types').Code} Code * @typedef {import('micromark-util-types').Chunk} Chunk * @typedef {import('micromark-util-types').Point} Point * @typedef {import('micromark-util-types').Token} Token * @typedef {import('micromark-util-types').Effects} Effects * @typedef {import('micromark-util-types').State} State * @typedef {import('micromark-util-types').Construct} Construct * @typedef {import('micromark-util-types').InitialConstruct} InitialConstruct * @typedef {import('micromark-util-types').ConstructRecord} ConstructRecord * @typedef {import('micromark-util-types').TokenizeContext} TokenizeContext * @typedef {import('micromark-util-types').ParseContext} ParseContext */ /** * Create a tokenizer. * Tokenizers deal with one type of data (e.g., containers, flow, text). * The parser is the object dealing with it all. * `initialize` works like other constructs, except that only its `tokenize` * function is used, in which case it doesn’t receive an `ok` or `nok`. * `from` can be given to set the point before the first character, although * when further lines are indented, they must be set with `defineSkip`. * * @param {ParseContext} parser * @param {InitialConstruct} initialize * @param {Omit<Point, '_index'|'_bufferIndex'>} [from] * @returns {TokenizeContext} */ export declare function createTokenizer(parser: any, initialize: any, from: any): { previous: null; code: null; containerState: {}; events: never[]; parser: any; sliceStream: (token: any) => any; sliceSerialize: (token: any, expandTabs: any) => string; now: () => any; defineSkip: (value: any) => void; write: (slice: any) => never[]; };