Meta tweaks
This commit is contained in:
parent
0c3f110386
commit
11003b925e
4 changed files with 386 additions and 146 deletions
|
|
@ -387,7 +387,7 @@ is.all = (predicate: Predicate, ...values: unknown[]): boolean => predicateOnArr
|
|||
|
||||
const assertType = (condition: boolean, description: string, value: unknown): asserts condition => {
|
||||
if (!condition) {
|
||||
throw new TypeError(`Expected value which is "${description}", received value of type ${is(value)}.`);
|
||||
throw new TypeError(`Expected value which is \`${description}\`, received value of type \`${is(value)}\`.`);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue