From 7f49a21a562b071e8f52f3f43cdcd5882bf4d391 Mon Sep 17 00:00:00 2001 From: Remco Haszing Date: Thu, 25 Mar 2021 17:07:47 +0100 Subject: [PATCH] Revert "Fix types for languages.yaml namespaces" This reverts commit e784f842c3c1a47e9a25cdc3da3dcde5281847ae. --- src/monaco.d.ts | 81 ++++++++++++++++++++++++------------------------- 1 file changed, 39 insertions(+), 42 deletions(-) diff --git a/src/monaco.d.ts b/src/monaco.d.ts index add62bd..eb1a1f6 100644 --- a/src/monaco.d.ts +++ b/src/monaco.d.ts @@ -2,56 +2,53 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IEvent } from 'monaco-editor'; -declare module 'monaco-editor' { - namespace languages.yaml { - export interface DiagnosticsOptions { +declare namespace monaco.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<{ /** - * If set, the validator will be enabled and perform syntax validation as well as schema based validation. + * The URI of the schema, which is also the identifier of the schema. */ - readonly validate?: boolean; - + readonly uri: string; /** - * A list of known schemas and/or associations of schemas to file names. + * A list of file names that are associated to the schema. The '*' wildcard can be used. For example '*.schema.json', 'package.json' */ - readonly schemas?: Array<{ - /** - * The URI of the schema, which is also the identifier of the schema. - */ - 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' - */ - readonly fileMatch?: string[]; - /** - * The schema for the given URI. - */ - readonly schema?: any; - }>; - + readonly fileMatch?: string[]; /** - * If set, the schema service would load schema content on-demand with 'fetch' if available + * The schema for the given URI. */ - 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 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; - export interface LanguageServiceDefaults { - readonly onDidChange: IEvent; - readonly diagnosticsOptions: DiagnosticsOptions; - setDiagnosticsOptions(options: DiagnosticsOptions): void; - } - - export const yamlDefaults: LanguageServiceDefaults; + readonly format?: boolean; } + + export interface LanguageServiceDefaults { + readonly onDidChange: IEvent; + readonly diagnosticsOptions: DiagnosticsOptions; + setDiagnosticsOptions(options: DiagnosticsOptions): void; + } + + export const yamlDefaults: LanguageServiceDefaults; }