mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 08:10:11 +01:00
Also generate a top level monaco.d.ts
This commit is contained in:
parent
77e9dcdca4
commit
564d195403
3 changed files with 5227 additions and 167 deletions
|
|
@ -1,3 +1,8 @@
|
|||
/*!-----------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Type definitions for monaco-editor v0.7.0
|
||||
* Released under the MIT license
|
||||
*-----------------------------------------------------------*/
|
||||
declare module monaco {
|
||||
|
||||
interface Thenable<R> {
|
||||
|
|
@ -4758,180 +4763,180 @@ declare module monaco.worker {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
declare module monaco.languages.typescript {
|
||||
|
||||
export enum ModuleKind {
|
||||
None = 0,
|
||||
CommonJS = 1,
|
||||
AMD = 2,
|
||||
UMD = 3,
|
||||
System = 4,
|
||||
ES6 = 5,
|
||||
ES2015 = 5,
|
||||
}
|
||||
|
||||
export enum JsxEmit {
|
||||
None = 0,
|
||||
Preserve = 1,
|
||||
React = 2,
|
||||
}
|
||||
|
||||
export enum NewLineKind {
|
||||
CarriageReturnLineFeed = 0,
|
||||
LineFeed = 1,
|
||||
}
|
||||
|
||||
export enum ScriptTarget {
|
||||
ES3 = 0,
|
||||
ES5 = 1,
|
||||
ES6 = 2,
|
||||
ES2015 = 2,
|
||||
Latest = 2,
|
||||
}
|
||||
|
||||
export enum ModuleResolutionKind {
|
||||
Classic = 1,
|
||||
NodeJs = 2,
|
||||
}
|
||||
|
||||
interface CompilerOptions {
|
||||
allowNonTsExtensions?: boolean;
|
||||
charset?: string;
|
||||
declaration?: boolean;
|
||||
diagnostics?: boolean;
|
||||
emitBOM?: boolean;
|
||||
help?: boolean;
|
||||
init?: boolean;
|
||||
inlineSourceMap?: boolean;
|
||||
inlineSources?: boolean;
|
||||
jsx?: JsxEmit;
|
||||
reactNamespace?: string;
|
||||
listFiles?: boolean;
|
||||
locale?: string;
|
||||
mapRoot?: string;
|
||||
module?: ModuleKind;
|
||||
newLine?: NewLineKind;
|
||||
noEmit?: boolean;
|
||||
noEmitHelpers?: boolean;
|
||||
noEmitOnError?: boolean;
|
||||
noErrorTruncation?: boolean;
|
||||
noImplicitAny?: boolean;
|
||||
noLib?: boolean;
|
||||
noResolve?: boolean;
|
||||
out?: string;
|
||||
outFile?: string;
|
||||
outDir?: string;
|
||||
preserveConstEnums?: boolean;
|
||||
project?: string;
|
||||
removeComments?: boolean;
|
||||
rootDir?: string;
|
||||
sourceMap?: boolean;
|
||||
sourceRoot?: string;
|
||||
suppressExcessPropertyErrors?: boolean;
|
||||
suppressImplicitAnyIndexErrors?: boolean;
|
||||
target?: ScriptTarget;
|
||||
version?: boolean;
|
||||
watch?: boolean;
|
||||
isolatedModules?: boolean;
|
||||
experimentalDecorators?: boolean;
|
||||
emitDecoratorMetadata?: boolean;
|
||||
moduleResolution?: ModuleResolutionKind;
|
||||
allowUnusedLabels?: boolean;
|
||||
allowUnreachableCode?: boolean;
|
||||
noImplicitReturns?: boolean;
|
||||
noFallthroughCasesInSwitch?: boolean;
|
||||
forceConsistentCasingInFileNames?: boolean;
|
||||
allowSyntheticDefaultImports?: boolean;
|
||||
allowJs?: boolean;
|
||||
noImplicitUseStrict?: boolean;
|
||||
disableSizeLimit?: boolean;
|
||||
[option: string]: string | number | boolean;
|
||||
}
|
||||
|
||||
export interface DiagnosticsOptions {
|
||||
noSemanticValidation?: boolean;
|
||||
noSyntaxValidation?: boolean;
|
||||
}
|
||||
|
||||
export interface LanguageServiceDefaults {
|
||||
/**
|
||||
* Add an additional source file to the language service. Use this
|
||||
* for typescript (definition) files that won't be loaded as editor
|
||||
* document, like `jquery.d.ts`.
|
||||
*
|
||||
* @param content The file content
|
||||
* @param filePath An optional file path
|
||||
* @returns A disposabled which will remove the file from the
|
||||
* language service upon disposal.
|
||||
*/
|
||||
addExtraLib(content: string, filePath?: string): IDisposable;
|
||||
|
||||
/**
|
||||
* Set TypeScript compiler options.
|
||||
*/
|
||||
setCompilerOptions(options: CompilerOptions): void;
|
||||
|
||||
/**
|
||||
* Configure whether syntactic and/or semantic validation should
|
||||
* be performed
|
||||
*/
|
||||
setDiagnosticsOptions(options: DiagnosticsOptions): void;
|
||||
|
||||
/**
|
||||
* Configure when the worker shuts down. By default that is 2mins.
|
||||
*
|
||||
* @param value The maximun idle time in milliseconds. Values less than one
|
||||
* mean never shut down.
|
||||
*/
|
||||
setMaximunWorkerIdleTime(value: number): void;
|
||||
}
|
||||
|
||||
export var typescriptDefaults: LanguageServiceDefaults;
|
||||
export var javascriptDefaults: LanguageServiceDefaults;
|
||||
|
||||
export var getTypeScriptWorker: () => monaco.Promise<any>;
|
||||
export var getJavaScriptWorker: () => monaco.Promise<any>;
|
||||
}
|
||||
|
||||
declare module monaco.languages.typescript {
|
||||
|
||||
export enum ModuleKind {
|
||||
None = 0,
|
||||
CommonJS = 1,
|
||||
AMD = 2,
|
||||
UMD = 3,
|
||||
System = 4,
|
||||
ES6 = 5,
|
||||
ES2015 = 5,
|
||||
}
|
||||
|
||||
export enum JsxEmit {
|
||||
None = 0,
|
||||
Preserve = 1,
|
||||
React = 2,
|
||||
}
|
||||
|
||||
export enum NewLineKind {
|
||||
CarriageReturnLineFeed = 0,
|
||||
LineFeed = 1,
|
||||
}
|
||||
|
||||
export enum ScriptTarget {
|
||||
ES3 = 0,
|
||||
ES5 = 1,
|
||||
ES6 = 2,
|
||||
ES2015 = 2,
|
||||
Latest = 2,
|
||||
}
|
||||
|
||||
export enum ModuleResolutionKind {
|
||||
Classic = 1,
|
||||
NodeJs = 2,
|
||||
}
|
||||
|
||||
interface CompilerOptions {
|
||||
allowNonTsExtensions?: boolean;
|
||||
charset?: string;
|
||||
declaration?: boolean;
|
||||
diagnostics?: boolean;
|
||||
emitBOM?: boolean;
|
||||
help?: boolean;
|
||||
init?: boolean;
|
||||
inlineSourceMap?: boolean;
|
||||
inlineSources?: boolean;
|
||||
jsx?: JsxEmit;
|
||||
reactNamespace?: string;
|
||||
listFiles?: boolean;
|
||||
locale?: string;
|
||||
mapRoot?: string;
|
||||
module?: ModuleKind;
|
||||
newLine?: NewLineKind;
|
||||
noEmit?: boolean;
|
||||
noEmitHelpers?: boolean;
|
||||
noEmitOnError?: boolean;
|
||||
noErrorTruncation?: boolean;
|
||||
noImplicitAny?: boolean;
|
||||
noLib?: boolean;
|
||||
noResolve?: boolean;
|
||||
out?: string;
|
||||
outFile?: string;
|
||||
outDir?: string;
|
||||
preserveConstEnums?: boolean;
|
||||
project?: string;
|
||||
removeComments?: boolean;
|
||||
rootDir?: string;
|
||||
sourceMap?: boolean;
|
||||
sourceRoot?: string;
|
||||
suppressExcessPropertyErrors?: boolean;
|
||||
suppressImplicitAnyIndexErrors?: boolean;
|
||||
target?: ScriptTarget;
|
||||
version?: boolean;
|
||||
watch?: boolean;
|
||||
isolatedModules?: boolean;
|
||||
experimentalDecorators?: boolean;
|
||||
emitDecoratorMetadata?: boolean;
|
||||
moduleResolution?: ModuleResolutionKind;
|
||||
allowUnusedLabels?: boolean;
|
||||
allowUnreachableCode?: boolean;
|
||||
noImplicitReturns?: boolean;
|
||||
noFallthroughCasesInSwitch?: boolean;
|
||||
forceConsistentCasingInFileNames?: boolean;
|
||||
allowSyntheticDefaultImports?: boolean;
|
||||
allowJs?: boolean;
|
||||
noImplicitUseStrict?: boolean;
|
||||
disableSizeLimit?: boolean;
|
||||
[option: string]: string | number | boolean;
|
||||
}
|
||||
|
||||
export interface DiagnosticsOptions {
|
||||
noSemanticValidation?: boolean;
|
||||
noSyntaxValidation?: boolean;
|
||||
}
|
||||
|
||||
export interface LanguageServiceDefaults {
|
||||
/**
|
||||
* Add an additional source file to the language service. Use this
|
||||
* for typescript (definition) files that won't be loaded as editor
|
||||
* document, like `jquery.d.ts`.
|
||||
*
|
||||
* @param content The file content
|
||||
* @param filePath An optional file path
|
||||
* @returns A disposabled which will remove the file from the
|
||||
* language service upon disposal.
|
||||
*/
|
||||
addExtraLib(content: string, filePath?: string): IDisposable;
|
||||
|
||||
/**
|
||||
* Set TypeScript compiler options.
|
||||
*/
|
||||
setCompilerOptions(options: CompilerOptions): void;
|
||||
|
||||
/**
|
||||
* Configure whether syntactic and/or semantic validation should
|
||||
* be performed
|
||||
*/
|
||||
setDiagnosticsOptions(options: DiagnosticsOptions): void;
|
||||
|
||||
/**
|
||||
* Configure when the worker shuts down. By default that is 2mins.
|
||||
*
|
||||
* @param value The maximun idle time in milliseconds. Values less than one
|
||||
* mean never shut down.
|
||||
*/
|
||||
setMaximunWorkerIdleTime(value: number): void;
|
||||
}
|
||||
|
||||
export var typescriptDefaults: LanguageServiceDefaults;
|
||||
export var javascriptDefaults: LanguageServiceDefaults;
|
||||
|
||||
export var getTypeScriptWorker: () => monaco.Promise<any>;
|
||||
export var getJavaScriptWorker: () => monaco.Promise<any>;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
declare module 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'
|
||||
}
|
||||
}
|
||||
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'
|
||||
}
|
||||
}
|
||||
|
||||
export interface LanguageServiceDefaults {
|
||||
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
||||
readonly diagnosticsOptions: DiagnosticsOptions;
|
||||
setDiagnosticsOptions(options: DiagnosticsOptions): void;
|
||||
}
|
||||
export interface LanguageServiceDefaults {
|
||||
readonly onDidChange: IEvent<LanguageServiceDefaults>;
|
||||
readonly diagnosticsOptions: DiagnosticsOptions;
|
||||
setDiagnosticsOptions(options: DiagnosticsOptions): void;
|
||||
}
|
||||
|
||||
export var cssDefaults: LanguageServiceDefaults;
|
||||
export var lessDefaults: LanguageServiceDefaults;
|
||||
export var scssDefaults: LanguageServiceDefaults;
|
||||
export var cssDefaults: LanguageServiceDefaults;
|
||||
export var lessDefaults: LanguageServiceDefaults;
|
||||
export var scssDefaults: LanguageServiceDefaults;
|
||||
}
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue