export type VariableLookup = (str: string) => string; export interface ScriptShape { script: string; argv: string[]; } export type Preprocessor = (param: string, variableLookup: VariableLookup) => string | string[] | ScriptShape; export type PreprocessorOptions = { ignoreEscaping: boolean; escapedQuotes?: string; }; export interface EscapeStringOptions extends PreprocessorOptions { preprocessor?: Preprocessor; } export declare function preprocessParameter(param: string, preprocessor: Preprocessor | undefined, variableLookup: VariableLookup, { ignoreEscaping, escapedQuotes }: PreprocessorOptions): string | ScriptShape | string[]; export declare const hasVariable: (param: string) => boolean; export declare function defaultPreprocessor(param: string, _variableLookup?: VariableLookup): string; export interface VariableInStringOptions { quotes: string[]; toString: (lookup: string) => string; } export declare const defaultVariableInStringOptions: VariableInStringOptions; /** * Replaces the variable marks in an emitted line of code. A mark outside a * string literal becomes the variable lookup. A mark inside a string literal * splits it: "Hi ${name}!" becomes "Hi " + name + "!". */ export declare function resolveVariables(code: string, variableLookup: VariableLookup, { quotes, toString }?: VariableInStringOptions): string; export declare function scriptPreprocessor(script: string): ScriptShape; export declare function keysPreprocessor(str: string, variableLookup?: VariableLookup): string[]; //# sourceMappingURL=preprocessor.d.ts.map