emit

abstract fun emit(targetSourceFile: SourceFile = definedExternally, writeFile: WriteFileCallback = definedExternally, cancellationToken: CancellationToken = definedExternally, emitOnlyDtsFiles: Boolean = definedExternally, customTransformers: CustomTransformers = definedExternally): EmitResult(source)

Emits the JavaScript and declaration files. If targetSourceFile is not specified, then the JavaScript and declaration files will be produced for all the files in this program. If targetSourceFile is specified, then only the JavaScript and declaration for that specific file will be generated.

If writeFile is not specified then the writeFile callback from the compiler host will be used for writing the JavaScript and declaration files. Otherwise, the writeFile parameter will be invoked when writing the JavaScript and declaration files.