MCPcopy Index your code
hub / github.com/Effect-TS/effect / succeed

Function succeed

packages/effect/test/Schema/SchemaTest.ts:67–74  ·  view source on GitHub ↗

* Ensures that the given constructor produces the expected value.

(
        // Destructure to verify that "this" type is bound
        { make }: { readonly make: (a: A) => B },
        input: A,
        expected?: B
      )

Source from the content-addressed store, hash-verified

65 * Ensures that the given constructor produces the expected value.
66 */
67 succeed<const A, const B>(
68 // Destructure to verify that "this" type is bound
69 { make }: { readonly make: (a: A) => B },
70 input: A,
71 expected?: B
72 ) {
73 deepStrictEqual(make(input), expected ?? input)
74 },
75
76 /**
77 * Ensures that the given constructor throws the expected error.

Callers

nothing calls this directly

Calls 3

eitherMethod · 0.80
deepStrictEqualFunction · 0.50
makeFunction · 0.50

Tested by

no test coverage detected