# How to Override Property Type In Derived Interfaces

Sometimes, an interface is created that the wrong datatype for a property.  
This can be because the interface is from a third-party or because you are composing a more specific interface type and need to swap out more generic properties of the base type.

Taken from here: <span data-annotation-inline-node="true" data-annotation-mark="true" data-card-url="https://bobbyhadz.com/blog/typescript-override-interface-property" data-inline-card="true" data-renderer-start-pos="273">[https://bobbyhadz.com/blog/typescript-override-interface-property](https://bobbyhadz.com/blog/typescript-override-interface-property)</span>

Since TypeScript is compiled to javascript, it includes a utility, called Omit, that can do the type swapping work during compilation. An Omit declaration replaces the standard extends declaration of the interface by including a list of properties to be left out.

The Omit utility type constructs a new type by removing the specified keys (as a pipe-delimited list) from the existing type.

Here is an example base interface, and a derived interface, using Omit, to change the data types of the base:

[![image.png](https://wiki.galaxydump.com/uploads/images/gallery/2025-02/scaled-1680-/EiQ46KSyLqwFc3lA-image.png)](https://wiki.galaxydump.com/uploads/images/gallery/2025-02/EiQ46KSyLqwFc3lA-image.png)