Class TSCRuntime
java.lang.Object
org.openrewrite.javascript.internal.tsc.TSCRuntime
- All Implemented Interfaces:
AutoCloseable
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTSCRuntime
(com.caoccao.javet.interop.V8Runtime v8Runtime, com.caoccao.javet.interception.logging.JavetStandardConsoleInterceptor javetStandardConsoleInterceptor) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
importTS()
static TSCRuntime
init()
static TSCRuntime
init
(boolean forceWrappedV8Runtime) void
parseSingleSource
(String sourceText, String filename, BiConsumer<TSCNode, TSCSourceFileContext> callback) void
parseSingleSource
(String sourceText, BiConsumer<TSCNode, TSCSourceFileContext> callback) void
parseSourceTexts
(Map<Path, String> sourceTexts, BiConsumer<TSCNode, TSCSourceFileContext> callback) setCompilerOptionOverride
(String key, Object value)
-
Field Details
-
v8Runtime
public final com.caoccao.javet.interop.V8Runtime v8Runtime -
tsParseV8
@Nullable public @Nullable com.caoccao.javet.values.reference.V8ValueFunction tsParseV8
-
-
Constructor Details
-
TSCRuntime
public TSCRuntime(com.caoccao.javet.interop.V8Runtime v8Runtime, com.caoccao.javet.interception.logging.JavetStandardConsoleInterceptor javetStandardConsoleInterceptor)
-
-
Method Details
-
init
-
init
-
setCompilerOptionOverride
-
enableVirtualFileSystemTracing
-
importTS
public void importTS() -
parseSingleSource
public void parseSingleSource(@Language("typescript") String sourceText, BiConsumer<TSCNode, TSCSourceFileContext> callback) -
parseSingleSource
public void parseSingleSource(@Language("typescript") String sourceText, String filename, BiConsumer<TSCNode, TSCSourceFileContext> callback) -
parseSourceTexts
public void parseSourceTexts(Map<Path, String> sourceTexts, BiConsumer<TSCNode, TSCSourceFileContext> callback) -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-