Closed
Description
TypeScript Version: v2.0.0-beta
Code
<HTMLDivElement>document.querySelector(<any>'div');
Expected behavior:
- Get "Element" as return type like in previous versions.
or - Get an error for not using a string as argument.
Actual behavior:
Compiler outputs following error:
test.ts(1,1): error TS2352: Type 'HTMLAnchorElement' cannot be converted to type 'HTMLDivElement'.
Property 'align' is missing in type 'HTMLAnchorElement'.
I think this has something to do with the changes for #8114.