mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 07:00:11 +01:00
adopt latest monaco plugins
This commit is contained in:
parent
f67f0a9cfa
commit
2a996151d7
5 changed files with 327 additions and 319 deletions
58
gulpfile.js
58
gulpfile.js
|
|
@ -184,54 +184,26 @@ function addPluginContribs(type) {
|
|||
var contribPath = path.join(__dirname, pluginPath, plugin.contrib.substr(plugin.modulePrefix.length)) + '.js';
|
||||
var contribContents = fs.readFileSync(contribPath).toString();
|
||||
|
||||
// Check for the anonymous define call case 1
|
||||
// transform define(function() {...}) to define("moduleId",["require"],function() {...})
|
||||
var anonymousContribDefineCase1 = contribContents.indexOf('define(function');
|
||||
if (anonymousContribDefineCase1 >= 0) {
|
||||
contribContents = (
|
||||
contribContents.substring(0, anonymousContribDefineCase1)
|
||||
+ `define("${plugin.contrib}",["require"],function`
|
||||
+ contribContents.substring(anonymousContribDefineCase1 + 'define(function'.length)
|
||||
);
|
||||
}
|
||||
|
||||
// Check for the anonymous define call case 2
|
||||
// transform define([ to define("moduleId",[
|
||||
var anonymousContribDefineCase2 = contribContents.indexOf('define([');
|
||||
if (anonymousContribDefineCase2 >= 0) {
|
||||
contribContents = (
|
||||
contribContents.substring(0, anonymousContribDefineCase2)
|
||||
+ `define("${plugin.contrib}",[`
|
||||
+ contribContents.substring(anonymousContribDefineCase2 + 'define(['.length)
|
||||
);
|
||||
}
|
||||
|
||||
var contribDefineIndex = contribContents.indexOf('define("' + plugin.contrib);
|
||||
if (contribDefineIndex === -1) {
|
||||
contribDefineIndex = contribContents.indexOf('define(\'' + plugin.contrib);
|
||||
if (contribDefineIndex === -1) {
|
||||
console.error('(1) CANNOT DETERMINE AMD define location for contribution', pluginPath);
|
||||
process.exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
var depsEndIndex = contribContents.indexOf(']', contribDefineIndex);
|
||||
if (contribDefineIndex === -1) {
|
||||
console.error('(2) CANNOT DETERMINE AMD define location for contribution', pluginPath);
|
||||
process.exit(-1);
|
||||
}
|
||||
|
||||
contribContents = contribContents.substring(0, depsEndIndex) + ',"vs/editor/editor.api"' + contribContents.substring(depsEndIndex);
|
||||
|
||||
contribContents = contribContents.replace(
|
||||
'define("vs/basic-languages/_.contribution",["require","exports"],',
|
||||
'define("vs/basic-languages/_.contribution",["require","exports","vs/editor/editor.api"],',
|
||||
`define('vs/language/css/fillers/monaco-editor-core',[],`,
|
||||
`define('vs/language/css/fillers/monaco-editor-core',['vs/editor/editor.api'],`,
|
||||
);
|
||||
contribContents = contribContents.replace(
|
||||
`define('vs/language/html/fillers/monaco-editor-core',[],`,
|
||||
`define('vs/language/html/fillers/monaco-editor-core',['vs/editor/editor.api'],`,
|
||||
);
|
||||
|
||||
contribContents = contribContents.replace(
|
||||
`define('vs/language/json/fillers/monaco-editor-core',[],`,
|
||||
`define('vs/language/json/fillers/monaco-editor-core',['vs/editor/editor.api'],`,
|
||||
);
|
||||
contribContents = contribContents.replace(
|
||||
`define('vs/language/typescript/fillers/monaco-editor-core',[],`,
|
||||
`define('vs/language/typescript/fillers/monaco-editor-core',['vs/editor/editor.api'],`,
|
||||
);
|
||||
contribContents = contribContents.replace(
|
||||
`define('vs/basic-languages/fillers/monaco-editor-core',[],`,
|
||||
`define('vs/basic-languages/fillers/monaco-editor-core',['vs/editor/editor.api'],`,
|
||||
);
|
||||
|
||||
extraContent.push(contribContents);
|
||||
});
|
||||
|
|
@ -452,7 +424,7 @@ function addPluginDTS() {
|
|||
var dtsPath = path.join(pluginPath, '../monaco.d.ts');
|
||||
try {
|
||||
let plugindts = fs.readFileSync(dtsPath).toString();
|
||||
plugindts = plugindts.replace('declare module', 'declare namespace');
|
||||
plugindts = plugindts.replace(/\/\/\/ <reference.*\n/m, '');
|
||||
extraContent.push(plugindts);
|
||||
} catch (err) {
|
||||
return;
|
||||
|
|
|
|||
274
monaco.d.ts
vendored
274
monaco.d.ts
vendored
|
|
@ -6186,10 +6186,14 @@ declare namespace monaco.worker {
|
|||
|
||||
//dtsv=3
|
||||
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
declare namespace monaco.languages.typescript {
|
||||
|
||||
enum ModuleKind {
|
||||
export enum ModuleKind {
|
||||
None = 0,
|
||||
CommonJS = 1,
|
||||
AMD = 2,
|
||||
|
|
@ -6198,19 +6202,17 @@ declare namespace monaco.languages.typescript {
|
|||
ES2015 = 5,
|
||||
ESNext = 99
|
||||
}
|
||||
|
||||
enum JsxEmit {
|
||||
export enum JsxEmit {
|
||||
None = 0,
|
||||
Preserve = 1,
|
||||
React = 2,
|
||||
ReactNative = 3
|
||||
}
|
||||
enum NewLineKind {
|
||||
export enum NewLineKind {
|
||||
CarriageReturnLineFeed = 0,
|
||||
LineFeed = 1
|
||||
}
|
||||
|
||||
enum ScriptTarget {
|
||||
export enum ScriptTarget {
|
||||
ES3 = 0,
|
||||
ES5 = 1,
|
||||
ES2015 = 2,
|
||||
|
|
@ -6221,19 +6223,24 @@ declare namespace monaco.languages.typescript {
|
|||
ES2020 = 7,
|
||||
ESNext = 99,
|
||||
JSON = 100,
|
||||
Latest = ESNext,
|
||||
Latest = 99
|
||||
}
|
||||
|
||||
export enum ModuleResolutionKind {
|
||||
Classic = 1,
|
||||
NodeJs = 2
|
||||
}
|
||||
|
||||
interface MapLike<T> {
|
||||
[index: string]: T;
|
||||
}
|
||||
|
||||
type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike<string[]> | null | undefined;
|
||||
declare type CompilerOptionsValue =
|
||||
| string
|
||||
| number
|
||||
| boolean
|
||||
| (string | number)[]
|
||||
| string[]
|
||||
| MapLike<string[]>
|
||||
| null
|
||||
| undefined;
|
||||
interface CompilerOptions {
|
||||
allowJs?: boolean;
|
||||
allowSyntheticDefaultImports?: boolean;
|
||||
|
|
@ -6317,23 +6324,23 @@ declare namespace monaco.languages.typescript {
|
|||
useDefineForClassFields?: boolean;
|
||||
[option: string]: CompilerOptionsValue | undefined;
|
||||
}
|
||||
|
||||
export interface DiagnosticsOptions {
|
||||
noSemanticValidation?: boolean;
|
||||
noSyntaxValidation?: boolean;
|
||||
noSuggestionDiagnostics?: boolean;
|
||||
diagnosticCodesToIgnore?: number[];
|
||||
}
|
||||
|
||||
export interface WorkerOptions {
|
||||
/** A full HTTP path to a JavaScript file which adds a function `customTSWorkerFactory` to the self inside a web-worker */
|
||||
customWorkerPath?: string;
|
||||
}
|
||||
interface IExtraLib {
|
||||
content: string;
|
||||
version: number;
|
||||
}
|
||||
|
||||
interface IExtraLibs {
|
||||
export interface IExtraLibs {
|
||||
[path: string]: IExtraLib;
|
||||
}
|
||||
|
||||
/**
|
||||
* A linked list of formatted diagnostic messages to be used as part of a multiline message.
|
||||
* It is built from the bottom up, leaving the head to be the "main" diagnostic.
|
||||
|
|
@ -6345,7 +6352,7 @@ declare namespace monaco.languages.typescript {
|
|||
code: number;
|
||||
next?: DiagnosticMessageChain[];
|
||||
}
|
||||
interface Diagnostic extends DiagnosticRelatedInformation {
|
||||
export interface Diagnostic extends DiagnosticRelatedInformation {
|
||||
/** May store more in future. For now, this will simply be `true` to indicate when a diagnostic is an unused-identifier diagnostic. */
|
||||
reportsUnnecessary?: {};
|
||||
source?: string;
|
||||
|
|
@ -6361,7 +6368,6 @@ declare namespace monaco.languages.typescript {
|
|||
length: number | undefined;
|
||||
messageText: string | DiagnosticMessageChain;
|
||||
}
|
||||
|
||||
interface EmitOutput {
|
||||
outputFiles: OutputFile[];
|
||||
emitSkipped: boolean;
|
||||
|
|
@ -6371,23 +6377,20 @@ declare namespace monaco.languages.typescript {
|
|||
writeByteOrderMark: boolean;
|
||||
text: string;
|
||||
}
|
||||
|
||||
export interface LanguageServiceDefaults {
|
||||
/**
|
||||
* Event fired when compiler options or diagnostics options are changed.
|
||||
*/
|
||||
readonly onDidChange: IEvent<void>;
|
||||
|
||||
/**
|
||||
* Event fired when extra libraries registered with the language service change.
|
||||
*/
|
||||
readonly onDidExtraLibsChange: IEvent<void>;
|
||||
|
||||
readonly workerOptions: WorkerOptions;
|
||||
/**
|
||||
* Get the current extra libs registered with the language service.
|
||||
*/
|
||||
getExtraLibs(): IExtraLibs;
|
||||
|
||||
/**
|
||||
* Add an additional source file to the language service. Use this
|
||||
* for typescript (definition) files that won't be loaded as editor
|
||||
|
|
@ -6399,285 +6402,310 @@ declare namespace monaco.languages.typescript {
|
|||
* language service upon disposal.
|
||||
*/
|
||||
addExtraLib(content: string, filePath?: string): IDisposable;
|
||||
|
||||
/**
|
||||
* Remove all existing extra libs and set the additional source
|
||||
* files to the language service. Use this for typescript definition
|
||||
* files that won't be loaded as editor documents, like `jquery.d.ts`.
|
||||
* @param libs An array of entries to register.
|
||||
*/
|
||||
setExtraLibs(libs: { content: string; filePath?: string }[]): void;
|
||||
|
||||
setExtraLibs(
|
||||
libs: {
|
||||
content: string;
|
||||
filePath?: string;
|
||||
}[]
|
||||
): void;
|
||||
/**
|
||||
* Get current TypeScript compiler options for the language service.
|
||||
*/
|
||||
getCompilerOptions(): CompilerOptions;
|
||||
|
||||
/**
|
||||
* Set TypeScript compiler options.
|
||||
*/
|
||||
setCompilerOptions(options: CompilerOptions): void;
|
||||
|
||||
/**
|
||||
* Get the current diagnostics options for the language service.
|
||||
*/
|
||||
getDiagnosticsOptions(): DiagnosticsOptions;
|
||||
|
||||
/**
|
||||
* Configure whether syntactic and/or semantic validation should
|
||||
* be performed
|
||||
*/
|
||||
setDiagnosticsOptions(options: DiagnosticsOptions): void;
|
||||
|
||||
/**
|
||||
* No-op.
|
||||
*/
|
||||
setMaximumWorkerIdleTime(value: number): void;
|
||||
|
||||
/**
|
||||
* Configure if all existing models should be eagerly sync'd
|
||||
* to the worker on start or restart.
|
||||
*/
|
||||
setEagerModelSync(value: boolean): void;
|
||||
|
||||
/**
|
||||
* Get the current setting for whether all existing models should be eagerly sync'd
|
||||
* to the worker on start or restart.
|
||||
*/
|
||||
getEagerModelSync(): boolean;
|
||||
}
|
||||
|
||||
export interface TypeScriptWorker {
|
||||
/**
|
||||
* Get diagnostic messages for any syntax issues in the given file.
|
||||
*/
|
||||
getSyntacticDiagnostics(fileName: string): Promise<Diagnostic[]>;
|
||||
|
||||
/**
|
||||
* Get diagnostic messages for any semantic issues in the given file.
|
||||
*/
|
||||
getSemanticDiagnostics(fileName: string): Promise<Diagnostic[]>;
|
||||
|
||||
/**
|
||||
* Get diagnostic messages for any suggestions related to the given file.
|
||||
*/
|
||||
getSuggestionDiagnostics(fileName: string): Promise<Diagnostic[]>;
|
||||
|
||||
/**
|
||||
* Get the content of a given file.
|
||||
*/
|
||||
getScriptText(fileName: string): Promise<string | undefined>;
|
||||
/**
|
||||
* Get diagnostic messages related to the current compiler options.
|
||||
* @param fileName Not used
|
||||
*/
|
||||
getCompilerOptionsDiagnostics(fileName: string): Promise<Diagnostic[]>;
|
||||
|
||||
/**
|
||||
* Get code completions for the given file and position.
|
||||
* @returns `Promise<typescript.CompletionInfo | undefined>`
|
||||
*/
|
||||
getCompletionsAtPosition(fileName: string, position: number): Promise<any | undefined>;
|
||||
|
||||
getCompletionsAtPosition(
|
||||
fileName: string,
|
||||
position: number
|
||||
): Promise<any | undefined>;
|
||||
/**
|
||||
* Get code completion details for the given file, position, and entry.
|
||||
* @returns `Promise<typescript.CompletionEntryDetails | undefined>`
|
||||
*/
|
||||
getCompletionEntryDetails(fileName: string, position: number, entry: string): Promise<any | undefined>;
|
||||
|
||||
getCompletionEntryDetails(
|
||||
fileName: string,
|
||||
position: number,
|
||||
entry: string
|
||||
): Promise<any | undefined>;
|
||||
/**
|
||||
* Get signature help items for the item at the given file and position.
|
||||
* @returns `Promise<typescript.SignatureHelpItems | undefined>`
|
||||
*/
|
||||
getSignatureHelpItems(fileName: string, position: number): Promise<any | undefined>;
|
||||
|
||||
getSignatureHelpItems(
|
||||
fileName: string,
|
||||
position: number
|
||||
): Promise<any | undefined>;
|
||||
/**
|
||||
* Get quick info for the item at the given position in the file.
|
||||
* @returns `Promise<typescript.QuickInfo | undefined>`
|
||||
*/
|
||||
getQuickInfoAtPosition(fileName: string, position: number): Promise<any | undefined>;
|
||||
|
||||
getQuickInfoAtPosition(
|
||||
fileName: string,
|
||||
position: number
|
||||
): Promise<any | undefined>;
|
||||
/**
|
||||
* Get other ranges which are related to the item at the given position in the file (often used for highlighting).
|
||||
* @returns `Promise<ReadonlyArray<typescript.ReferenceEntry> | undefined>`
|
||||
*/
|
||||
getOccurrencesAtPosition(fileName: string, position: number): Promise<ReadonlyArray<any> | undefined>;
|
||||
|
||||
getOccurrencesAtPosition(
|
||||
fileName: string,
|
||||
position: number
|
||||
): Promise<ReadonlyArray<any> | undefined>;
|
||||
/**
|
||||
* Get the definition of the item at the given position in the file.
|
||||
* @returns `Promise<ReadonlyArray<typescript.DefinitionInfo> | undefined>`
|
||||
*/
|
||||
getDefinitionAtPosition(fileName: string, position: number): Promise<ReadonlyArray<any> | undefined>;
|
||||
|
||||
getDefinitionAtPosition(
|
||||
fileName: string,
|
||||
position: number
|
||||
): Promise<ReadonlyArray<any> | undefined>;
|
||||
/**
|
||||
* Get references to the item at the given position in the file.
|
||||
* @returns `Promise<typescript.ReferenceEntry[] | undefined>`
|
||||
*/
|
||||
getReferencesAtPosition(fileName: string, position: number): Promise<any[] | undefined>;
|
||||
|
||||
getReferencesAtPosition(
|
||||
fileName: string,
|
||||
position: number
|
||||
): Promise<any[] | undefined>;
|
||||
/**
|
||||
* Get outline entries for the item at the given position in the file.
|
||||
* @returns `Promise<typescript.NavigationBarItem[]>`
|
||||
*/
|
||||
getNavigationBarItems(fileName: string): Promise<any[]>;
|
||||
|
||||
/**
|
||||
* Get changes which should be applied to format the given file.
|
||||
* @param options `typescript.FormatCodeOptions`
|
||||
* @returns `Promise<typescript.TextChange[]>`
|
||||
*/
|
||||
getFormattingEditsForDocument(fileName: string, options: any): Promise<any[]>;
|
||||
|
||||
getFormattingEditsForDocument(
|
||||
fileName: string,
|
||||
options: any
|
||||
): Promise<any[]>;
|
||||
/**
|
||||
* Get changes which should be applied to format the given range in the file.
|
||||
* @param options `typescript.FormatCodeOptions`
|
||||
* @returns `Promise<typescript.TextChange[]>`
|
||||
*/
|
||||
getFormattingEditsForRange(fileName: string, start: number, end: number, options: any): Promise<any[]>;
|
||||
|
||||
getFormattingEditsForRange(
|
||||
fileName: string,
|
||||
start: number,
|
||||
end: number,
|
||||
options: any
|
||||
): Promise<any[]>;
|
||||
/**
|
||||
* Get formatting changes which should be applied after the given keystroke.
|
||||
* @param options `typescript.FormatCodeOptions`
|
||||
* @returns `Promise<typescript.TextChange[]>`
|
||||
*/
|
||||
getFormattingEditsAfterKeystroke(fileName: string, postion: number, ch: string, options: any): Promise<any[]>;
|
||||
|
||||
getFormattingEditsAfterKeystroke(
|
||||
fileName: string,
|
||||
postion: number,
|
||||
ch: string,
|
||||
options: any
|
||||
): Promise<any[]>;
|
||||
/**
|
||||
* Get other occurrences which should be updated when renaming the item at the given file and position.
|
||||
* @returns `Promise<readonly typescript.RenameLocation[] | undefined>`
|
||||
*/
|
||||
findRenameLocations(fileName: string, positon: number, findInStrings: boolean, findInComments: boolean, providePrefixAndSuffixTextForRename: boolean): Promise<readonly any[] | undefined>;
|
||||
|
||||
findRenameLocations(
|
||||
fileName: string,
|
||||
positon: number,
|
||||
findInStrings: boolean,
|
||||
findInComments: boolean,
|
||||
providePrefixAndSuffixTextForRename: boolean
|
||||
): Promise<readonly any[] | undefined>;
|
||||
/**
|
||||
* Get edits which should be applied to rename the item at the given file and position (or a failure reason).
|
||||
* @param options `typescript.RenameInfoOptions`
|
||||
* @returns `Promise<typescript.RenameInfo>`
|
||||
*/
|
||||
getRenameInfo(fileName: string, positon: number, options: any): Promise<any>;
|
||||
|
||||
getRenameInfo(
|
||||
fileName: string,
|
||||
positon: number,
|
||||
options: any
|
||||
): Promise<any>;
|
||||
/**
|
||||
* Get transpiled output for the given file.
|
||||
* @returns `typescript.EmitOutput`
|
||||
*/
|
||||
getEmitOutput(fileName: string): Promise<any>;
|
||||
|
||||
getEmitOutput(fileName: string): Promise<EmitOutput>;
|
||||
/**
|
||||
* Get possible code fixes at the given position in the file.
|
||||
* @param formatOptions `typescript.FormatCodeOptions`
|
||||
* @returns `Promise<ReadonlyArray<typescript.CodeFixAction>>`
|
||||
*/
|
||||
getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: number[], formatOptions: any): Promise<ReadonlyArray<any>>;
|
||||
getCodeFixesAtPosition(
|
||||
fileName: string,
|
||||
start: number,
|
||||
end: number,
|
||||
errorCodes: number[],
|
||||
formatOptions: any
|
||||
): Promise<ReadonlyArray<any>>;
|
||||
}
|
||||
|
||||
export const typescriptVersion: string;
|
||||
|
||||
export const typescriptDefaults: LanguageServiceDefaults;
|
||||
export const javascriptDefaults: LanguageServiceDefaults;
|
||||
|
||||
export const getTypeScriptWorker: () => Promise<(...uris: Uri[]) => Promise<TypeScriptWorker>>;
|
||||
export const getJavaScriptWorker: () => Promise<(...uris: Uri[]) => Promise<TypeScriptWorker>>;
|
||||
export const getTypeScriptWorker: () => Promise<
|
||||
(...uris: Uri[]) => Promise<TypeScriptWorker>
|
||||
>;
|
||||
export const getJavaScriptWorker: () => Promise<
|
||||
(...uris: Uri[]) => Promise<TypeScriptWorker>
|
||||
>;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
declare namespace monaco.languages.css {
|
||||
export interface DiagnosticsOptions {
|
||||
readonly validate?: boolean;
|
||||
readonly lint?: {
|
||||
readonly compatibleVendorPrefixes?: 'ignore' | 'warning' | 'error',
|
||||
readonly vendorPrefix?: 'ignore' | 'warning' | 'error',
|
||||
readonly duplicateProperties?: 'ignore' | 'warning' | 'error',
|
||||
readonly emptyRules?: 'ignore' | 'warning' | 'error',
|
||||
readonly importStatement?: 'ignore' | 'warning' | 'error',
|
||||
readonly boxModel?: 'ignore' | 'warning' | 'error',
|
||||
readonly universalSelector?: 'ignore' | 'warning' | 'error',
|
||||
readonly zeroUnits?: 'ignore' | 'warning' | 'error',
|
||||
readonly fontFaceProperties?: 'ignore' | 'warning' | 'error',
|
||||
readonly hexColorLength?: 'ignore' | 'warning' | 'error',
|
||||
readonly argumentsInColorFunction?: 'ignore' | 'warning' | 'error',
|
||||
readonly unknownProperties?: 'ignore' | 'warning' | 'error',
|
||||
readonly ieHack?: 'ignore' | 'warning' | 'error',
|
||||
readonly unknownVendorSpecificProperties?: 'ignore' | 'warning' | 'error',
|
||||
readonly propertyIgnoredDueToDisplay?: 'ignore' | 'warning' | 'error',
|
||||
readonly important?: 'ignore' | 'warning' | 'error',
|
||||
readonly float?: 'ignore' | 'warning' | 'error',
|
||||
readonly idSelector?: 'ignore' | 'warning' | 'error'
|
||||
}
|
||||
readonly compatibleVendorPrefixes?: 'ignore' | 'warning' | 'error';
|
||||
readonly vendorPrefix?: 'ignore' | 'warning' | 'error';
|
||||
readonly duplicateProperties?: 'ignore' | 'warning' | 'error';
|
||||
readonly emptyRules?: 'ignore' | 'warning' | 'error';
|
||||
readonly importStatement?: 'ignore' | 'warning' | 'error';
|
||||
readonly boxModel?: 'ignore' | 'warning' | 'error';
|
||||
readonly universalSelector?: 'ignore' | 'warning' | 'error';
|
||||
readonly zeroUnits?: 'ignore' | 'warning' | 'error';
|
||||
readonly fontFaceProperties?: 'ignore' | 'warning' | 'error';
|
||||
readonly hexColorLength?: 'ignore' | 'warning' | 'error';
|
||||
readonly argumentsInColorFunction?: 'ignore' | 'warning' | 'error';
|
||||
readonly unknownProperties?: 'ignore' | 'warning' | 'error';
|
||||
readonly ieHack?: 'ignore' | 'warning' | 'error';
|
||||
readonly unknownVendorSpecificProperties?: 'ignore' | 'warning' | 'error';
|
||||
readonly propertyIgnoredDueToDisplay?: 'ignore' | 'warning' | 'error';
|
||||
readonly important?: 'ignore' | 'warning' | 'error';
|
||||
readonly float?: 'ignore' | 'warning' | 'error';
|
||||
readonly idSelector?: 'ignore' | 'warning' | 'error';
|
||||
};
|
||||
}
|
||||
|
||||
export interface ModeConfiguration {
|
||||
/**
|
||||
* Defines whether the built-in completionItemProvider is enabled.
|
||||
*/
|
||||
readonly completionItems?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in hoverProvider is enabled.
|
||||
*/
|
||||
readonly hovers?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in documentSymbolProvider is enabled.
|
||||
*/
|
||||
readonly documentSymbols?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in definitions provider is enabled.
|
||||
*/
|
||||
readonly definitions?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in references provider is enabled.
|
||||
*/
|
||||
readonly references?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in references provider is enabled.
|
||||
*/
|
||||
readonly documentHighlights?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in rename provider is enabled.
|
||||
*/
|
||||
readonly rename?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in color provider is enabled.
|
||||
*/
|
||||
readonly colors?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in foldingRange provider is enabled.
|
||||
*/
|
||||
readonly foldingRanges?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in diagnostic provider is enabled.
|
||||
*/
|
||||
readonly diagnostics?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in selection range provider is enabled.
|
||||
*/
|
||||
readonly selectionRanges?: boolean;
|
||||
|
||||
}
|
||||
|
||||
export interface LanguageServiceDefaults {
|
||||
readonly languageId: string;
|
||||
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
||||
readonly diagnosticsOptions: DiagnosticsOptions;
|
||||
readonly modeConfiguration: ModeConfiguration;
|
||||
setDiagnosticsOptions(options: DiagnosticsOptions): void;
|
||||
setModeConfiguration(modeConfiguration: ModeConfiguration): void;
|
||||
}
|
||||
|
||||
export var cssDefaults: LanguageServiceDefaults;
|
||||
export var lessDefaults: LanguageServiceDefaults;
|
||||
export var scssDefaults: LanguageServiceDefaults;
|
||||
export const cssDefaults: LanguageServiceDefaults;
|
||||
export const scssDefaults: LanguageServiceDefaults;
|
||||
export const lessDefaults: LanguageServiceDefaults;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
declare namespace monaco.languages.json {
|
||||
export interface DiagnosticsOptions {
|
||||
/**
|
||||
|
|
@ -6768,6 +6796,7 @@ declare namespace monaco.languages.json {
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
declare namespace monaco.languages.html {
|
||||
export interface HTMLFormatConfiguration {
|
||||
readonly tabSize: number;
|
||||
|
|
@ -6781,13 +6810,15 @@ declare namespace monaco.languages.html {
|
|||
readonly indentHandlebars: boolean;
|
||||
readonly endWithNewline: boolean;
|
||||
readonly extraLiners: string;
|
||||
readonly wrapAttributes: 'auto' | 'force' | 'force-aligned' | 'force-expand-multiline';
|
||||
readonly wrapAttributes:
|
||||
| 'auto'
|
||||
| 'force'
|
||||
| 'force-aligned'
|
||||
| 'force-expand-multiline';
|
||||
}
|
||||
|
||||
export interface CompletionConfiguration {
|
||||
[provider: string]: boolean;
|
||||
}
|
||||
|
||||
export interface Options {
|
||||
/**
|
||||
* If set, comments are tolerated. If set to false, syntax errors will be emitted for comments.
|
||||
|
|
@ -6798,77 +6829,64 @@ declare namespace monaco.languages.html {
|
|||
*/
|
||||
readonly suggest?: CompletionConfiguration;
|
||||
}
|
||||
|
||||
export interface ModeConfiguration {
|
||||
/**
|
||||
* Defines whether the built-in completionItemProvider is enabled.
|
||||
*/
|
||||
readonly completionItems?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in hoverProvider is enabled.
|
||||
*/
|
||||
readonly hovers?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in documentSymbolProvider is enabled.
|
||||
*/
|
||||
readonly documentSymbols?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in definitions provider is enabled.
|
||||
*/
|
||||
readonly links?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in references provider is enabled.
|
||||
*/
|
||||
readonly documentHighlights?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in rename provider is enabled.
|
||||
*/
|
||||
readonly rename?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in color provider is enabled.
|
||||
*/
|
||||
readonly colors?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in foldingRange provider is enabled.
|
||||
*/
|
||||
readonly foldingRanges?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in diagnostic provider is enabled.
|
||||
*/
|
||||
readonly diagnostics?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in selection range provider is enabled.
|
||||
*/
|
||||
readonly selectionRanges?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in documentFormattingEdit provider is enabled.
|
||||
*/
|
||||
readonly documentFormattingEdits?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in documentRangeFormattingEdit provider is enabled.
|
||||
*/
|
||||
readonly documentRangeFormattingEdits?: boolean;
|
||||
|
||||
}
|
||||
|
||||
export interface LanguageServiceDefaults {
|
||||
readonly languageId: string;
|
||||
readonly modeConfiguration: ModeConfiguration;
|
||||
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
||||
readonly options: Options;
|
||||
setOptions(options: Options): void;
|
||||
}
|
||||
|
||||
export var htmlDefaults: LanguageServiceDefaults;
|
||||
export var handlebarDefaults: LanguageServiceDefaults;
|
||||
export var razorDefaults: LanguageServiceDefaults;
|
||||
}
|
||||
export const htmlDefaults: LanguageServiceDefaults;
|
||||
export const handlebarDefaults: LanguageServiceDefaults;
|
||||
export const razorDefaults: LanguageServiceDefaults;
|
||||
}
|
||||
|
|
|
|||
30
package-lock.json
generated
30
package-lock.json
generated
|
|
@ -4298,9 +4298,9 @@
|
|||
}
|
||||
},
|
||||
"monaco-css": {
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/monaco-css/-/monaco-css-2.7.0.tgz",
|
||||
"integrity": "sha512-gxijecAzpTvA81R/pQWRcb2pTgAjeXYU8px9WWnihwJG5QMgSiRXLEocIXRKdVzGoBRTE463BNcRZ1Jsl05azQ==",
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/monaco-css/-/monaco-css-3.0.0.tgz",
|
||||
"integrity": "sha512-BTHbQh2a6HOHpcwK6Zg4i7+CR6C53LSyaC3XUdzcr4W8rsOom6kyIcbOgehFYSnB0Nf+kg0etZu7CEpIx3Kcqw==",
|
||||
"dev": true
|
||||
},
|
||||
"monaco-editor-core": {
|
||||
|
|
@ -4310,27 +4310,27 @@
|
|||
"dev": true
|
||||
},
|
||||
"monaco-html": {
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/monaco-html/-/monaco-html-2.7.0.tgz",
|
||||
"integrity": "sha512-gn/1zgQwl0BVmoMimw4FdU4B4w+gpw2H87EFIDdPmluYGa/PiLetqCxICkMerfR/BjLsAvWWb7Ih/J7nlPqwAQ==",
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/monaco-html/-/monaco-html-3.0.0.tgz",
|
||||
"integrity": "sha512-WFXVnebb14LIfRGUfcowRUvuMLIrZPWZ2DkbmcALeyWzB8HsGjKWMIkF0JoJj6BqCd6gYkE/Zi9M4mSoNqCDBA==",
|
||||
"dev": true
|
||||
},
|
||||
"monaco-json": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/monaco-json/-/monaco-json-3.0.1.tgz",
|
||||
"integrity": "sha512-vus+jwDci/X/9VEgDoTmSx0yTRRFQX5rf4gIGqILLLJZS++Dt6VRz3jHtvo0+Pk7uanRouDI6Nanf7w3ABUDLg==",
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/monaco-json/-/monaco-json-3.0.2.tgz",
|
||||
"integrity": "sha512-A6y8kDUE0S09jSU3uax8hw1m7uL/Orpd7fSMLeVWR8pouhhmUArkcV47ecI9nft4CKLPFegPEED7UHoCDj1yuw==",
|
||||
"dev": true
|
||||
},
|
||||
"monaco-languages": {
|
||||
"version": "1.10.0",
|
||||
"resolved": "https://registry.npmjs.org/monaco-languages/-/monaco-languages-1.10.0.tgz",
|
||||
"integrity": "sha512-ARAws17Xh0K4WsZYkJY6CqHn9EYdYN8CjzK6w/jgXIwU0owzCdUWxzu+FNJ/LeDLcKxL/YK3phcwGFj9IqX2yw==",
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/monaco-languages/-/monaco-languages-2.0.0.tgz",
|
||||
"integrity": "sha512-HAnsEriYHtOYfxokGtguc5NfJN+PNmrtelZg8CwM859M2W5iFBqOnNGhOQPF35YHAUrj/JUKs45+/m9prlyiDw==",
|
||||
"dev": true
|
||||
},
|
||||
"monaco-typescript": {
|
||||
"version": "3.7.0",
|
||||
"resolved": "https://registry.npmjs.org/monaco-typescript/-/monaco-typescript-3.7.0.tgz",
|
||||
"integrity": "sha512-xo+nHP7AOdFvHtMqg7hZquQziBuHsaG7hXGXiUuOHj9unJmIyi1uhGuvuQqIJWv+jHd19xGNWTF+KOdaXhksIw==",
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/monaco-typescript/-/monaco-typescript-4.0.1.tgz",
|
||||
"integrity": "sha512-FyVku1FEerPnHj1GYX3nzIhde3o2irRHg0mx5y0rGTjHZJlhpAlXcV4Bc+ufKqOGYZYtRQYtlR0sYwGs547KtA==",
|
||||
"dev": true
|
||||
},
|
||||
"move-concurrently": {
|
||||
|
|
|
|||
10
package.json
10
package.json
|
|
@ -32,12 +32,12 @@
|
|||
"gulp": "^4.0.2",
|
||||
"gulp-typedoc": "^2.2.5",
|
||||
"mocha": "^8.1.3",
|
||||
"monaco-css": "2.7.0",
|
||||
"monaco-css": "3.0.0",
|
||||
"monaco-editor-core": "0.20.0",
|
||||
"monaco-html": "2.7.0",
|
||||
"monaco-json": "3.0.1",
|
||||
"monaco-languages": "1.10.0",
|
||||
"monaco-typescript": "3.7.0",
|
||||
"monaco-html": "3.0.0",
|
||||
"monaco-json": "3.0.2",
|
||||
"monaco-languages": "2.0.0",
|
||||
"monaco-typescript": "4.0.1",
|
||||
"playwright": "1.3.0",
|
||||
"rimraf": "^3.0.2",
|
||||
"style-loader": "^1.2.1",
|
||||
|
|
|
|||
|
|
@ -6186,10 +6186,14 @@ declare namespace monaco.worker {
|
|||
|
||||
//dtsv=3
|
||||
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
declare namespace monaco.languages.typescript {
|
||||
|
||||
enum ModuleKind {
|
||||
export enum ModuleKind {
|
||||
None = 0,
|
||||
CommonJS = 1,
|
||||
AMD = 2,
|
||||
|
|
@ -6198,19 +6202,17 @@ declare namespace monaco.languages.typescript {
|
|||
ES2015 = 5,
|
||||
ESNext = 99
|
||||
}
|
||||
|
||||
enum JsxEmit {
|
||||
export enum JsxEmit {
|
||||
None = 0,
|
||||
Preserve = 1,
|
||||
React = 2,
|
||||
ReactNative = 3
|
||||
}
|
||||
enum NewLineKind {
|
||||
export enum NewLineKind {
|
||||
CarriageReturnLineFeed = 0,
|
||||
LineFeed = 1
|
||||
}
|
||||
|
||||
enum ScriptTarget {
|
||||
export enum ScriptTarget {
|
||||
ES3 = 0,
|
||||
ES5 = 1,
|
||||
ES2015 = 2,
|
||||
|
|
@ -6221,19 +6223,24 @@ declare namespace monaco.languages.typescript {
|
|||
ES2020 = 7,
|
||||
ESNext = 99,
|
||||
JSON = 100,
|
||||
Latest = ESNext,
|
||||
Latest = 99
|
||||
}
|
||||
|
||||
export enum ModuleResolutionKind {
|
||||
Classic = 1,
|
||||
NodeJs = 2
|
||||
}
|
||||
|
||||
interface MapLike<T> {
|
||||
[index: string]: T;
|
||||
}
|
||||
|
||||
type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike<string[]> | null | undefined;
|
||||
declare type CompilerOptionsValue =
|
||||
| string
|
||||
| number
|
||||
| boolean
|
||||
| (string | number)[]
|
||||
| string[]
|
||||
| MapLike<string[]>
|
||||
| null
|
||||
| undefined;
|
||||
interface CompilerOptions {
|
||||
allowJs?: boolean;
|
||||
allowSyntheticDefaultImports?: boolean;
|
||||
|
|
@ -6317,23 +6324,23 @@ declare namespace monaco.languages.typescript {
|
|||
useDefineForClassFields?: boolean;
|
||||
[option: string]: CompilerOptionsValue | undefined;
|
||||
}
|
||||
|
||||
export interface DiagnosticsOptions {
|
||||
noSemanticValidation?: boolean;
|
||||
noSyntaxValidation?: boolean;
|
||||
noSuggestionDiagnostics?: boolean;
|
||||
diagnosticCodesToIgnore?: number[];
|
||||
}
|
||||
|
||||
export interface WorkerOptions {
|
||||
/** A full HTTP path to a JavaScript file which adds a function `customTSWorkerFactory` to the self inside a web-worker */
|
||||
customWorkerPath?: string;
|
||||
}
|
||||
interface IExtraLib {
|
||||
content: string;
|
||||
version: number;
|
||||
}
|
||||
|
||||
interface IExtraLibs {
|
||||
export interface IExtraLibs {
|
||||
[path: string]: IExtraLib;
|
||||
}
|
||||
|
||||
/**
|
||||
* A linked list of formatted diagnostic messages to be used as part of a multiline message.
|
||||
* It is built from the bottom up, leaving the head to be the "main" diagnostic.
|
||||
|
|
@ -6345,7 +6352,7 @@ declare namespace monaco.languages.typescript {
|
|||
code: number;
|
||||
next?: DiagnosticMessageChain[];
|
||||
}
|
||||
interface Diagnostic extends DiagnosticRelatedInformation {
|
||||
export interface Diagnostic extends DiagnosticRelatedInformation {
|
||||
/** May store more in future. For now, this will simply be `true` to indicate when a diagnostic is an unused-identifier diagnostic. */
|
||||
reportsUnnecessary?: {};
|
||||
source?: string;
|
||||
|
|
@ -6361,7 +6368,6 @@ declare namespace monaco.languages.typescript {
|
|||
length: number | undefined;
|
||||
messageText: string | DiagnosticMessageChain;
|
||||
}
|
||||
|
||||
interface EmitOutput {
|
||||
outputFiles: OutputFile[];
|
||||
emitSkipped: boolean;
|
||||
|
|
@ -6371,23 +6377,20 @@ declare namespace monaco.languages.typescript {
|
|||
writeByteOrderMark: boolean;
|
||||
text: string;
|
||||
}
|
||||
|
||||
export interface LanguageServiceDefaults {
|
||||
/**
|
||||
* Event fired when compiler options or diagnostics options are changed.
|
||||
*/
|
||||
readonly onDidChange: IEvent<void>;
|
||||
|
||||
/**
|
||||
* Event fired when extra libraries registered with the language service change.
|
||||
*/
|
||||
readonly onDidExtraLibsChange: IEvent<void>;
|
||||
|
||||
readonly workerOptions: WorkerOptions;
|
||||
/**
|
||||
* Get the current extra libs registered with the language service.
|
||||
*/
|
||||
getExtraLibs(): IExtraLibs;
|
||||
|
||||
/**
|
||||
* Add an additional source file to the language service. Use this
|
||||
* for typescript (definition) files that won't be loaded as editor
|
||||
|
|
@ -6399,285 +6402,310 @@ declare namespace monaco.languages.typescript {
|
|||
* language service upon disposal.
|
||||
*/
|
||||
addExtraLib(content: string, filePath?: string): IDisposable;
|
||||
|
||||
/**
|
||||
* Remove all existing extra libs and set the additional source
|
||||
* files to the language service. Use this for typescript definition
|
||||
* files that won't be loaded as editor documents, like `jquery.d.ts`.
|
||||
* @param libs An array of entries to register.
|
||||
*/
|
||||
setExtraLibs(libs: { content: string; filePath?: string }[]): void;
|
||||
|
||||
setExtraLibs(
|
||||
libs: {
|
||||
content: string;
|
||||
filePath?: string;
|
||||
}[]
|
||||
): void;
|
||||
/**
|
||||
* Get current TypeScript compiler options for the language service.
|
||||
*/
|
||||
getCompilerOptions(): CompilerOptions;
|
||||
|
||||
/**
|
||||
* Set TypeScript compiler options.
|
||||
*/
|
||||
setCompilerOptions(options: CompilerOptions): void;
|
||||
|
||||
/**
|
||||
* Get the current diagnostics options for the language service.
|
||||
*/
|
||||
getDiagnosticsOptions(): DiagnosticsOptions;
|
||||
|
||||
/**
|
||||
* Configure whether syntactic and/or semantic validation should
|
||||
* be performed
|
||||
*/
|
||||
setDiagnosticsOptions(options: DiagnosticsOptions): void;
|
||||
|
||||
/**
|
||||
* No-op.
|
||||
*/
|
||||
setMaximumWorkerIdleTime(value: number): void;
|
||||
|
||||
/**
|
||||
* Configure if all existing models should be eagerly sync'd
|
||||
* to the worker on start or restart.
|
||||
*/
|
||||
setEagerModelSync(value: boolean): void;
|
||||
|
||||
/**
|
||||
* Get the current setting for whether all existing models should be eagerly sync'd
|
||||
* to the worker on start or restart.
|
||||
*/
|
||||
getEagerModelSync(): boolean;
|
||||
}
|
||||
|
||||
export interface TypeScriptWorker {
|
||||
/**
|
||||
* Get diagnostic messages for any syntax issues in the given file.
|
||||
*/
|
||||
getSyntacticDiagnostics(fileName: string): Promise<Diagnostic[]>;
|
||||
|
||||
/**
|
||||
* Get diagnostic messages for any semantic issues in the given file.
|
||||
*/
|
||||
getSemanticDiagnostics(fileName: string): Promise<Diagnostic[]>;
|
||||
|
||||
/**
|
||||
* Get diagnostic messages for any suggestions related to the given file.
|
||||
*/
|
||||
getSuggestionDiagnostics(fileName: string): Promise<Diagnostic[]>;
|
||||
|
||||
/**
|
||||
* Get the content of a given file.
|
||||
*/
|
||||
getScriptText(fileName: string): Promise<string | undefined>;
|
||||
/**
|
||||
* Get diagnostic messages related to the current compiler options.
|
||||
* @param fileName Not used
|
||||
*/
|
||||
getCompilerOptionsDiagnostics(fileName: string): Promise<Diagnostic[]>;
|
||||
|
||||
/**
|
||||
* Get code completions for the given file and position.
|
||||
* @returns `Promise<typescript.CompletionInfo | undefined>`
|
||||
*/
|
||||
getCompletionsAtPosition(fileName: string, position: number): Promise<any | undefined>;
|
||||
|
||||
getCompletionsAtPosition(
|
||||
fileName: string,
|
||||
position: number
|
||||
): Promise<any | undefined>;
|
||||
/**
|
||||
* Get code completion details for the given file, position, and entry.
|
||||
* @returns `Promise<typescript.CompletionEntryDetails | undefined>`
|
||||
*/
|
||||
getCompletionEntryDetails(fileName: string, position: number, entry: string): Promise<any | undefined>;
|
||||
|
||||
getCompletionEntryDetails(
|
||||
fileName: string,
|
||||
position: number,
|
||||
entry: string
|
||||
): Promise<any | undefined>;
|
||||
/**
|
||||
* Get signature help items for the item at the given file and position.
|
||||
* @returns `Promise<typescript.SignatureHelpItems | undefined>`
|
||||
*/
|
||||
getSignatureHelpItems(fileName: string, position: number): Promise<any | undefined>;
|
||||
|
||||
getSignatureHelpItems(
|
||||
fileName: string,
|
||||
position: number
|
||||
): Promise<any | undefined>;
|
||||
/**
|
||||
* Get quick info for the item at the given position in the file.
|
||||
* @returns `Promise<typescript.QuickInfo | undefined>`
|
||||
*/
|
||||
getQuickInfoAtPosition(fileName: string, position: number): Promise<any | undefined>;
|
||||
|
||||
getQuickInfoAtPosition(
|
||||
fileName: string,
|
||||
position: number
|
||||
): Promise<any | undefined>;
|
||||
/**
|
||||
* Get other ranges which are related to the item at the given position in the file (often used for highlighting).
|
||||
* @returns `Promise<ReadonlyArray<typescript.ReferenceEntry> | undefined>`
|
||||
*/
|
||||
getOccurrencesAtPosition(fileName: string, position: number): Promise<ReadonlyArray<any> | undefined>;
|
||||
|
||||
getOccurrencesAtPosition(
|
||||
fileName: string,
|
||||
position: number
|
||||
): Promise<ReadonlyArray<any> | undefined>;
|
||||
/**
|
||||
* Get the definition of the item at the given position in the file.
|
||||
* @returns `Promise<ReadonlyArray<typescript.DefinitionInfo> | undefined>`
|
||||
*/
|
||||
getDefinitionAtPosition(fileName: string, position: number): Promise<ReadonlyArray<any> | undefined>;
|
||||
|
||||
getDefinitionAtPosition(
|
||||
fileName: string,
|
||||
position: number
|
||||
): Promise<ReadonlyArray<any> | undefined>;
|
||||
/**
|
||||
* Get references to the item at the given position in the file.
|
||||
* @returns `Promise<typescript.ReferenceEntry[] | undefined>`
|
||||
*/
|
||||
getReferencesAtPosition(fileName: string, position: number): Promise<any[] | undefined>;
|
||||
|
||||
getReferencesAtPosition(
|
||||
fileName: string,
|
||||
position: number
|
||||
): Promise<any[] | undefined>;
|
||||
/**
|
||||
* Get outline entries for the item at the given position in the file.
|
||||
* @returns `Promise<typescript.NavigationBarItem[]>`
|
||||
*/
|
||||
getNavigationBarItems(fileName: string): Promise<any[]>;
|
||||
|
||||
/**
|
||||
* Get changes which should be applied to format the given file.
|
||||
* @param options `typescript.FormatCodeOptions`
|
||||
* @returns `Promise<typescript.TextChange[]>`
|
||||
*/
|
||||
getFormattingEditsForDocument(fileName: string, options: any): Promise<any[]>;
|
||||
|
||||
getFormattingEditsForDocument(
|
||||
fileName: string,
|
||||
options: any
|
||||
): Promise<any[]>;
|
||||
/**
|
||||
* Get changes which should be applied to format the given range in the file.
|
||||
* @param options `typescript.FormatCodeOptions`
|
||||
* @returns `Promise<typescript.TextChange[]>`
|
||||
*/
|
||||
getFormattingEditsForRange(fileName: string, start: number, end: number, options: any): Promise<any[]>;
|
||||
|
||||
getFormattingEditsForRange(
|
||||
fileName: string,
|
||||
start: number,
|
||||
end: number,
|
||||
options: any
|
||||
): Promise<any[]>;
|
||||
/**
|
||||
* Get formatting changes which should be applied after the given keystroke.
|
||||
* @param options `typescript.FormatCodeOptions`
|
||||
* @returns `Promise<typescript.TextChange[]>`
|
||||
*/
|
||||
getFormattingEditsAfterKeystroke(fileName: string, postion: number, ch: string, options: any): Promise<any[]>;
|
||||
|
||||
getFormattingEditsAfterKeystroke(
|
||||
fileName: string,
|
||||
postion: number,
|
||||
ch: string,
|
||||
options: any
|
||||
): Promise<any[]>;
|
||||
/**
|
||||
* Get other occurrences which should be updated when renaming the item at the given file and position.
|
||||
* @returns `Promise<readonly typescript.RenameLocation[] | undefined>`
|
||||
*/
|
||||
findRenameLocations(fileName: string, positon: number, findInStrings: boolean, findInComments: boolean, providePrefixAndSuffixTextForRename: boolean): Promise<readonly any[] | undefined>;
|
||||
|
||||
findRenameLocations(
|
||||
fileName: string,
|
||||
positon: number,
|
||||
findInStrings: boolean,
|
||||
findInComments: boolean,
|
||||
providePrefixAndSuffixTextForRename: boolean
|
||||
): Promise<readonly any[] | undefined>;
|
||||
/**
|
||||
* Get edits which should be applied to rename the item at the given file and position (or a failure reason).
|
||||
* @param options `typescript.RenameInfoOptions`
|
||||
* @returns `Promise<typescript.RenameInfo>`
|
||||
*/
|
||||
getRenameInfo(fileName: string, positon: number, options: any): Promise<any>;
|
||||
|
||||
getRenameInfo(
|
||||
fileName: string,
|
||||
positon: number,
|
||||
options: any
|
||||
): Promise<any>;
|
||||
/**
|
||||
* Get transpiled output for the given file.
|
||||
* @returns `typescript.EmitOutput`
|
||||
*/
|
||||
getEmitOutput(fileName: string): Promise<any>;
|
||||
|
||||
getEmitOutput(fileName: string): Promise<EmitOutput>;
|
||||
/**
|
||||
* Get possible code fixes at the given position in the file.
|
||||
* @param formatOptions `typescript.FormatCodeOptions`
|
||||
* @returns `Promise<ReadonlyArray<typescript.CodeFixAction>>`
|
||||
*/
|
||||
getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: number[], formatOptions: any): Promise<ReadonlyArray<any>>;
|
||||
getCodeFixesAtPosition(
|
||||
fileName: string,
|
||||
start: number,
|
||||
end: number,
|
||||
errorCodes: number[],
|
||||
formatOptions: any
|
||||
): Promise<ReadonlyArray<any>>;
|
||||
}
|
||||
|
||||
export const typescriptVersion: string;
|
||||
|
||||
export const typescriptDefaults: LanguageServiceDefaults;
|
||||
export const javascriptDefaults: LanguageServiceDefaults;
|
||||
|
||||
export const getTypeScriptWorker: () => Promise<(...uris: Uri[]) => Promise<TypeScriptWorker>>;
|
||||
export const getJavaScriptWorker: () => Promise<(...uris: Uri[]) => Promise<TypeScriptWorker>>;
|
||||
export const getTypeScriptWorker: () => Promise<
|
||||
(...uris: Uri[]) => Promise<TypeScriptWorker>
|
||||
>;
|
||||
export const getJavaScriptWorker: () => Promise<
|
||||
(...uris: Uri[]) => Promise<TypeScriptWorker>
|
||||
>;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
declare namespace monaco.languages.css {
|
||||
export interface DiagnosticsOptions {
|
||||
readonly validate?: boolean;
|
||||
readonly lint?: {
|
||||
readonly compatibleVendorPrefixes?: 'ignore' | 'warning' | 'error',
|
||||
readonly vendorPrefix?: 'ignore' | 'warning' | 'error',
|
||||
readonly duplicateProperties?: 'ignore' | 'warning' | 'error',
|
||||
readonly emptyRules?: 'ignore' | 'warning' | 'error',
|
||||
readonly importStatement?: 'ignore' | 'warning' | 'error',
|
||||
readonly boxModel?: 'ignore' | 'warning' | 'error',
|
||||
readonly universalSelector?: 'ignore' | 'warning' | 'error',
|
||||
readonly zeroUnits?: 'ignore' | 'warning' | 'error',
|
||||
readonly fontFaceProperties?: 'ignore' | 'warning' | 'error',
|
||||
readonly hexColorLength?: 'ignore' | 'warning' | 'error',
|
||||
readonly argumentsInColorFunction?: 'ignore' | 'warning' | 'error',
|
||||
readonly unknownProperties?: 'ignore' | 'warning' | 'error',
|
||||
readonly ieHack?: 'ignore' | 'warning' | 'error',
|
||||
readonly unknownVendorSpecificProperties?: 'ignore' | 'warning' | 'error',
|
||||
readonly propertyIgnoredDueToDisplay?: 'ignore' | 'warning' | 'error',
|
||||
readonly important?: 'ignore' | 'warning' | 'error',
|
||||
readonly float?: 'ignore' | 'warning' | 'error',
|
||||
readonly idSelector?: 'ignore' | 'warning' | 'error'
|
||||
}
|
||||
readonly compatibleVendorPrefixes?: 'ignore' | 'warning' | 'error';
|
||||
readonly vendorPrefix?: 'ignore' | 'warning' | 'error';
|
||||
readonly duplicateProperties?: 'ignore' | 'warning' | 'error';
|
||||
readonly emptyRules?: 'ignore' | 'warning' | 'error';
|
||||
readonly importStatement?: 'ignore' | 'warning' | 'error';
|
||||
readonly boxModel?: 'ignore' | 'warning' | 'error';
|
||||
readonly universalSelector?: 'ignore' | 'warning' | 'error';
|
||||
readonly zeroUnits?: 'ignore' | 'warning' | 'error';
|
||||
readonly fontFaceProperties?: 'ignore' | 'warning' | 'error';
|
||||
readonly hexColorLength?: 'ignore' | 'warning' | 'error';
|
||||
readonly argumentsInColorFunction?: 'ignore' | 'warning' | 'error';
|
||||
readonly unknownProperties?: 'ignore' | 'warning' | 'error';
|
||||
readonly ieHack?: 'ignore' | 'warning' | 'error';
|
||||
readonly unknownVendorSpecificProperties?: 'ignore' | 'warning' | 'error';
|
||||
readonly propertyIgnoredDueToDisplay?: 'ignore' | 'warning' | 'error';
|
||||
readonly important?: 'ignore' | 'warning' | 'error';
|
||||
readonly float?: 'ignore' | 'warning' | 'error';
|
||||
readonly idSelector?: 'ignore' | 'warning' | 'error';
|
||||
};
|
||||
}
|
||||
|
||||
export interface ModeConfiguration {
|
||||
/**
|
||||
* Defines whether the built-in completionItemProvider is enabled.
|
||||
*/
|
||||
readonly completionItems?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in hoverProvider is enabled.
|
||||
*/
|
||||
readonly hovers?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in documentSymbolProvider is enabled.
|
||||
*/
|
||||
readonly documentSymbols?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in definitions provider is enabled.
|
||||
*/
|
||||
readonly definitions?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in references provider is enabled.
|
||||
*/
|
||||
readonly references?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in references provider is enabled.
|
||||
*/
|
||||
readonly documentHighlights?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in rename provider is enabled.
|
||||
*/
|
||||
readonly rename?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in color provider is enabled.
|
||||
*/
|
||||
readonly colors?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in foldingRange provider is enabled.
|
||||
*/
|
||||
readonly foldingRanges?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in diagnostic provider is enabled.
|
||||
*/
|
||||
readonly diagnostics?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in selection range provider is enabled.
|
||||
*/
|
||||
readonly selectionRanges?: boolean;
|
||||
|
||||
}
|
||||
|
||||
export interface LanguageServiceDefaults {
|
||||
readonly languageId: string;
|
||||
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
||||
readonly diagnosticsOptions: DiagnosticsOptions;
|
||||
readonly modeConfiguration: ModeConfiguration;
|
||||
setDiagnosticsOptions(options: DiagnosticsOptions): void;
|
||||
setModeConfiguration(modeConfiguration: ModeConfiguration): void;
|
||||
}
|
||||
|
||||
export var cssDefaults: LanguageServiceDefaults;
|
||||
export var lessDefaults: LanguageServiceDefaults;
|
||||
export var scssDefaults: LanguageServiceDefaults;
|
||||
export const cssDefaults: LanguageServiceDefaults;
|
||||
export const scssDefaults: LanguageServiceDefaults;
|
||||
export const lessDefaults: LanguageServiceDefaults;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
declare namespace monaco.languages.json {
|
||||
export interface DiagnosticsOptions {
|
||||
/**
|
||||
|
|
@ -6768,6 +6796,7 @@ declare namespace monaco.languages.json {
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
declare namespace monaco.languages.html {
|
||||
export interface HTMLFormatConfiguration {
|
||||
readonly tabSize: number;
|
||||
|
|
@ -6781,13 +6810,15 @@ declare namespace monaco.languages.html {
|
|||
readonly indentHandlebars: boolean;
|
||||
readonly endWithNewline: boolean;
|
||||
readonly extraLiners: string;
|
||||
readonly wrapAttributes: 'auto' | 'force' | 'force-aligned' | 'force-expand-multiline';
|
||||
readonly wrapAttributes:
|
||||
| 'auto'
|
||||
| 'force'
|
||||
| 'force-aligned'
|
||||
| 'force-expand-multiline';
|
||||
}
|
||||
|
||||
export interface CompletionConfiguration {
|
||||
[provider: string]: boolean;
|
||||
}
|
||||
|
||||
export interface Options {
|
||||
/**
|
||||
* If set, comments are tolerated. If set to false, syntax errors will be emitted for comments.
|
||||
|
|
@ -6798,77 +6829,64 @@ declare namespace monaco.languages.html {
|
|||
*/
|
||||
readonly suggest?: CompletionConfiguration;
|
||||
}
|
||||
|
||||
export interface ModeConfiguration {
|
||||
/**
|
||||
* Defines whether the built-in completionItemProvider is enabled.
|
||||
*/
|
||||
readonly completionItems?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in hoverProvider is enabled.
|
||||
*/
|
||||
readonly hovers?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in documentSymbolProvider is enabled.
|
||||
*/
|
||||
readonly documentSymbols?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in definitions provider is enabled.
|
||||
*/
|
||||
readonly links?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in references provider is enabled.
|
||||
*/
|
||||
readonly documentHighlights?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in rename provider is enabled.
|
||||
*/
|
||||
readonly rename?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in color provider is enabled.
|
||||
*/
|
||||
readonly colors?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in foldingRange provider is enabled.
|
||||
*/
|
||||
readonly foldingRanges?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in diagnostic provider is enabled.
|
||||
*/
|
||||
readonly diagnostics?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in selection range provider is enabled.
|
||||
*/
|
||||
readonly selectionRanges?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in documentFormattingEdit provider is enabled.
|
||||
*/
|
||||
readonly documentFormattingEdits?: boolean;
|
||||
|
||||
/**
|
||||
* Defines whether the built-in documentRangeFormattingEdit provider is enabled.
|
||||
*/
|
||||
readonly documentRangeFormattingEdits?: boolean;
|
||||
|
||||
}
|
||||
|
||||
export interface LanguageServiceDefaults {
|
||||
readonly languageId: string;
|
||||
readonly modeConfiguration: ModeConfiguration;
|
||||
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
||||
readonly options: Options;
|
||||
setOptions(options: Options): void;
|
||||
}
|
||||
|
||||
export var htmlDefaults: LanguageServiceDefaults;
|
||||
export var handlebarDefaults: LanguageServiceDefaults;
|
||||
export var razorDefaults: LanguageServiceDefaults;
|
||||
}
|
||||
export const htmlDefaults: LanguageServiceDefaults;
|
||||
export const handlebarDefaults: LanguageServiceDefaults;
|
||||
export const razorDefaults: LanguageServiceDefaults;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue