Fixed a redundant used before defined error (#55283)

This commit is contained in:
Mateusz Burzyński
2023-08-24 17:35:48 +02:00
committed by GitHub
parent 769f2daf71
commit f07077c7ff
4 changed files with 132 additions and 6 deletions

View File

@@ -0,0 +1,23 @@
// @noEmit: true
// https://github.com/microsoft/TypeScript/issues/8775
interface IThing<T> {
owner: T;
}
var foo = {
one: {} as IThing<typeof foo>,
}
let baz = {
two: {} as IThing<typeof bar>,
}
let bar = {
three: {} as IThing<typeof bar>,
}
const qwe = {
four: {} as IThing<typeof qwe>,
}