Closed
Description
TypeScript Version: 2.5.3
Code
class C {
constructor(s:string){}
test(){}
}
const o={C:C}
let c:typeof o.C.prototype
let c2:C=new C('');
let c3:(typeof o).C;
Expected behavior:
(typeof o).C
in c3
produces an error.
For now, typeof can navigate to variable and properties only, not types.
It would be great to be able to continue navigate types after a variable casting. So, (typeof o).C
and typeof o.C.prototype
will produce the same type result.
I prefer (typeof o).C
of course.
Actual behavior:
let c3:(typeof o).C;
hates parenthesis