提交 2d795089 编写于 作者: A Amy Qiu

Fix monaco

上级 adfa4226
......@@ -562,9 +562,9 @@
"resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-3.1.5.tgz"
},
"windows-process-tree": {
"version": "0.1.1",
"from": "windows-process-tree@0.1.1",
"resolved": "https://registry.npmjs.org/windows-process-tree/-/windows-process-tree-0.1.1.tgz"
"version": "0.1.2",
"from": "windows-process-tree@0.1.2",
"resolved": "https://registry.npmjs.org/windows-process-tree/-/windows-process-tree-0.1.2.tgz"
},
"winreg": {
"version": "1.2.0",
......
......@@ -43,7 +43,6 @@
"vscode-debugprotocol": "1.22.0",
"vscode-ripgrep": "0.0.25",
"vscode-textmate": "^3.1.5",
"windows-process-tree": "0.1.1",
"winreg": "1.2.0",
"xterm": "Tyriar/xterm.js#vscode-release/1.16",
"yauzl": "2.8.0"
......@@ -127,6 +126,7 @@
"url": "https://github.com/Microsoft/vscode/issues"
},
"optionalDependencies": {
"windows-process-tree": "0.1.2",
"windows-foreground-love": "0.1.0",
"windows-mutex": "^0.2.0",
"fsevents": "0.3.8"
......
......@@ -34,41 +34,49 @@ declare module monaco {
/**
* The value callback to complete a promise
*/
export interface TValueCallback<T> {
(value: T | Thenable<T>): void;
}
export type TValueCallback<T = any> = (value: T | PromiseLike<T>) => void;
export type ProgressCallback<TProgress = any> = (progress: TProgress) => void;
export interface ProgressCallback {
(progress: any): any;
}
export class Promise<T = any, TProgress = any> {
constructor(
executor: (
resolve: (value: T | PromiseLike<T>) => void,
reject: (reason: any) => void,
progress: (progress: TProgress) => void) => void,
oncancel?: () => void);
public then<TResult1 = T, TResult2 = never>(
onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,
onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null,
onprogress?: (progress: TProgress) => void): Promise<TResult1 | TResult2, TProgress>;
export class Promise {
// commented out because this conflicts with the native promise
// constructor(init: (complete: ValueCallback, error: ErrorCallback, progress: ProgressCallback) => void, oncancel?: any);
public done(
onfulfilled?: (value: T) => void,
onrejected?: (reason: any) => void,
onprogress?: (progress: TProgress) => void): void;
// commented out to speed up adoption of TPromise
// static as(value:any):Promise;
public cancel(): void;
// static join(promises: { [name: string]: Promise; }): Promise;
static join(promises: Promise[]): Promise;
// static any(promises: Promise[]): Promise;
public static as(value: null): Promise<null>;
public static as(value: undefined): Promise<undefined>;
public static as<T, TPromise extends PromiseLike<T>>(value: TPromise): TPromise;
public static as<T>(value: T): Promise<T>;
// commented out to speed up adoption of TPromise
// static timeout(delay:number):Promise;
public static is(value: any): value is PromiseLike<any>;
// static wrapError(error: Error): Promise;
// static is(value: any): value is Thenable<any>;
// static addEventListener(type: string, fn: EventCallback): void;
public static timeout(delay: number): Promise<void>;
public then(success?: ValueCallback, error?: ErrorCallback, progress?: ProgressCallback): Promise;
// public then<U>(success?: ValueCallback, error?: ErrorCallback, progress?: ProgressCallback): Promise<U>;
public done(success?: ValueCallback, error?: ErrorCallback, progress?: ProgressCallback): void;
public cancel(): void;
public static join<T1, T2>(promises: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<[T1, T2]>;
public static join<T>(promises: (T | PromiseLike<T>)[]): Promise<T[]>;
public static join<T>(promises: { [n: string]: T | PromiseLike<T> }): Promise<{ [n: string]: T }>;
public static any<T>(promises: (T | PromiseLike<T>)[]): Promise<{ key: string; value: Promise<T>; }>;
public static wrap<T>(value: T | PromiseLike<T>): Promise<T>;
public static wrapError<T = never>(error: Error): Promise<T>;
}
export class CancellationTokenSource {
......@@ -807,7 +815,7 @@ declare module monaco.editor {
export function setModelMarkers(model: IModel, owner: string, markers: IMarkerData[]): void;
/**
* Get markers for owner ant/or resource
* Get markers for owner and/or resource
* @returns {IMarker[]} list of markers
* @param filter
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册