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

Fix monaco

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