1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
tests/cases/compiler/missingDomElements.ts(6,24): error TS2812: Property 'textContent' does not exist on type 'Element'. Try changing the 'lib' compiler option to include 'dom'.
tests/cases/compiler/missingDomElements.ts(7,28): error TS2812: Property 'textContent' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.
tests/cases/compiler/missingDomElements.ts(8,33): error TS2812: Property 'textContent' does not exist on type 'HTMLInputElement'. Try changing the 'lib' compiler option to include 'dom'.
tests/cases/compiler/missingDomElements.ts(9,47): error TS2812: Property 'textContent' does not exist on type 'EventTarget & HTMLInputElement'. Try changing the 'lib' compiler option to include 'dom'.
tests/cases/compiler/missingDomElements.ts(16,32): error TS2339: Property 'textContent' does not exist on type 'HTMLElementFake'.
tests/cases/compiler/missingDomElements.ts(17,21): error TS2339: Property 'textContent' does not exist on type 'Node'.
==== tests/cases/compiler/missingDomElements.ts (6 errors) ====
interface Element {}
interface EventTarget {}
interface HTMLElement {}
interface HTMLInputElement {}
({} as any as Element).textContent;
~~~~~~~~~~~
!!! error TS2812: Property 'textContent' does not exist on type 'Element'. Try changing the 'lib' compiler option to include 'dom'.
({} as any as HTMLElement).textContent;
~~~~~~~~~~~
!!! error TS2812: Property 'textContent' does not exist on type 'HTMLElement'. Try changing the 'lib' compiler option to include 'dom'.
({} as any as HTMLInputElement).textContent;
~~~~~~~~~~~
!!! error TS2812: Property 'textContent' does not exist on type 'HTMLInputElement'. Try changing the 'lib' compiler option to include 'dom'.
({} as any as EventTarget & HTMLInputElement).textContent
~~~~~~~~~~~
!!! error TS2812: Property 'textContent' does not exist on type 'EventTarget & HTMLInputElement'. Try changing the 'lib' compiler option to include 'dom'.
interface HTMLElementFake {}
interface Node {
actuallyNotTheSame: number;
};
({} as any as HTMLElementFake).textContent;
~~~~~~~~~~~
!!! error TS2339: Property 'textContent' does not exist on type 'HTMLElementFake'.
({} as any as Node).textContent;
~~~~~~~~~~~
!!! error TS2339: Property 'textContent' does not exist on type 'Node'.
|