Closed
Description
TypeScript Version: 2.2.1 / nightly (2.2.0-dev.201xxxxx)
Code
// This doesn't work
const a = {
b: 'some string'
}
interface X extends typeof a {
a: number
}
// This does
const a = {
b: 'some string'
}
type A = typeof a
interface X extends A {
a: number
}
Expected behavior:
Treat typeof
expression as type expression in type definition context.
Actual behavior:
Compiler throws an Expression expected.
error.