I'd like to map
{
"controller-element": { }
}
into an interface but because controller-element has a - I can't simply do
export interface IControllerResponse {
controller-element: any;
}
Just enclose the field name in quotes:
export interface IControllerResponse {
"controller-element": any;
}
const response: IControllerResponse={
"controller-element": 123
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With