Skip to content

Commit 965f994

Browse files
committed
Update LKG
1 parent babddd6 commit 965f994

12 files changed

+30751
-20848
lines changed

bin/lib.core.d.ts

+13
Original file line numberDiff line numberDiff line change
@@ -1184,3 +1184,16 @@ declare type ClassDecorator = <TFunction extends Function>(target: TFunction) =>
11841184
declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;
11851185
declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
11861186
declare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;
1187+
1188+
declare type PromiseConstructorLike = new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void) => PromiseLike<T>;
1189+
1190+
interface PromiseLike<T> {
1191+
/**
1192+
* Attaches callbacks for the resolution and/or rejection of the Promise.
1193+
* @param onfulfilled The callback to execute when the Promise is resolved.
1194+
* @param onrejected The callback to execute when the Promise is rejected.
1195+
* @returns A Promise for the completion of which ever callback is executed.
1196+
*/
1197+
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): PromiseLike<TResult>;
1198+
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => void): PromiseLike<TResult>;
1199+
}

bin/lib.core.es6.d.ts

+14-11
Original file line numberDiff line numberDiff line change
@@ -1184,6 +1184,19 @@ declare type ClassDecorator = <TFunction extends Function>(target: TFunction) =>
11841184
declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;
11851185
declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
11861186
declare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void;
1187+
1188+
declare type PromiseConstructorLike = new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void) => PromiseLike<T>;
1189+
1190+
interface PromiseLike<T> {
1191+
/**
1192+
* Attaches callbacks for the resolution and/or rejection of the Promise.
1193+
* @param onfulfilled The callback to execute when the Promise is resolved.
1194+
* @param onrejected The callback to execute when the Promise is rejected.
1195+
* @returns A Promise for the completion of which ever callback is executed.
1196+
*/
1197+
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): PromiseLike<TResult>;
1198+
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => void): PromiseLike<TResult>;
1199+
}
11871200
declare type PropertyKey = string | number | symbol;
11881201

11891202
interface Symbol {
@@ -4759,17 +4772,6 @@ declare module Reflect {
47594772
function setPrototypeOf(target: any, proto: any): boolean;
47604773
}
47614774

4762-
interface PromiseLike<T> {
4763-
/**
4764-
* Attaches callbacks for the resolution and/or rejection of the Promise.
4765-
* @param onfulfilled The callback to execute when the Promise is resolved.
4766-
* @param onrejected The callback to execute when the Promise is rejected.
4767-
* @returns A Promise for the completion of which ever callback is executed.
4768-
*/
4769-
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): PromiseLike<TResult>;
4770-
then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => void): PromiseLike<TResult>;
4771-
}
4772-
47734775
/**
47744776
* Represents the completion of an asynchronous operation
47754777
*/
@@ -4789,6 +4791,7 @@ interface Promise<T> {
47894791
* @returns A Promise for the completion of the callback.
47904792
*/
47914793
catch(onrejected?: (reason: any) => T | PromiseLike<T>): Promise<T>;
4794+
catch(onrejected?: (reason: any) => void): Promise<T>;
47924795

47934796
[Symbol.toStringTag]: string;
47944797
}

bin/lib.d.ts

+50-64
Large diffs are not rendered by default.

bin/lib.dom.d.ts

+38-64
Large diffs are not rendered by default.

bin/lib.es6.d.ts

+52-76
Large diffs are not rendered by default.

bin/lib.webworker.d.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -3064,8 +3064,7 @@ interface WebSocket extends EventTarget {
30643064

30653065
declare var WebSocket: {
30663066
prototype: WebSocket;
3067-
new(url: string, protocols?: string): WebSocket;
3068-
new(url: string, protocols?: any): WebSocket;
3067+
new(url: string, protocols?: string | string[]): WebSocket;
30693068
CLOSED: number;
30703069
CLOSING: number;
30713070
CONNECTING: number;
@@ -3300,8 +3299,7 @@ interface EventListenerObject {
33003299
declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
33013300

33023301
interface ErrorEventHandler {
3303-
(event: Event, source?: string, fileno?: number, columnNumber?: number): void;
3304-
(event: string, source?: string, fileno?: number, columnNumber?: number): void;
3302+
(event: Event | string, source?: string, fileno?: number, columnNumber?: number): void;
33053303
}
33063304
interface PositionCallback {
33073305
(position: Position): void;

0 commit comments

Comments
 (0)