type-level-typescript-workshop
type-level-typescript-workshop copied to clipboard
Interactive exercises to get familiar with TypeScript's most advanced features
I added a simpler solution to the XOR gate problem, along with an alternative
The solutions file has them in a different order (apparently, more proper to their difficulties). https://github.com/gvergnaud/type-level-typescript-workshop/blob/cc7c360e6be62b9a2e6306b8eb49f887314e857c/04-template-literal-types/exercises.ts#L50-L51 https://github.com/gvergnaud/type-level-typescript-workshop/blob/cc7c360e6be62b9a2e6306b8eb49f887314e857c/04-template-literal-types/solution.ts#L50-L51
```ts type XOR = TODO ``` https://github.com/gvergnaud/type-level-typescript-workshop/blob/a2234bea76dbbc4b97c074e1b1c40e08f6c7529e/02-assignability-and-conditional-types/exercises.ts#L140 https://github.com/gvergnaud/type-level-typescript-workshop/blob/a2234bea76dbbc4b97c074e1b1c40e08f6c7529e/02-assignability-and-conditional-types/solution.ts#L131 alternative solution ```ts type XOR = bool1 extends bool2? false: true; ```