Skip to content
Source
Sign inSign up
TanStack/router
Open History to see the last commit

invariant.ts

5 lines150 Bytes

1export function invariant(value: unknown, message?: string): asserts value {
2 if (!value) {
3 throw new Error(message ?? 'Invariant failed')
4 }
5}