MCPcopy
hub / github.com/sindresorhus/is / typeErrorMessage

Function typeErrorMessage

source/index.ts:999–1001  ·  view source on GitHub ↗
(description: AssertionTypeDescription, value: unknown)

Source from the content-addressed store, hash-verified

997}
998
999function typeErrorMessage(description: AssertionTypeDescription, value: unknown): string {
1000 return `Expected value which is \`${description}\`, received value of type \`${is(value)}\`.`;
1001}
1002
1003function typeErrorMessageNot(description: AssertionTypeDescription, value: unknown): string {
1004 return `Expected value which is not \`${description}\`, received value of type \`${is(value)}\`.`;

Callers 15

assertArrayFunction · 0.85
assertArrayBufferFunction · 0.85
assertArrayLikeFunction · 0.85
assertAsyncFunctionFunction · 0.85
assertAsyncGeneratorFunction · 0.85
assertAsyncIterableFunction · 0.85
assertBigintFunction · 0.85
assertBigInt64ArrayFunction · 0.85
assertBigUint64ArrayFunction · 0.85
assertBlobFunction · 0.85
assertBooleanFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected