Elm is a purely functional statically typed language compiled to JS. Among other great features of Elm, there are two outstanding core ones - Sum types and Pattern matching.
Pattern matching in Elm allows pattern match over one, many or nested sum types with full type safety. The talk will be about how much from Elm can be replicated in TypeScript, we will go through exhaustive switch statement, making sums by disjoint unions, and finally we will try to replicate pattern matching by advanced type trickery with mapped, conditional, and even template literal types.
Maciej Sikora - an old-timer, has worked in many stacks and languages in the backend, frontend, and mobile. Currently working as a full-stack developer where he switches between Python and TypeScript.
This talk has been recorded during TypeScript Berlin Meetup #5. Join our TypeScript Berlin Meetup group here: https://www.meetup.com/TypeScript-Berlin
Learn more about Prisma: ◭ Website: https://www.prisma.io ◭ Docs: https://www.prisma.io/docs ◭ Quickstart: https://www.prisma.io/docs/getting-started/quickstart-typescript