Removed conditional params, added exchange->factory record

This commit is contained in:
lomonoshka
2023-08-09 13:19:05 +03:00
parent 994d766391
commit f64738ec6a
3 changed files with 38 additions and 24 deletions

View File

@@ -52,7 +52,7 @@ export function safeGet<V>(obj: Partial<Record<string, V>>, key: string, errorMe
const prefix = 'Requirement not met';
export default function must(condition: unknown, message?: string | (() => string)): asserts condition {
export function must(condition: unknown, message?: string | (() => string)): asserts condition {
if (condition) return;
const provided = typeof message === 'function' ? message() : message;
const value = provided ? `${prefix}: ${provided}` : prefix;