<!-- BUGS: Please use this template. --> <!-- QUESTIONS: This is not a general support forum! Ask Qs at http://stackoverflow.com/questions/tagged/typescript --> <!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md --> Based on [this comment](https://github.com/Microsoft/TypeScript/issues/10575#issuecomment-242919644) TypeScript does not allow exclusive union types. I'm proposing a logical or operator similar to union (`|`) or intersection (`&`) operators that allows defining types that are one or another. **Code** ```ts type Person = { name: string; } ^ { firstname: string; lastname: string; }; const p1: Person = { name: "Foo" }; const p2: Person = { firstname: "Foo", lastname: "Bar" } ; const bad1: Person = { name: "Foo", lastname: "Bar" } ~~~~~~~~~~~~~~~ Type Person can not have name and firstname together const bad2: Person = { lastname: "Bar", name: "Foo" } ~~~~~~~~~~~ Type Person can not have lastname and name together ``` For literal and primitive types it should behave like union type: ```ts // These are the same type stringOrNumber = string | number; type stringORNumber = string ^ number; ```