mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
52 lines
3.1 KiB
Diff
52 lines
3.1 KiB
Diff
--- old.controlFlowIterationErrors.errors.txt
|
|
+++ new.controlFlowIterationErrors.errors.txt
|
|
@@= skipped -2, +2 lines =@@
|
|
controlFlowIterationErrors.ts(22,17): error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'string'.
|
|
Type 'number' is not assignable to type 'string'.
|
|
controlFlowIterationErrors.ts(34,17): error TS2769: No overload matches this call.
|
|
- Overload 1 of 2, '(x: string): number', gave the following error.
|
|
- Argument of type 'string | number' is not assignable to parameter of type 'string'.
|
|
- Type 'number' is not assignable to type 'string'.
|
|
- Overload 2 of 2, '(x: number): string', gave the following error.
|
|
+ The last overload gave the following error.
|
|
Argument of type 'string | number' is not assignable to parameter of type 'number'.
|
|
Type 'string' is not assignable to type 'number'.
|
|
controlFlowIterationErrors.ts(45,17): error TS2769: No overload matches this call.
|
|
- Overload 1 of 2, '(x: string): number', gave the following error.
|
|
- Argument of type 'string | number' is not assignable to parameter of type 'string'.
|
|
- Type 'number' is not assignable to type 'string'.
|
|
- Overload 2 of 2, '(x: number): string', gave the following error.
|
|
+ The last overload gave the following error.
|
|
Argument of type 'string | number' is not assignable to parameter of type 'number'.
|
|
Type 'string' is not assignable to type 'number'.
|
|
|
|
@@= skipped -58, +52 lines =@@
|
|
x = foo(x);
|
|
~
|
|
!!! error TS2769: No overload matches this call.
|
|
-!!! error TS2769: Overload 1 of 2, '(x: string): number', gave the following error.
|
|
-!!! error TS2769: Argument of type 'string | number' is not assignable to parameter of type 'string'.
|
|
-!!! error TS2769: Type 'number' is not assignable to type 'string'.
|
|
-!!! error TS2769: Overload 2 of 2, '(x: number): string', gave the following error.
|
|
+!!! error TS2769: The last overload gave the following error.
|
|
!!! error TS2769: Argument of type 'string | number' is not assignable to parameter of type 'number'.
|
|
!!! error TS2769: Type 'string' is not assignable to type 'number'.
|
|
+!!! related TS2771 controlFlowIterationErrors.ts:28:18: The last overload is declared here.
|
|
x;
|
|
}
|
|
x;
|
|
@@= skipped -19, +17 lines =@@
|
|
x = foo(x);
|
|
~
|
|
!!! error TS2769: No overload matches this call.
|
|
-!!! error TS2769: Overload 1 of 2, '(x: string): number', gave the following error.
|
|
-!!! error TS2769: Argument of type 'string | number' is not assignable to parameter of type 'string'.
|
|
-!!! error TS2769: Type 'number' is not assignable to type 'string'.
|
|
-!!! error TS2769: Overload 2 of 2, '(x: number): string', gave the following error.
|
|
+!!! error TS2769: The last overload gave the following error.
|
|
!!! error TS2769: Argument of type 'string | number' is not assignable to parameter of type 'number'.
|
|
!!! error TS2769: Type 'string' is not assignable to type 'number'.
|
|
+!!! related TS2771 controlFlowIterationErrors.ts:28:18: The last overload is declared here.
|
|
}
|
|
x;
|
|
}
|