CONTACT US

    Interface vs Type alias in TypeScript 2.7

    A warrior holding two blue lightsabres stands between the words interface in blue and Type alias in red, with VS above him and the TypeScript (TS) 2.7 logo below.
    • You cannot use implements on a class with type alias if you use union operator within your type definition.
    • You cannot use extends on an interface with type alias if you use union operator within your type definition.
    • Declaration merging doesn’t work with type alias.

    Article link copied

    Close button