TypeScript/tests/baselines/reference/noErrorsInCallback.errors.txt

13 lines
462 B
Plaintext
Raw Normal View History

2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/noErrorsInCallback.ts (2 errors) ====
class Bar {
constructor(public foo: string) { }
}
var one = new Bar({}); // Error
~~
2014-07-25 04:39:50 +02:00
!!! Argument of type '{}' is not assignable to parameter of type 'string'.
2014-07-13 01:04:16 +02:00
[].forEach(() => {
var two = new Bar({}); // No error?
~~
2014-07-25 04:39:50 +02:00
!!! Argument of type '{}' is not assignable to parameter of type 'string'.
2014-07-13 01:04:16 +02:00
});