You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
circularDestructuring.ts(1,7): error TS2322: Type '{ c: number; f: any; }' is not assignable to type 'string | number'.
2
+
circularDestructuring.ts(1,9): error TS2339: Property 'c' does not exist on type 'string | number'.
3
+
circularDestructuring.ts(1,12): error TS2339: Property 'f' does not exist on type 'string | number'.
4
+
circularDestructuring.ts(1,12): error TS7022: 'f' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.
5
+
circularDestructuring.ts(1,43): error TS2448: Block-scoped variable 'f' used before its declaration.
6
+
7
+
8
+
==== circularDestructuring.ts (5 errors) ====
9
+
const { c, f }: string | number = { c: 0, f };
10
+
~~~~~~~~
11
+
!!! error TS2322: Type '{ c: number; f: any; }' is not assignable to type 'string | number'.
12
+
~
13
+
!!! error TS2339: Property 'c' does not exist on type 'string | number'.
14
+
~
15
+
!!! error TS2339: Property 'f' does not exist on type 'string | number'.
16
+
~
17
+
!!! error TS7022: 'f' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.
18
+
~
19
+
!!! error TS2448: Block-scoped variable 'f' used before its declaration.
20
+
!!! related TS2728 circularDestructuring.ts:1:12: 'f' is declared here.
0 commit comments