We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeScript Version: 2.6.3
Code
let result = document.querySelector('div'); // result is HTMLDivElement // compiles let result1 = document.querySelector<HTMLDivElement>('div'); // result1 is HTMLDivElement // error TS2344: Build:Type 'HTMLDivElement' does not satisfy the constraint '"symbol" | "object" | "track" | "progress" | "a" | "applet" | "area" | "audio" | "base" | "basefo...'. let result2 = document.querySelector<HTMLDivElement>('div[id][data-foo]');// result1 is HTMLDivElement //error TS2344: Build:Type 'HTMLDivElement' does not satisfy the constraint '"symbol" | "object" | "track" | "progress" | "a" | "applet" | "area" | "audio" | "base" | "basefo...'. let result3 = document.querySelector('div[id][data-foo]'); // result3 is Element 8-/ // compiles
Expected behavior: All four lines should compile. VS highlighting and playground do not show errors.
Actual behavior: TS2344 is shown, compile aborts.
querySelectorAll has the same problem.
introduced in #12568
The text was updated successfully, but these errors were encountered:
Works fine in nightly.
Sorry, something went wrong.
@aluanhaddad thanks for testing next!
No branches or pull requests
TypeScript Version: 2.6.3
Code
Expected behavior:
All four lines should compile. VS highlighting and playground do not show errors.
Actual behavior:
TS2344 is shown, compile aborts.
querySelectorAll has the same problem.
introduced in #12568
The text was updated successfully, but these errors were encountered: