mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 11:35:40 +01:00
Pass args down too
This commit is contained in:
parent
5a8eb62e4e
commit
7be409ee98
2 changed files with 15 additions and 3 deletions
|
|
@ -522,7 +522,11 @@ export interface TypeScriptWorker {
|
||||||
* Get transpiled output for the given file.
|
* Get transpiled output for the given file.
|
||||||
* @returns `typescript.EmitOutput`
|
* @returns `typescript.EmitOutput`
|
||||||
*/
|
*/
|
||||||
getEmitOutput(fileName: string): Promise<EmitOutput>;
|
getEmitOutput(
|
||||||
|
fileName: string,
|
||||||
|
emitOnlyDtsFiles?: boolean,
|
||||||
|
forceDtsEmit?: boolean
|
||||||
|
): Promise<EmitOutput>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get possible code fixes at the given position in the file.
|
* Get possible code fixes at the given position in the file.
|
||||||
|
|
|
||||||
|
|
@ -402,12 +402,20 @@ export class TypeScriptWorker implements ts.LanguageServiceHost, ITypeScriptWork
|
||||||
return this._languageService.getRenameInfo(fileName, position, options);
|
return this._languageService.getRenameInfo(fileName, position, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getEmitOutput(fileName: string): Promise<EmitOutput> {
|
async getEmitOutput(
|
||||||
|
fileName: string,
|
||||||
|
emitOnlyDtsFiles?: boolean,
|
||||||
|
forceDtsEmit?: boolean
|
||||||
|
): Promise<EmitOutput> {
|
||||||
if (fileNameIsLib(fileName)) {
|
if (fileNameIsLib(fileName)) {
|
||||||
return { outputFiles: [], emitSkipped: true };
|
return { outputFiles: [], emitSkipped: true };
|
||||||
}
|
}
|
||||||
// The diagnostics property is internal, returning it without clearing breaks message serialization.
|
// The diagnostics property is internal, returning it without clearing breaks message serialization.
|
||||||
const emitOutput = this._languageService.getEmitOutput(fileName) as ts.EmitOutput & {
|
const emitOutput = this._languageService.getEmitOutput(
|
||||||
|
fileName,
|
||||||
|
emitOnlyDtsFiles,
|
||||||
|
forceDtsEmit
|
||||||
|
) as ts.EmitOutput & {
|
||||||
diagnostics?: ts.Diagnostic[];
|
diagnostics?: ts.Diagnostic[];
|
||||||
};
|
};
|
||||||
const diagnostics = emitOutput.diagnostics
|
const diagnostics = emitOutput.diagnostics
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue