zlacker

[parent] [thread] 0 comments
1. ramon1+(OP)[view] [source] 2025-12-03 23:10:07
We actually use this version of never a lot in our code at $WORK

```

export function never(message?: string): never {

  throw new Error(message ?? 'Reached an impossible state');
}

const [foo = never()] = dbQueryThatReturnsOne();

```

I guess it's en par with .unwrap()

[go to top]