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

Function record

packages/effect/src/SchemaAST.ts:3619–3625  ·  view source on GitHub ↗
(key: AST, value: AST)

Source from the content-addressed store, hash-verified

3617
3618/** @internal */
3619export function record(key: AST, value: AST): Objects {
3620 const { literals, parameters: indexSignatures } = parseParameter(key)
3621 return new Objects(
3622 literals.map((literal) => new PropertySignature(literal, value)),
3623 indexSignatures.map((parameter) => new IndexSignature(parameter, value))
3624 )
3625}
3626
3627// -------------------------------------------------------------------------------------
3628// Public APIs

Callers

nothing calls this directly

Calls 2

parseParameterFunction · 0.85
mapMethod · 0.45

Tested by

no test coverage detected