Civet
Civet copied to clipboard
Declaration assertions
It would be neat to unify pattern matching pins with declaration assertions similar to how Elixir does it: https://elixir-lang.org/getting-started/pattern-matching.html#the-pin-operator
{x, ^y} := z
---
assert(z.y === y, `z.y not equal to y ${z.y} !== ${y}`)
const {x} = z