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

Function struct

packages/effect/src/SchemaAST.ts:2441–2454  ·  view source on GitHub ↗
(
  fields: Fields,
  checks: Checks | undefined,
  annotations?: Schema.Annotations.Annotations
)

Source from the content-addressed store, hash-verified

2439
2440/** @internal */
2441export function struct<Fields extends Schema.Struct.Fields>(
2442 fields: Fields,
2443 checks: Checks | undefined,
2444 annotations?: Schema.Annotations.Annotations
2445): Objects {
2446 return new Objects(
2447 Reflect.ownKeys(fields).map((key) => {
2448 return new PropertySignature(key, fields[key].ast)
2449 }),
2450 [],
2451 annotations,
2452 checks
2453 )
2454}
2455
2456/** @internal */
2457export function getAST<S extends { readonly ast: AST }>(self: S): S["ast"] {

Callers

nothing calls this directly

Calls 1

mapMethod · 0.45

Tested by

no test coverage detected