( condition: boolean, message: string, Err: any = Error )
| 12 | } from '#packages/intl/types.js' |
| 13 | |
| 14 | export function invariant( |
| 15 | condition: boolean, |
| 16 | message: string, |
| 17 | Err: any = Error |
| 18 | ): asserts condition { |
| 19 | if (!condition) { |
| 20 | throw new Err(message) |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | export function filterProps<T extends Record<string, any>, K extends string>( |
| 25 | props: T, |