2014-09-12 22:35:07 +02:00
tests/cases/compiler/indexer2A.ts(4,5): error TS2391: Function implementation is missing or not immediately following the declaration.
2014-10-28 08:28:59 +01:00
tests/cases/compiler/indexer2A.ts(7,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.
2014-10-13 15:56:58 +02:00
Type 'string' is not assignable to type 'number'.
2014-09-12 22:35:07 +02:00
2014-10-13 15:56:58 +02:00
==== tests/cases/compiler/indexer2A.ts (2 errors) ====
2014-07-13 01:04:16 +02:00
class IHeapObjectProperty { }
class IDirectChildrenMap {
// Decided to enforce a semicolon after declarations
hasOwnProperty(objectId: number): boolean
2014-07-31 01:27:13 +02:00
~~~~~~~~~~~~~~
2014-09-12 00:19:57 +02:00
!!! error TS2391: Function implementation is missing or not immediately following the declaration.
2014-07-13 01:04:16 +02:00
[objectId: number]: IHeapObjectProperty[]
}
2014-10-13 15:56:58 +02:00
var directChildrenMap = <IDirectChildrenMap>{};
~~~~~~~~~~~~~~~~~~~~~~
2014-10-28 08:28:59 +01:00
!!! 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'.