update monaco.d.ts

This commit is contained in:
Martin Aeschlimann 2021-05-12 18:31:35 +02:00
parent b80471a6bf
commit ae9e867dc6
No known key found for this signature in database
GPG key ID: 2609A01E695523E3

17
monaco.d.ts vendored
View file

@ -8,11 +8,13 @@
declare namespace monaco.languages.json { declare namespace monaco.languages.json {
export interface DiagnosticsOptions { export interface DiagnosticsOptions {
/** /**
* If set, the validator will be enabled and perform syntax validation as well as schema based validation. * If set, the validator will be enabled and perform syntax and validation schema based validation,
* unless `DiagnosticsOptions.schemaValidation` is set to `ignore`.
*/ */
readonly validate?: boolean; readonly validate?: boolean;
/** /**
* If set, comments are tolerated. If set to false, syntax errors will be emitted for comments. * If set, comments are tolerated. If set to false, syntax errors will be emitted for comments.
* `DiagnosticsOptions.allowComments` will override this setting.
*/ */
readonly allowComments?: boolean; readonly allowComments?: boolean;
/** /**
@ -24,7 +26,10 @@ declare namespace monaco.languages.json {
*/ */
readonly uri: string; readonly uri: string;
/** /**
* A list of file names that are associated to the schema. The '*' wildcard can be used. For example '*.schema.json', 'package.json' * A list of glob patterns that describe for which file URIs the JSON schema will be used.
* '*' and '**' wildcards are supported. Exclusion patterns start with '!'.
* For example '*.schema.json', 'package.json', '!foo*.schema.json', 'foo/**\/BADRESP.json'.
* A match succeeds when there is at least one pattern matching and last matching pattern does not start with '!'.
*/ */
readonly fileMatch?: string[]; readonly fileMatch?: string[];
/** /**
@ -44,6 +49,14 @@ declare namespace monaco.languages.json {
* The severity of problems that occurred when resolving and loading schemas. If set to 'ignore', schema resolving problems are not reported. If not set, 'warning' is used. * The severity of problems that occurred when resolving and loading schemas. If set to 'ignore', schema resolving problems are not reported. If not set, 'warning' is used.
*/ */
readonly schemaRequest?: SeverityLevel; readonly schemaRequest?: SeverityLevel;
/**
* The severity of reported trailing commas. If not set, trailing commas will be reported as errors.
*/
readonly trailingCommas?: SeverityLevel;
/**
* The severity of reported comments. If not set, 'DiagnosticsOptions.allowComments' defines whether comments are ignored or reported as errors.
*/
readonly comments?: SeverityLevel;
} }
export type SeverityLevel = 'error' | 'warning' | 'ignore'; export type SeverityLevel = 'error' | 'warning' | 'ignore';
export interface ModeConfiguration { export interface ModeConfiguration {