No errors here:
type RegionId = string;
type RegionName = string;
type Region = {
id: RegionId,
name: RegionName
};
type Regions = {
[RegionId]: Region
};
const regionId: RegionId = 'region_id';
const region: Regions = {
[regionId]: {
banana: 500
}
};
Yeah this is a known problem with computed indexer properties; we currently treat them as any. This is definitely on my radar though!
consolidating this with https://github.com/facebook/flow/issues/7392
Most helpful comment
Yeah this is a known problem with computed indexer properties; we currently treat them as
any. This is definitely on my radar though!