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. When targetSource file is specified, emits the files corresponding to that source file, otherwise for the whole program. In case of EmitAndSemanticDiagnosticsBuilderProgram, when targetSourceFile is specified, it is assumed that that file is handled from affected file list. If targetSourceFile is not specified, it will only emit all the affected files instead of whole program

The first of writeFile if provided, writeFile of BuilderProgramHost if provided, writeFile of compiler host in that order would be used to write the files