mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
29 lines
682 B
Plaintext
29 lines
682 B
Plaintext
classWithEmptyBody.ts(5,13): error TS2454: Variable 'c' is used before being assigned.
|
|
classWithEmptyBody.ts(17,13): error TS2454: Variable 'd' is used before being assigned.
|
|
|
|
|
|
==== classWithEmptyBody.ts (2 errors) ====
|
|
class C {
|
|
}
|
|
|
|
var c: C;
|
|
var o: {} = c;
|
|
~
|
|
!!! error TS2454: Variable 'c' is used before being assigned.
|
|
c = 1;
|
|
c = { foo: '' }
|
|
c = () => { }
|
|
|
|
class D {
|
|
constructor() {
|
|
return 1;
|
|
}
|
|
}
|
|
|
|
var d: D;
|
|
var o: {} = d;
|
|
~
|
|
!!! error TS2454: Variable 'd' is used before being assigned.
|
|
d = 1;
|
|
d = { foo: '' }
|
|
d = () => { } |