MCPcopy Create free account
hub / github.com/Effect-TS/effect / assertInstanceOf

Function assertInstanceOf

packages/effect/test/utils/assert.ts:62–69  ·  view source on GitHub ↗
(
  value: unknown,
  constructor: C,
  message?: string,
  ..._: Array<never>
)

Source from the content-addressed store, hash-verified

60 * Asserts that `value` is an instance of `constructor`.
61 */
62export function assertInstanceOf<C extends new(...args: any) => any>(
63 value: unknown,
64 constructor: C,
65 message?: string,
66 ..._: Array<never>
67): asserts value is InstanceType<C> {
68 vassert.instanceOf(value, constructor, message)
69}
70
71export function assertTrue(self: unknown, message?: string, ..._: Array<never>): asserts self {
72 strictEqual(self, true, message)

Callers 5

Url.test.tsFile · 0.90
assertSchemaIssueErrorFunction · 0.70
throwsFunction · 0.70

Calls

no outgoing calls

Tested by 1