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

Method constructor

packages/effect/src/SchemaAST.ts:2097–2116  ·  view source on GitHub ↗
(
    propertySignatures: ReadonlyArray<PropertySignature>,
    indexSignatures: ReadonlyArray<IndexSignature>,
    annotations?: Schema.Annotations.Annotations,
    checks?: Checks,
    encoding?: Encoding,
    context?: Context,
    encodingChecks?: Checks
  )

Source from the content-addressed store, hash-verified

2095 readonly encodingChecks: Checks | undefined
2096
2097 constructor(
2098 propertySignatures: ReadonlyArray<PropertySignature>,
2099 indexSignatures: ReadonlyArray<IndexSignature>,
2100 annotations?: Schema.Annotations.Annotations,
2101 checks?: Checks,
2102 encoding?: Encoding,
2103 context?: Context,
2104 encodingChecks?: Checks
2105 ) {
2106 super(annotations, checks, encoding, context)
2107 this.propertySignatures = propertySignatures
2108 this.indexSignatures = indexSignatures
2109 this.encodingChecks = encodingChecks
2110
2111 // Duplicate property signatures
2112 const duplicates = propertySignatures.map((ps) => ps.name).filter((name, i, arr) => arr.indexOf(name) !== i)
2113 if (duplicates.length > 0) {
2114 throw new Error(`Duplicate identifiers: ${JSON.stringify(duplicates)}. ts(2300)`)
2115 }
2116 }
2117 /** @internal */
2118 getParser(
2119 compile: SchemaParser.Compiler,

Callers

nothing calls this directly

Calls 2

filterMethod · 0.80
mapMethod · 0.45

Tested by

no test coverage detected