mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 19:42:56 +01:00
Add API to .d.ts
This commit is contained in:
parent
a5b927fca1
commit
aee134f9c1
2 changed files with 11 additions and 2 deletions
|
|
@ -69,7 +69,11 @@ export class TypeScriptWorker implements ts.LanguageServiceHost, monaco.language
|
|||
return '';
|
||||
}
|
||||
|
||||
getScriptText(fileName: string): string | undefined {
|
||||
getScriptText(fileName: string): Promise<string | undefined> {
|
||||
return Promise.resolve(this._getScriptText(fileName));
|
||||
}
|
||||
|
||||
_getScriptText(fileName: string): string | undefined {
|
||||
let text: string;
|
||||
let model = this._getModel(fileName);
|
||||
if (model) {
|
||||
|
|
@ -92,7 +96,7 @@ export class TypeScriptWorker implements ts.LanguageServiceHost, monaco.language
|
|||
}
|
||||
|
||||
getScriptSnapshot(fileName: string): ts.IScriptSnapshot | undefined {
|
||||
const text = this.getScriptText(fileName);
|
||||
const text = this._getScriptText(fileName);
|
||||
if (!text) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue