1
|
import * as o from './output/output_ast';
|
2
|
import { ParseError } from './parse_util';
|
3
|
export declare const MODULE_SUFFIX = "";
|
4
|
export declare function camelCaseToDashCase(input: string): string;
|
5
|
export declare function dashCaseToCamelCase(input: string): string;
|
6
|
export declare function splitAtColon(input: string, defaultValues: string[]): string[];
|
7
|
export declare function splitAtPeriod(input: string, defaultValues: string[]): string[];
|
8
|
export declare function visitValue(value: any, visitor: ValueVisitor, context: any): any;
|
9
|
export declare function isDefined(val: any): boolean;
|
10
|
export declare function noUndefined<T>(val: T | undefined): T;
|
11
|
export interface ValueVisitor {
|
12
|
visitArray(arr: any[], context: any): any;
|
13
|
visitStringMap(map: {
|
14
|
[key: string]: any;
|
15
|
}, context: any): any;
|
16
|
visitPrimitive(value: any, context: any): any;
|
17
|
visitOther(value: any, context: any): any;
|
18
|
}
|
19
|
export declare class ValueTransformer implements ValueVisitor {
|
20
|
visitArray(arr: any[], context: any): any;
|
21
|
visitStringMap(map: {
|
22
|
[key: string]: any;
|
23
|
}, context: any): any;
|
24
|
visitPrimitive(value: any, context: any): any;
|
25
|
visitOther(value: any, context: any): any;
|
26
|
}
|
27
|
export declare type SyncAsync<T> = T | Promise<T>;
|
28
|
export declare const SyncAsync: {
|
29
|
assertSync: <T>(value: SyncAsync<T>) => T;
|
30
|
then: <T, R>(value: SyncAsync<T>, cb: (value: T) => SyncAsync<R>) => SyncAsync<R>;
|
31
|
all: <T>(syncAsyncValues: SyncAsync<T>[]) => SyncAsync<T[]>;
|
32
|
};
|
33
|
export declare function syntaxError(msg: string, parseErrors?: ParseError[]): Error;
|
34
|
export declare function isSyntaxError(error: Error): boolean;
|
35
|
export declare function getParseErrors(error: Error): ParseError[];
|
36
|
export declare function escapeRegExp(s: string): string;
|
37
|
export declare function utf8Encode(str: string): string;
|
38
|
export interface OutputContext {
|
39
|
genFilePath: string;
|
40
|
statements: o.Statement[];
|
41
|
importExpr(reference: any, typeParams?: o.Type[] | null): o.Expression;
|
42
|
}
|