UNPKG

1.01 kBTypeScriptView Raw
1import type { CSSAbbreviation } from '@emmetio/css-abbreviation';
2import { Config, SnippetsMap } from '../config.js';
3import type { CSSSnippet } from './snippets.js';
4export { default as stringify, CSSAbbreviationScope } from './format.js';
5type MatchInput = CSSSnippet | string;
6/**
7 * Parses given Emmet abbreviation into a final abbreviation tree with all
8 * required transformations applied
9 */
10export default function parse(abbr: string | CSSAbbreviation, config: Config): CSSAbbreviation;
11/**
12 * Converts given raw snippets into internal snippets representation
13 */
14export declare function convertSnippets(snippets: SnippetsMap): CSSSnippet[];
15/**
16 * Finds best matching item from `items` array
17 * @param abbr Abbreviation to match
18 * @param items List of items for match
19 * @param minScore The minimum score the best matched item should have to be a valid match.
20 */
21export declare function findBestMatch<T extends MatchInput>(abbr: string, items: T[], minScore?: number, partialMatch?: boolean): T | null;