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

Function optional

packages/effect/src/Schema.ts:2542–2547  ·  view source on GitHub ↗
(self: S)

Source from the content-addressed store, hash-verified

2540 * @since 3.10.0
2541 */
2542export const optional = <S extends Schema.All>(self: S): optional<S> => {
2543 const ast = self.ast === AST.undefinedKeyword || self.ast === AST.neverKeyword
2544 ? AST.undefinedKeyword
2545 : UndefinedOr(self).ast
2546 return new PropertySignatureWithFromImpl(new PropertySignatureDeclaration(ast, true, true, {}, undefined), self)
2547}
2548
2549/**
2550 * @category PropertySignature

Callers

nothing calls this directly

Calls 1

UndefinedOrFunction · 0.70

Tested by

no test coverage detected