Meta tweaks

This commit is contained in:
Sindre Sorhus 2020-01-22 18:47:01 +07:00
parent 0c3f110386
commit 11003b925e
4 changed files with 386 additions and 146 deletions

View file

@ -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)}\`.`);
}
};