Skip to content

Incorrect use of Map type #11

@rintaun

Description

@rintaun

Problem

There are a number of types defined using Map<K, V>, but they are not actually instances of Map, which leads to type warnings such as:

Element implicitly has an 'any' type because type 'Map<string, Error[]>' has no index signature. Did you mean to call 'get' ?

Solution

As far as I can tell, these are all plain objects, so Map<K, V> should be replaced with Record<K, V>

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions