Typescript recipes
Add any properties to an interface
By default, interfaces not allows other properties that those specified.
You can however allow custom properties by using the [key: string]: any; in an interface
Dynamic property name
You can also extend an existing interface
Original interface
Extend interface
Override interface
You can also override an interface by replacing the way a given prop is defined
Ask typescript to ignore an error
Object vs object vs {}
Last updated