UNPKG

827 BTypeScriptView Raw
1import { LazyResult } from 'postcss';
2export interface StyleCompileOptions {
3 source: string;
4 filename: string;
5 id: string;
6 map?: any;
7 scoped?: boolean;
8 trim?: boolean;
9 preprocessLang?: string;
10 preprocessOptions?: any;
11 postcssOptions?: any;
12 postcssPlugins?: any[];
13}
14export interface AsyncStyleCompileOptions extends StyleCompileOptions {
15 isAsync?: boolean;
16}
17export interface StyleCompileResults {
18 code: string;
19 map: any | void;
20 rawResult: LazyResult | void;
21 errors: string[];
22}
23export declare function compileStyle(options: StyleCompileOptions): StyleCompileResults;
24export declare function compileStyleAsync(options: StyleCompileOptions): Promise<StyleCompileResults>;
25export declare function doCompileStyle(options: AsyncStyleCompileOptions): StyleCompileResults;