TypeScript Version: 2.3-rc
Code
const foo = typeof Bar;
class Bar {}
Expected behavior:
The code should compile properly. (And did compile fine in 2.2.1)
Actual behavior:
This results in a compilation error, "Class 'Bar' used before its declaration." Flipping the order fixes the problem.
In our case, the typeof Bar is actually used in an extends Foo<typeof Bar> clause of e.g. an interface declaration, but it exhibits the same behavior as this simpler example.
Alternatively, perhaps this was a bug in 2.2.1?
TypeScript Version: 2.3-rc
Code
Expected behavior:
The code should compile properly. (And did compile fine in 2.2.1)
Actual behavior:
This results in a compilation error, "Class 'Bar' used before its declaration." Flipping the order fixes the problem.
In our case, the
typeof Baris actually used in anextends Foo<typeof Bar>clause of e.g. an interface declaration, but it exhibits the same behavior as this simpler example.Alternatively, perhaps this was a bug in 2.2.1?