n8n/packages/editor-ui/src/utils/assert.ts
Tomi Turtiainen aae45b043b
feat: Ado 1296 spike credential setup in templates (#7786)
- Add a 'Setup template credentials' view to setup the credentials of a
template before it is created
2023-11-27 16:30:28 +02:00

9 lines
191 B
TypeScript

/**
* Asserts given condition
*/
export function assert(condition: unknown, message?: string): asserts condition {
if (!condition) {
throw new Error(message ?? 'Assertion failed');
}
}