TypeScript/tests/baselines/reference/indexer2.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

20 lines
1.2 KiB
Plaintext

tests/cases/compiler/indexer2.ts(6,25): error TS2352: Neither type '{ [x: number]: undefined; }' nor type 'IDirectChildrenMap' is assignable to the other.
Types of property 'hasOwnProperty' are incompatible.
Type '(v: string) => boolean' is not assignable to type '(objectId: number) => boolean'.
Types of parameters 'v' and 'objectId' are incompatible.
Type 'string' is not assignable to type 'number'.
==== tests/cases/compiler/indexer2.ts (1 errors) ====
interface IHeapObjectProperty {}
interface IDirectChildrenMap {
hasOwnProperty(objectId: number) : boolean;
[objectId: number] : IHeapObjectProperty[];
}
var directChildrenMap = <IDirectChildrenMap>{};
~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2352: Neither type '{ [x: number]: undefined; }' nor type 'IDirectChildrenMap' is assignable to the other.
!!! error TS2352: Types of property 'hasOwnProperty' are incompatible.
!!! error TS2352: Type '(v: string) => boolean' is not assignable to type '(objectId: number) => boolean'.
!!! error TS2352: Types of parameters 'v' and 'objectId' are incompatible.
!!! error TS2352: Type 'string' is not assignable to type 'number'.