Closed
Description
π Search Terms
"compiler option to include", "containerSeemsToBeEmptyDomElement"
π Version & Regression Information
- This changed in commit 31374d2 when this diagnostic was added
β― Playground Link
https://github.com/frodi-karlsson/lib-dom-example
π» Code
// tsconfig.json
{
"compilerOptions": {
"target": "esnext",
"lib": ["es5", "dom"],
"noEmit": true
},
"files": ["index.ts"]
}
// index.ts
interface HTMLXYZElement {}
const a = {} as HTMLXYZElement;
// gives us Property_0_does_not_exist_on_type_1_Try_changing_the_lib_compiler_option_to_include_dom
// when it should give Property_0_does_not_exist_on_type_1
a.innerText = "hello";
π Actual behavior
Property 'innerText' does not exist on type 'HTMLXYZElement'. Try changing the 'lib' compiler option to include 'dom'.
π Expected behavior
Property 'innerText' does not exist on type 'HTMLXYZElement'.
Additional information about the issue
Bit of a duplicate of #54484 which did not have sufficient adherence to issue template. Noticed by @jakebailey here
There's a check for "dom" that should be "lib.dom.d.ts"