declare module monaco.editor { export function create(domElement: HTMLElement, options: IEditorConstructionOptions, services?: any): ICodeEditor; export function createDiffEditor(domElement: HTMLElement, options: IDiffEditorConstructionOptions, services?: any): IDiffEditor; export function createModel(value:string, mode:string|ILanguage|IMode, associatedResource?:any|string): IModel; export function getOrCreateMode(modeId: string): TPromise; export function createCustomMode(description:ILanguage): TPromise; export function colorize(text: string, modeId: string, options: IColorizerOptions): TPromise; export function colorizeElement(domNode: HTMLElement, options: IColorizerElementOptions): TPromise; export function colorizeLine(line: string, tokens: ViewLineToken[], tabSize?: number): string; export function colorizeModelLine(model: IModel, lineNumber: number, tabSize?: number): string; export function registerWorkerParticipant(modeId:string, moduleName:string, ctorName:string): void; export function configureMode(modeId: string, options: any): void; export interface IColorizerOptions { tabSize?: number; } export interface IColorizerElementOptions extends IColorizerOptions { theme?: string; mimeType?: string; } export interface IEditorConstructionOptions extends ICodeEditorWidgetCreationOptions { value?: string; /** * A mode name (such as text/javascript, etc.) or an IMonarchLanguage */ mode?: any; enableTelemetry?: boolean; } export interface IDiffEditorConstructionOptions extends IDiffEditorOptions { } } declare module monaco { interface Thenable { /** * 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. */ then(onfulfilled?: (value: R) => TResult | Thenable, onrejected?: (reason: any) => TResult | Thenable): Thenable; then(onfulfilled?: (value: R) => TResult | Thenable, onrejected?: (reason: any) => void): Thenable; } export interface IDisposable { dispose(): void; } export interface IEvent { (listener: (e: T) => any, thisArg?: any): IDisposable; } export class Emitter { constructor(); event: IEvent; fire(event?: T): void; dispose(): void; } #include(vs/base/common/winjs.base.d.ts): TValueCallback, ProgressCallback, TPromise #include(vs/base/common/uri): URI #include(vs/base/common/eventEmitter): IEmitterEvent, ListenerCallback, IBulkListenerCallback, ListenerUnbind, IEventEmitter #include(vs/base/common/keyCodes): KeyCode, KeyMod #include(vs/base/common/htmlContent): IHTMLContentElementCode, IHTMLContentElement #include(vs/base/common/actions): IAction #include(vs/base/browser/keyboardEvent): IKeyboardEvent #include(vs/base/browser/mouseEvent): IMouseEvent export interface IPlatformServices { } export interface IInstantiationService { } export interface IConstructorSignature1 { new (context: IPlatformServices, first: A1): T; } export interface IConstructorSignature2 { new (context: IPlatformServices, first: A1, second: A2): T; } } declare module monaco.editor { #include(vs/editor/common/modes/monarch/monarchTypes): ILanguage, ILanguageBracket #include(vs/editor/common/core/modeTransition): ModeTransition #include(vs/editor/common/modes): IToken, IModeTransition, ILineContext export interface IMode { } #include(vs/base/browser/ui/scrollbar/scrollableElementOptions): ScrollbarVisibility #include(vs/editor/common/core/viewLineToken): ViewLineToken #includeAll(vs/editor/common/editorCommon): KeyCode, KeyMod #includeAll(vs/editor/browser/editorBrowser): }