3 ms·
I ran into this exact issue when I was working on a piece of typescript that interoperates with a rust server, here's how I was able to do exhaustiveness checki
by smj-edison 3y ago
I ran into this exact issue when I was working on a piece of typescript that interoperates with a rust server, here's how I was able to do exhaustiveness checking (the errors aren't the prettiest, but it works): https://github.com/wwtos/mjuo/blob/main/vpo-frontend/src/lib/util/discriminated-union.ts https://github.com/wwtos/mjuo/blob/main/vpo-frontend/src/lib...
EDIT: and an example of usage: https://github.com/wwtos/mjuo/blob/ca8c514185c1b5bb22aec752a4c41da0a50dcd4d/vpo-frontend/src/routes/node_editor/Node.svelte#L58 https://github.com/wwtos/mjuo/blob/ca8c514185c1b5bb22aec752a...