definition and docs

pull/2748/head
Denys Vuika 6 years ago
parent ff09e59985
commit c6c45135c2

@ -61,7 +61,7 @@ export class LanguageServiceDefaultsImpl implements monaco.languages.typescript.
}; };
} }
setExtraLibs(libs: Array<{ content: string; filePath?: string }> = []): IDisposable { setExtraLibs(libs: Array<{ content: string; filePath?: string }>): IDisposable {
const paths = []; const paths = [];
if (libs && libs.length > 0) { if (libs && libs.length > 0) {

16
src/monaco.d.ts vendored

@ -135,11 +135,23 @@ declare module monaco.languages.typescript {
* *
* @param content The file content * @param content The file content
* @param filePath An optional file path * @param filePath An optional file path
* @returns A disposabled which will remove the file from the * @returns A disposable which will remove the file from the
* language service upon disposal. * language service upon cleanup.
*/ */
addExtraLib(content: string, filePath?: string): IDisposable; addExtraLib(content: string, filePath?: string): IDisposable;
/**
* Add multiple source files to the language service.
* Use this for multiple typescript (definition) files that won't be loaded
* as editor document, like `jquery.d.ts`.
* This method is optimised for performance and raises change events only once
* for the whole list.
* @param libs An array of entries to register.
* @returns A disposable which will remove the file from the
* language service upon cleanup.
*/
setExtraLibs(libs: Array<{ content: string; filePath?: string }>): IDisposable;
/** /**
* Set TypeScript compiler options. * Set TypeScript compiler options.
*/ */

Loading…
Cancel
Save