monaco.d.ts.recipe 3.9 KB
Newer Older
1 2
declare module monaco {

J
Johannes Rieken 已提交
3
    interface Thenable<T> {
4 5 6 7 8 9
        /**
         * Attaches callbacks for the resolution and/or rejection of the Promise.
         * @param onfulfilled The callback to execute when the Promise is resolved.
         * @param onrejected The callback to execute when the Promise is rejected.
         * @returns A Promise for the completion of which ever callback is executed.
         */
J
Johannes Rieken 已提交
10 11
        then<TResult>(onfulfilled?: (value: T) => TResult | Thenable<TResult>, onrejected?: (reason: any) => TResult | Thenable<TResult>): Thenable<TResult>;
        then<TResult>(onfulfilled?: (value: T) => TResult | Thenable<TResult>, onrejected?: (reason: any) => void): Thenable<TResult>;
12 13 14 15 16
    }

    export interface IDisposable {
        dispose(): void;
    }
17

18 19 20
    export interface IEvent<T> {
        (listener: (e: T) => any, thisArg?: any): IDisposable;
    }
21

A
Alex Dima 已提交
22 23 24
    /**
     * A helper that allows to emit and listen to typed events
     */
25 26
    export class Emitter<T> {
        constructor();
27
        readonly event: Event<T>;
28 29 30
        fire(event?: T): void;
        dispose(): void;
    }
A
Alex Dima 已提交
31

32 33 34 35 36 37
    export enum Severity {
        Ignore = 0,
        Info = 1,
        Warning = 2,
        Error = 3,
    }
A
Alex Dima 已提交
38

39 40 41
#include(vs/base/common/winjs.base.d.ts): TValueCallback, ProgressCallback, TPromise
#include(vs/base/common/cancellation): CancellationTokenSource, CancellationToken
#include(vs/base/common/uri): URI
A
Alex Dima 已提交
42
#include(vs/editor/common/standalone/standaloneBase): KeyCode, KeyMod
43
#include(vs/base/common/htmlContent): MarkedString
44 45
#include(vs/base/browser/keyboardEvent): IKeyboardEvent
#include(vs/base/browser/mouseEvent): IMouseEvent
A
Alex Dima 已提交
46 47
#include(vs/editor/common/editorCommon): IScrollEvent, IRange, ISelection
#include(vs/editor/common/core/position): IPosition, Position
48
#include(vs/editor/common/core/range): Range
49
#include(vs/editor/common/core/selection): Selection, SelectionDirection
A
Alex Dima 已提交
50
#include(vs/editor/common/core/token): Token
51 52 53
}

declare module monaco.editor {
54

A
Alex Dima 已提交
55
#includeAll(vs/editor/browser/standalone/standaloneEditor;modes.=>languages.;editorCommon.=>):
56
#include(vs/editor/common/services/standaloneThemeService): BuiltinTheme, IStandaloneThemeData, IColors
57
#include(vs/editor/common/modes/supports/tokenization): ITokenThemeRule
58
#include(vs/editor/common/services/webWorker): MonacoWebWorker, IWebWorkerOptions
A
Alex Dima 已提交
59 60 61 62
#include(vs/editor/browser/standalone/standaloneCodeEditor): IEditorConstructionOptions, IDiffEditorConstructionOptions, IStandaloneCodeEditor, IStandaloneDiffEditor
export interface ICommandHandler {
    (...args:any[]): void;
}
A
Alex Dima 已提交
63
#include(vs/platform/contextkey/common/contextkey): IContextKey
64 65
#include(vs/editor/browser/standalone/standaloneServices): IEditorOverrideServices
#include(vs/platform/markers/common/markers): IMarkerData
66
#include(vs/editor/browser/standalone/colorizer): IColorizerOptions, IColorizerElementOptions
67
#include(vs/base/common/scrollable): ScrollbarVisibility
68
#includeAll(vs/editor/common/editorCommon;IMode=>languages.IMode;LanguageIdentifier=>languages.LanguageIdentifier;editorOptions.=>): IPosition, IRange, ISelection, SelectionDirection, IScrollEvent
69
#includeAll(vs/editor/common/model/textModelEvents):
70 71
#includeAll(vs/editor/common/config/editorOptions):
#includeAll(vs/editor/browser/editorBrowser;editorCommon.=>;editorOptions.=>):
72
#include(vs/editor/common/config/fontInfo): FontInfo, BareFontInfo
73 74 75 76
}

declare module monaco.languages {

77
#includeAll(vs/editor/browser/standalone/standaloneLanguages;modes.=>;editorCommon.=>editor.;IMarkerData=>editor.IMarkerData):
78
#includeAll(vs/editor/common/modes/languageConfiguration):
A
Tweaks  
Alex Dima 已提交
79
#includeAll(vs/editor/common/modes;editorCommon.IRange=>IRange;editorCommon.IPosition=>IPosition;editorCommon.=>editor.):
80
#include(vs/editor/common/services/modeService): ILanguageExtensionPoint
81
#includeAll(vs/editor/common/modes/monarch/monarchTypes):
82 83 84 85 86

}

declare module monaco.worker {

87
#includeAll(vs/editor/common/services/editorSimpleWorker;):
88

89
}