2014-11-05 21:26:03 +01:00
tests/cases/compiler/optionalParamTypeComparison.ts(4,1): error TS2322: Type '(s: string, b?: boolean) => void' is not assignable to type '(s: string, n?: number) => void'.
2014-10-28 08:28:59 +01:00
Types of parameters 'b' and 'n' are incompatible.
2014-09-12 22:35:07 +02:00
Type 'boolean' is not assignable to type 'number'.
2014-11-05 21:26:03 +01:00
tests/cases/compiler/optionalParamTypeComparison.ts(5,1): error TS2322: Type '(s: string, n?: number) => void' is not assignable to type '(s: string, b?: boolean) => void'.
2014-10-28 08:28:59 +01:00
Types of parameters 'n' and 'b' are incompatible.
2014-09-12 22:35:07 +02:00
Type 'number' is not assignable to type 'boolean'.
2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/optionalParamTypeComparison.ts (2 errors) ====
var f: (s: string, n?: number) => void;
var g: (s: string, b?: boolean) => void;
f = g;
~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type '(s: string, b?: boolean) => void' is not assignable to type '(s: string, n?: number) => void'.
!!! error TS2322: Types of parameters 'b' and 'n' are incompatible.
!!! error TS2322: Type 'boolean' is not assignable to type 'number'.
2014-07-13 01:04:16 +02:00
g = f;
~
2014-11-05 21:26:03 +01:00
!!! error TS2322: Type '(s: string, n?: number) => void' is not assignable to type '(s: string, b?: boolean) => void'.
!!! error TS2322: Types of parameters 'n' and 'b' are incompatible.
!!! error TS2322: Type 'number' is not assignable to type 'boolean'.