UNPKG

1.26 kBTypeScriptView Raw
1import type { BiblioEntry, ExportedBiblio } from './Biblio';
2import Spec from './Spec';
3import { CancellationToken } from 'prex';
4export type { Spec, BiblioEntry };
5export declare class Boilerplate {
6 address?: string;
7 copyright?: string;
8 license?: string;
9}
10export declare type EcmarkupError = {
11 ruleId: string;
12 message: string;
13 file?: string;
14 source?: string;
15 line?: number;
16 column?: number;
17 nodeType?: string;
18};
19export interface Options {
20 status?: 'proposal' | 'draft' | 'standard';
21 version?: string;
22 title?: string;
23 shortname?: string;
24 stage?: string | null;
25 copyright?: boolean;
26 date?: Date;
27 location?: string;
28 multipage?: boolean;
29 extraBiblios?: ExportedBiblio[];
30 contributors?: string;
31 toc?: boolean;
32 oldToc?: boolean;
33 markEffects?: boolean;
34 lintSpec?: boolean;
35 cssOut?: string;
36 jsOut?: string;
37 assets?: 'none' | 'inline' | 'external';
38 outfile?: string;
39 boilerplate?: Boilerplate;
40 log?: (msg: string) => void;
41 warn?: (err: EcmarkupError) => void;
42}
43export declare function build(path: string, fetch: (path: string, token: CancellationToken) => PromiseLike<string>, opts?: Options, token?: CancellationToken): Promise<Spec>;