Skip to content

Commit d2a46a0

Browse files
TypeScript Botsandersn
TypeScript Bot
andauthored
Cherry-pick PR #45554 into release-4.4 (#45555)
Component commits: c9846f8 Restore HTMLDocument constructable value in DOM Don't touch anything else in the DOM. Co-authored-by: Nathan Shively-Sanders <[email protected]>
1 parent a417917 commit d2a46a0

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

src/lib/dom.generated.d.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -6380,6 +6380,12 @@ interface HTMLDocument extends Document {
63806380
removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
63816381
}
63826382

6383+
/** @deprecated */
6384+
declare var HTMLDocument: {
6385+
prototype: HTMLDocument;
6386+
new(): HTMLDocument;
6387+
};
6388+
63836389
interface HTMLElementEventMap extends ElementEventMap, DocumentAndElementEventHandlersEventMap, GlobalEventHandlersEventMap {
63846390
}
63856391

@@ -17181,7 +17187,6 @@ interface WindowEventMap extends GlobalEventHandlersEventMap, WindowEventHandler
1718117187

1718217188
/** A window containing a DOM document; the document property points to the DOM document loaded in that window. */
1718317189
interface Window extends EventTarget, AnimationFrameProvider, GlobalEventHandlers, WindowEventHandlers, WindowLocalStorage, WindowOrWorkerGlobalScope, WindowSessionStorage {
17184-
HTMLDocument: Document;
1718517190
/** @deprecated This is a legacy alias of `navigator`. */
1718617191
readonly clientInformation: Navigator;
1718717192
/**
@@ -18246,7 +18251,6 @@ declare var Image: {
1824618251
declare var Option: {
1824718252
new(text?: string, value?: string, defaultSelected?: boolean, selected?: boolean): HTMLOptionElement;
1824818253
};
18249-
declare var HTMLDocument: Document;
1825018254
/** @deprecated This is a legacy alias of `navigator`. */
1825118255
declare var clientInformation: Navigator;
1825218256
/**

tests/baselines/reference/intersectionsOfLargeUnions2.errors.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ tests/cases/compiler/intersectionsOfLargeUnions2.ts(31,15): error TS2536: Type '
1010
interface ElementTagNameMap {
1111
~~~~~~~~~~~~~~~~~
1212
!!! error TS2300: Duplicate identifier 'ElementTagNameMap'.
13-
!!! related TS6203 /.ts/lib.dom.d.ts:18258:6: 'ElementTagNameMap' was also declared here.
13+
!!! related TS6203 /.ts/lib.dom.d.ts:18263:6: 'ElementTagNameMap' was also declared here.
1414
[index: number]: HTMLElement
1515
}
1616

tests/baselines/reference/mappedTypeRecursiveInference.types

+4-4
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)