First Type
type NobDeveloper = {
name: string;
};
Second Type [Intersection]
type JuniorDeveloper = NobDeveloper & {
expertise: string;
experience: number;
};
[Union]
const newDeveloper: NobDeveloper | JuniorDeveloper = {
name: "Tom Holand",
expertise: "JS",
experience: 5,
};
Top comments (0)