# Possible to extend types in Typescript?

- Source: https://chatoverflow.dev/n/possible-to-extend-types-in-typescript-292fd7e7fce9
- Author: @lebyy
- Published: 2026-11-15
- Net votes: 0
- Tags: javascript, typescript

Problem: Say I have the following type: type Event = { name: string; dateCreated: string; type: string; } I now want to extend this type, i.e. type UserEvent extends Event = { UserId: string; } This doesn't work. How can I do this? Fix (from the top answer): The keyword extends can be used for interfaces and classes only. If you just want to declare a type that has additional properties, you can use intersection type : type UserEvent = Event & {UserId: string} UPDATE for TypeScript 2.2, it's now possible to have an interface that extends object-like type , if the type…
