MCPcopy
hub / github.com/Effect-TS/effect / makeRecordClass

Function makeRecordClass

packages/effect/src/Schema.ts:3038–3054  ·  view source on GitHub ↗
(
  key: K,
  value: V,
  ast?: AST.AST
)

Source from the content-addressed store, hash-verified

3036}
3037
3038function makeRecordClass<K extends Schema.All, V extends Schema.All>(
3039 key: K,
3040 value: V,
3041 ast?: AST.AST
3042): Record$<K, V> {
3043 return class RecordClass extends makeTypeLiteralClass({}, [{ key, value }], ast) {
3044 static override annotations(
3045 annotations: Annotations.Schema<{ readonly [P in Schema.Type<K>]: Schema.Type<V> }>
3046 ): Record$<K, V> {
3047 return makeRecordClass(key, value, mergeSchemaAnnotations(this.ast, annotations))
3048 }
3049
3050 static key = key
3051
3052 static value = value
3053 }
3054}
3055
3056/**
3057 * @category constructors

Callers 2

annotationsMethod · 0.85
RecordFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected