TypeScript Version: 2.2.1
Code
// helpers to map types
type Dictionary = {
[key: string]: string;
};
interface IBaseEntity {
name: string;
properties: Dictionary;
}
interface IEntity<t> extends IBaseEntity {
properties: Record<t, string>;
}
Expected behaviour:
No Compile error.
Actual behaviour:
Compile error:
Interface 'IEntity<t>' incorrectly extends interface 'IBaseEntity'.
Types of property 'properties' are incompatible.
Type 'Record<t, string>' is not assignable to type 'Dictionary'.
Edit: Replace StrictDictionary with Record<t, string>. Show full compile error.
TypeScript Version: 2.2.1
Code
Expected behaviour:
No Compile error.
Actual behaviour:
Compile error:
Edit: Replace StrictDictionary with Record<t, string>. Show full compile error.