mirror of
https://github.com/danbulant/monaco-yaml
synced 2026-07-05 19:10:58 +00:00
Fix types for languages.yaml namespaces
`monaco-editor` no longer uses a global `monaco` namespace.
This commit is contained in:
parent
36e4f908e7
commit
e784f842c3
1 changed files with 46 additions and 43 deletions
89
src/monaco.d.ts
vendored
89
src/monaco.d.ts
vendored
|
|
@ -2,53 +2,56 @@
|
||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
import { IEvent } from 'monaco-editor';
|
||||||
|
|
||||||
declare namespace monaco.languages.yaml {
|
declare module 'monaco-editor' {
|
||||||
export interface DiagnosticsOptions {
|
namespace languages.yaml {
|
||||||
/**
|
export interface DiagnosticsOptions {
|
||||||
* If set, the validator will be enabled and perform syntax validation as well as schema based validation.
|
|
||||||
*/
|
|
||||||
readonly validate?: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A list of known schemas and/or associations of schemas to file names.
|
|
||||||
*/
|
|
||||||
readonly schemas?: Array<{
|
|
||||||
/**
|
/**
|
||||||
* The URI of the schema, which is also the identifier of the schema.
|
* If set, the validator will be enabled and perform syntax validation as well as schema based validation.
|
||||||
*/
|
*/
|
||||||
readonly uri: string;
|
readonly validate?: boolean;
|
||||||
/**
|
|
||||||
* A list of file names that are associated to the schema. The '*' wildcard can be used. For example '*.schema.json', 'package.json'
|
|
||||||
*/
|
|
||||||
readonly fileMatch?: string[];
|
|
||||||
/**
|
|
||||||
* The schema for the given URI.
|
|
||||||
*/
|
|
||||||
readonly schema?: any;
|
|
||||||
}>;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If set, the schema service would load schema content on-demand with 'fetch' if available
|
* A list of known schemas and/or associations of schemas to file names.
|
||||||
*/
|
*/
|
||||||
readonly enableSchemaRequest?: boolean;
|
readonly schemas?: Array<{
|
||||||
/**
|
/**
|
||||||
* If specified, this prefix will be added to all on demand schema requests
|
* The URI of the schema, which is also the identifier of the schema.
|
||||||
*/
|
*/
|
||||||
readonly prefix?: string;
|
readonly uri: string;
|
||||||
/**
|
/**
|
||||||
* Whether or not kubernetes yaml is supported
|
* A list of file names that are associated to the schema. The '*' wildcard can be used. For example '*.schema.json', 'package.json'
|
||||||
*/
|
*/
|
||||||
readonly isKubernetes?: boolean;
|
readonly fileMatch?: string[];
|
||||||
|
/**
|
||||||
|
* The schema for the given URI.
|
||||||
|
*/
|
||||||
|
readonly schema?: any;
|
||||||
|
}>;
|
||||||
|
|
||||||
readonly format?: boolean;
|
/**
|
||||||
|
* If set, the schema service would load schema content on-demand with 'fetch' if available
|
||||||
|
*/
|
||||||
|
readonly enableSchemaRequest?: boolean;
|
||||||
|
/**
|
||||||
|
* If specified, this prefix will be added to all on demand schema requests
|
||||||
|
*/
|
||||||
|
readonly prefix?: string;
|
||||||
|
/**
|
||||||
|
* Whether or not kubernetes yaml is supported
|
||||||
|
*/
|
||||||
|
readonly isKubernetes?: boolean;
|
||||||
|
|
||||||
|
readonly format?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface LanguageServiceDefaults {
|
||||||
|
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
||||||
|
readonly diagnosticsOptions: DiagnosticsOptions;
|
||||||
|
setDiagnosticsOptions(options: DiagnosticsOptions): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const yamlDefaults: LanguageServiceDefaults;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface LanguageServiceDefaults {
|
|
||||||
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
|
||||||
readonly diagnosticsOptions: DiagnosticsOptions;
|
|
||||||
setDiagnosticsOptions(options: DiagnosticsOptions): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const yamlDefaults: LanguageServiceDefaults;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue