TypeScript/tests/baselines/reference/optionalParamTypeComparison.errors.txt
Daniel Rosenwasser 6e77e2e810 Removed colons from diagnostic messages.
Also got rid of the 'terminalMessages' concept.
2014-10-28 00:48:58 -07:00

22 lines
No EOL
1.3 KiB
Text

tests/cases/compiler/optionalParamTypeComparison.ts(4,1): error TS2323: Type '(s: string, b?: boolean) => void' is not assignable to type '(s: string, n?: number) => void'.
Types of parameters 'b' and 'n' are incompatible.
Type 'boolean' is not assignable to type 'number'.
tests/cases/compiler/optionalParamTypeComparison.ts(5,1): error TS2323: Type '(s: string, n?: number) => void' is not assignable to type '(s: string, b?: boolean) => void'.
Types of parameters 'n' and 'b' are incompatible.
Type 'number' is not assignable to type 'boolean'.
==== tests/cases/compiler/optionalParamTypeComparison.ts (2 errors) ====
var f: (s: string, n?: number) => void;
var g: (s: string, b?: boolean) => void;
f = g;
~
!!! error TS2323: Type '(s: string, b?: boolean) => void' is not assignable to type '(s: string, n?: number) => void'.
!!! error TS2323: Types of parameters 'b' and 'n' are incompatible.
!!! error TS2323: Type 'boolean' is not assignable to type 'number'.
g = f;
~
!!! error TS2323: Type '(s: string, n?: number) => void' is not assignable to type '(s: string, b?: boolean) => void'.
!!! error TS2323: Types of parameters 'n' and 'b' are incompatible.
!!! error TS2323: Type 'number' is not assignable to type 'boolean'.