import ts from 'typescript/lib/typescript'; /** * 保存编译产物的对象 */ export declare let contextModuleMap: {}; /** * 编译选项 */ export type CompilerOptions = { compilerOptions?: ts.CompilerOptions; /** * 初始的 contextModuleMap */ context?: any; /** * ast转换器 */ transformers?: ts.CustomTransformers; }; /** * 编译ts代码字符串,输出js字符串(会检查类型) */ export declare function compile(code: string, options?: CompilerOptions): Promise; /** * 编译ts代码字符串,输出js字符串(不会检察ts类型) */ export declare const transpile: (code: string, options?: CompilerOptions) => ts.TranspileOutput;