core3-utils

@wixc3/typescript on Github

Home > @wixc3/typescript > compileCode

compileCode() function

Compiles a code string to typescript AST

Signature:

export declare function compileCode(code: string, fakePath?: string): ts.SourceFile;

Parameters

Parameter Type Description
code string
fakePath string _(Optional)_ path the virtual file of the code

Returns:

ts.SourceFile