class One {
controls: { [key: string]: number };
}
interface Two<T> extends One {
controls: { [key in keyof T]: number }
}
An error is showing:
TS2430: Interface 'Two' incorrectly extends interface 'One'. Types of property 'controls' are incompatible. Type '{ [key in keyof T]: number; }' is not assignable to type '{ [key: string]: number; }'
In TypeScript playground (click), everything appears to be working correctly. What could be the issue?
TypeScript version: 2.4.2