Skip to content

Commit 545daec

Browse files
committed
Merge branch 'master' of https://github.com/Microsoft/TSJS-lib-generator into implicit-iterable
2 parents 605b247 + 0be887a commit 545daec

File tree

4 files changed

+53
-13
lines changed

4 files changed

+53
-13
lines changed

baselines/dom.generated.d.ts

+10-7
Original file line numberDiff line numberDiff line change
@@ -2288,8 +2288,8 @@ interface Console {
22882288
dirxml(value: any): void;
22892289
error(message?: any, ...optionalParams: any[]): void;
22902290
exception(message?: string, ...optionalParams: any[]): void;
2291-
group(groupTitle?: string): void;
2292-
groupCollapsed(groupTitle?: string): void;
2291+
group(groupTitle?: string, ...optionalParams: any[]): void;
2292+
groupCollapsed(groupTitle?: string, ...optionalParams: any[]): void;
22932293
groupEnd(): void;
22942294
info(message?: any, ...optionalParams: any[]): void;
22952295
log(message?: any, ...optionalParams: any[]): void;
@@ -3641,9 +3641,9 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
36413641
scrollTo(x: number, y: number): void;
36423642
scrollBy(options?: ScrollToOptions): void;
36433643
scrollBy(x: number, y: number): void;
3644-
insertAdjacentElement(position: string, insertedElement: Element): Element | null;
3645-
insertAdjacentHTML(where: string, html: string): void;
3646-
insertAdjacentText(where: string, text: string): void;
3644+
insertAdjacentElement(position: InsertPosition, insertedElement: Element): Element | null;
3645+
insertAdjacentHTML(where: InsertPosition, html: string): void;
3646+
insertAdjacentText(where: InsertPosition, text: string): void;
36473647
attachShadow(shadowRootInitDict: ShadowRootInit): ShadowRoot;
36483648
addEventListener<K extends keyof ElementEventMap>(type: K, listener: (this: Element, ev: ElementEventMap[K]) => any, useCapture?: boolean): void;
36493649
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
@@ -5725,7 +5725,7 @@ interface HTMLMediaElement extends HTMLElement {
57255725
/**
57265726
* Loads and starts playback of a media resource.
57275727
*/
5728-
play(): void;
5728+
play(): Promise<void>;
57295729
setMediaKeys(mediaKeys: MediaKeys | null): Promise<void>;
57305730
readonly HAVE_CURRENT_DATA: number;
57315731
readonly HAVE_ENOUGH_DATA: number;
@@ -9366,6 +9366,8 @@ interface Response extends Object, Body {
93669366
declare var Response: {
93679367
prototype: Response;
93689368
new(body?: any, init?: ResponseInit): Response;
9369+
error: () => Response;
9370+
redirect: (url: string, status?: number) => Response;
93699371
}
93709372

93719373
interface SVGAElement extends SVGGraphicsElement, SVGURIReference {
@@ -14963,6 +14965,7 @@ type BufferSource = ArrayBuffer | ArrayBufferView;
1496314965
type MouseWheelEvent = WheelEvent;
1496414966
type ScrollRestoration = "auto" | "manual";
1496514967
type FormDataEntryValue = string | File;
14968+
type InsertPosition = "beforebegin" | "afterbegin" | "beforeend" | "afterend";
1496614969
type AppendMode = "segments" | "sequence";
1496714970
type AudioContextState = "suspended" | "running" | "closed";
1496814971
type BiquadFilterType = "lowpass" | "highpass" | "bandpass" | "lowshelf" | "highshelf" | "peaking" | "notch" | "allpass";
@@ -15033,4 +15036,4 @@ type ServiceWorkerState = "installing" | "installed" | "activating" | "activated
1503315036
type Transport = "usb" | "nfc" | "ble";
1503415037
type VideoFacingModeEnum = "user" | "environment" | "left" | "right";
1503515038
type VisibilityState = "hidden" | "visible" | "prerender" | "unloaded";
15036-
type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text";
15039+
type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text";

baselines/webworker.generated.d.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ interface Console {
220220
dirxml(value: any): void;
221221
error(message?: any, ...optionalParams: any[]): void;
222222
exception(message?: string, ...optionalParams: any[]): void;
223-
group(groupTitle?: string): void;
224-
groupCollapsed(groupTitle?: string): void;
223+
group(groupTitle?: string, ...optionalParams: any[]): void;
224+
groupCollapsed(groupTitle?: string, ...optionalParams: any[]): void;
225225
groupEnd(): void;
226226
info(message?: any, ...optionalParams: any[]): void;
227227
log(message?: any, ...optionalParams: any[]): void;
@@ -957,6 +957,8 @@ interface Response extends Object, Body {
957957
declare var Response: {
958958
prototype: Response;
959959
new(body?: any, init?: ResponseInit): Response;
960+
error: () => Response;
961+
redirect: (url: string, status?: number) => Response;
960962
}
961963

962964
interface ServiceWorkerEventMap extends AbstractWorkerEventMap {
@@ -1838,4 +1840,4 @@ type ServiceWorkerState = "installing" | "installed" | "activating" | "activated
18381840
type VisibilityState = "hidden" | "visible" | "prerender" | "unloaded";
18391841
type XMLHttpRequestResponseType = "" | "arraybuffer" | "blob" | "document" | "json" | "text";
18401842
type ClientType = "window" | "worker" | "sharedworker" | "all";
1841-
type FrameType = "auxiliary" | "top-level" | "nested" | "none";
1843+
type FrameType = "auxiliary" | "top-level" | "nested" | "none";

inputfiles/addedTypes.json

+9-3
Original file line numberDiff line numberDiff line change
@@ -1219,19 +1219,19 @@
12191219
"kind": "method",
12201220
"interface": "Element",
12211221
"name": "insertAdjacentElement",
1222-
"signatures": ["insertAdjacentElement(position: string, insertedElement: Element): Element | null"]
1222+
"signatures": ["insertAdjacentElement(position: InsertPosition, insertedElement: Element): Element | null"]
12231223
},
12241224
{
12251225
"kind": "method",
12261226
"interface": "Element",
12271227
"name": "insertAdjacentHTML",
1228-
"signatures": ["insertAdjacentHTML(where: string, html: string): void"]
1228+
"signatures": ["insertAdjacentHTML(where: InsertPosition, html: string): void"]
12291229
},
12301230
{
12311231
"kind": "method",
12321232
"interface": "Element",
12331233
"name": "insertAdjacentText",
1234-
"signatures": ["insertAdjacentText(where: string, text: string): void"]
1234+
"signatures": ["insertAdjacentText(where: InsertPosition, text: string): void"]
12351235
},
12361236
{
12371237
"kind": "property",
@@ -1616,5 +1616,11 @@
16161616
"name": "changedTouches?",
16171617
"type": "Touch[]"
16181618
}]
1619+
},
1620+
{
1621+
"kind": "typedef",
1622+
"name": "InsertPosition",
1623+
"flavor": "Web",
1624+
"type": "\"beforebegin\" | \"afterbegin\" | \"beforeend\" | \"afterend\""
16191625
}
16201626
]

inputfiles/overridingTypes.json

+29
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
[
2+
{
3+
"kind": "constructor",
4+
"interface": "Response",
5+
"signatures": [
6+
"new(body?: any, init?: ResponseInit): Response",
7+
"error: () => Response",
8+
"redirect: (url: string, status?: number) => Response"
9+
]
10+
},
211
{
312
"kind": "constructor",
413
"interface": "ErrorEvent",
@@ -324,6 +333,18 @@
324333
"interface": "Console",
325334
"name": "warn",
326335
"signatures": ["warn(message?: any, ...optionalParams: any[]): void"]
336+
},
337+
{
338+
"kind": "method",
339+
"interface": "Console",
340+
"name": "group",
341+
"signatures": ["group(groupTitle?: string, ...optionalParams: any[]): void"]
342+
},
343+
{
344+
"kind": "method",
345+
"interface": "Console",
346+
"name": "groupCollapsed",
347+
"signatures": ["groupCollapsed(groupTitle?: string, ...optionalParams: any[]): void"]
327348
},
328349
{
329350
"kind": "callback",
@@ -1073,5 +1094,13 @@
10731094
"signatures": [
10741095
"new(data?: string): Text"
10751096
]
1097+
},
1098+
{
1099+
"kind": "method",
1100+
"interface": "HTMLMediaElement",
1101+
"name": "play",
1102+
"signatures": [
1103+
"play(): Promise<void>"
1104+
]
10761105
}
10771106
]

0 commit comments

Comments
 (0)