MCPcopy Index your code
hub / github.com/Effect-TS/effect / getASTConstraints

Function getASTConstraints

packages/effect/src/Arbitrary.ts:345–353  ·  view source on GitHub ↗
(ast: SchemaAST.AST)

Source from the content-addressed store, hash-verified

343const getArbitraryAnnotation = SchemaAST.getAnnotation<ArbitraryAnnotation<any, any>>(SchemaAST.ArbitraryAnnotationId)
344
345const getASTConstraints = (ast: SchemaAST.AST) => {
346 const TypeAnnotationId = ast.annotations[SchemaAST.SchemaIdAnnotationId]
347 if (Predicate.isPropertyKey(TypeAnnotationId)) {
348 const out = ast.annotations[TypeAnnotationId]
349 if (Predicate.isReadonlyRecord(out)) {
350 return out
351 }
352 }
353}
354
355const idMemoMap = globalValue(
356 Symbol.for("effect/Arbitrary/IdMemoMap"),

Callers 1

Arbitrary.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected