Skip to content

Commit

Permalink
debt - more no tpromise in monaco.d.ts #53526
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed Dec 12, 2018
1 parent 43e9ea4 commit 5c94858
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 29 deletions.
3 changes: 1 addition & 2 deletions build/monaco/monaco.d.ts.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ declare namespace monaco {
}

#include(vs/platform/markers/common/markers): MarkerTag, MarkerSeverity
#include(vs/base/common/winjs.base.d.ts): Promise
#include(vs/base/common/cancellation): CancellationTokenSource, CancellationToken
#include(vs/base/common/uri): URI, UriComponents
#include(vs/base/common/keyCodes): KeyCode
Expand Down Expand Up @@ -86,4 +85,4 @@ declare namespace monaco.worker {

}

//dtsv=2
//dtsv=2
2 changes: 0 additions & 2 deletions src/vs/editor/common/standalone/standaloneBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { CancellationTokenSource } from 'vs/base/common/cancellation';
import { Emitter } from 'vs/base/common/event';
import { KeyChord, KeyMod as ConstKeyMod } from 'vs/base/common/keyCodes';
import { URI } from 'vs/base/common/uri';
import { TPromise } from 'vs/base/common/winjs.base';
import { Position } from 'vs/editor/common/core/position';
import { Range } from 'vs/editor/common/core/range';
import { Selection } from 'vs/editor/common/core/selection';
Expand Down Expand Up @@ -39,7 +38,6 @@ export function createMonacoBaseAPI(): typeof monaco {
SelectionDirection: standaloneEnums.SelectionDirection,
MarkerSeverity: standaloneEnums.MarkerSeverity,
MarkerTag: standaloneEnums.MarkerTag,
Promise: TPromise,
Uri: <any>URI,
Token: Token
};
Expand Down
1 change: 0 additions & 1 deletion src/vs/editor/editor.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export const Selection = api.Selection;
export const SelectionDirection = api.SelectionDirection;
export const MarkerSeverity = api.MarkerSeverity;
export const MarkerTag = api.MarkerTag;
export const Promise = api.Promise;
export const Uri = api.Uri;
export const Token = api.Token;
export const editor = api.editor;
Expand Down
25 changes: 1 addition & 24 deletions src/vs/monaco.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,29 +37,6 @@ declare namespace monaco {
Error = 8
}


export class Promise<T = any> {
constructor(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason: any) => void) => void);

public then<TResult1 = T, TResult2 = never>(
onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null,
onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;


public static as(value: null): Promise<null>;
public static as(value: undefined): Promise<undefined>;
public static as<T>(value: PromiseLike<T>): PromiseLike<T>;
public static as<T, SomePromise extends PromiseLike<T>>(value: SomePromise): SomePromise;
public static as<T>(value: T): Promise<T>;

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 wrap<T>(value: T | PromiseLike<T>): Promise<T>;

public static wrapError<T = never>(error: Error): Promise<T>;
}

export class CancellationTokenSource {
readonly token: CancellationToken;
cancel(): void;
Expand Down Expand Up @@ -5568,4 +5545,4 @@ declare namespace monaco.worker {

}

//dtsv=2
//dtsv=2

0 comments on commit 5c94858

Please sign in to comment.