Skip to content

2.2.1 Insiders Index signature is missing in type '{}'.' #14136

Description

@mjbvz

TypeScript Version: 2.2.1-insiders.2017.0217

{
    "compilerOptions": {
        "strictNullChecks": true
    }
}
const test: { [kind: string]: string } = Object.create(null); 

Expected behavior:
In previous 2.2.1 02/09 insiders, this was not an error. It also worked without an error in TS 2.1.6

Actual behavior:
Error:

file: 'file:///Users/matb/projects/sand/box.ts'
severity: 'Error'
message: 'Type 'object' is not assignable to type '{ [kind: string]: string; }'.
  Index signature is missing in type '{}'.'
at: '2,7'
source: 'ts'

Metadata

Metadata

Assignees

Labels

FixedA PR has been merged for this issueHigh PriorityVS Code TrackedThere is a VS Code equivalent to this issue

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions