Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tsc/internal/bundled/libs/lib.dom.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12833,7 +12833,7 @@ interface Document extends Node, DocumentOrShadowRoot, FontFaceSource, GlobalEve
*
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Document/scrollingElement)
*/
readonly scrollingElement: Element | null;
readonly scrollingElement: HTMLElement | null;
/**
* The **`timeline`** readonly property of the Document interface represents the default timeline of the current document. This timeline is a special instance of DocumentTimeline.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//// [tests/cases/compiler/documentScrollingElementType.ts] ////

//// [documentScrollingElementType.ts]
const scrollingElement: HTMLElement | null = document.scrollingElement;
const documentElement: HTMLElement = document.documentElement;


//// [documentScrollingElementType.js]
"use strict";
const scrollingElement = document.scrollingElement;
const documentElement = document.documentElement;
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//// [tests/cases/compiler/documentScrollingElementType.ts] ////

=== documentScrollingElementType.ts ===
const scrollingElement: HTMLElement | null = document.scrollingElement;
>scrollingElement : Symbol(scrollingElement, Decl(documentScrollingElementType.ts, 0, 5))
>HTMLElement : Symbol(HTMLElement, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
>document.scrollingElement : Symbol(Document.scrollingElement, Decl(lib.dom.d.ts, --, --))
>document : Symbol(document, Decl(lib.dom.d.ts, --, --))
>scrollingElement : Symbol(Document.scrollingElement, Decl(lib.dom.d.ts, --, --))

const documentElement: HTMLElement = document.documentElement;
>documentElement : Symbol(documentElement, Decl(documentScrollingElementType.ts, 1, 5))
>HTMLElement : Symbol(HTMLElement, Decl(lib.dom.d.ts, --, --), Decl(lib.dom.d.ts, --, --))
>document.documentElement : Symbol(Document.documentElement, Decl(lib.dom.d.ts, --, --))
>document : Symbol(document, Decl(lib.dom.d.ts, --, --))
>documentElement : Symbol(Document.documentElement, Decl(lib.dom.d.ts, --, --))

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//// [tests/cases/compiler/documentScrollingElementType.ts] ////

=== documentScrollingElementType.ts ===
const scrollingElement: HTMLElement | null = document.scrollingElement;
>scrollingElement : HTMLElement | null
>document.scrollingElement : HTMLElement | null
>document : Document
>scrollingElement : HTMLElement | null

const documentElement: HTMLElement = document.documentElement;
>documentElement : HTMLElement
>document.documentElement : HTMLElement
>document : Document
>documentElement : HTMLElement

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// @lib: es5,dom
// @strict: true

const scrollingElement: HTMLElement | null = document.scrollingElement;
const documentElement: HTMLElement = document.documentElement;