#Override property type in child?
1 messages · Page 1 of 1 (latest)
i'm not sure what kind of component you're using, but if it's something class-based then you can just specify foo: number in the child class:
1 messages · Page 1 of 1 (latest)
The parent component defines a property
foo: any;
```I'm extending this component, and I want to specify the type as `number`.
Is there a way to do this without creating another property with a desired type and assigning the parent one to the new one? Thanks.
i'm not sure what kind of component you're using, but if it's something class-based then you can just specify foo: number in the child class: