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

Method constructor

packages/effect/src/SchemaAST.ts:3069–3081  ·  view source on GitHub ↗
(
    thunk: () => AST,
    annotations?: Schema.Annotations.Annotations,
    checks?: Checks,
    encoding?: Encoding,
    context?: Context
  )

Source from the content-addressed store, hash-verified

3067 readonly thunk: () => AST
3068
3069 constructor(
3070 thunk: () => AST,
3071 annotations?: Schema.Annotations.Annotations,
3072 checks?: Checks,
3073 encoding?: Encoding,
3074 context?: Context
3075 ) {
3076 if (checks) {
3077 throw new Error("Cannot add checks to Suspend")
3078 }
3079 super(annotations, undefined, encoding, context)
3080 this.thunk = memoizeThunk(thunk)
3081 }
3082 /** @internal */
3083 getParser(compile: SchemaParser.Compiler): SchemaParser.Parser {
3084 let parser: SchemaParser.Parser

Callers

nothing calls this directly

Calls 1

memoizeThunkFunction · 0.85

Tested by

no test coverage detected