-
Notifications
You must be signed in to change notification settings - Fork 0
/
globals.d.ts
47 lines (43 loc) · 1.13 KB
/
globals.d.ts
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
declare module 'oc-generic-template-compiler' {
type Callback<T> = (err: Error | null, data?: T) => void;
type CompiledViewInfo = any;
type OcOptions = {
files: {
data: string;
template: {
src: string;
type: string;
};
static: string[];
};
};
type Options = {
publishPath: string;
componentPath: string;
componentPackage: {
name: string;
version: string;
dependencies: Record<string, string>;
oc: OcOptions;
};
ocPackage: any;
minify: boolean;
verbose: boolean;
production: boolean;
};
type CompileServer = (
options: Options & { compiledViewInfo: CompiledViewInfo },
cb: Callback<any>
) => void;
type CompileView = (options: Options, cb: Callback<CompiledViewInfo>) => void;
type CompileStatics = (options: Options, cb: Callback<'ok'>) => void;
type GetInfo = () => {
version: string;
};
export function createCompile(parameters: {
compileView: CompileView;
compileServer: CompileServer;
compileStatics: CompileStatics;
getInfo: GetInfo;
}): (options: Options, cb: Callback<any>) => void;
}