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

Function isOverrideAnnotation

packages/effect/src/JSONSchema.ts:542–550  ·  view source on GitHub ↗
(ast: AST.AST, jsonSchema: JsonSchema7)

Source from the content-addressed store, hash-verified

540 ast.annotations[AST.SchemaIdAnnotationId] === AST.ParseJsonSchemaId
541
542const isOverrideAnnotation = (ast: AST.AST, jsonSchema: JsonSchema7): boolean => {
543 if (AST.isRefinement(ast)) {
544 const schemaId = ast.annotations[AST.SchemaIdAnnotationId]
545 if (schemaId === schemaId_.IntSchemaId) {
546 return "type" in jsonSchema && jsonSchema.type !== "integer"
547 }
548 }
549 return ("type" in jsonSchema) || ("oneOf" in jsonSchema) || ("anyOf" in jsonSchema) || ("$ref" in jsonSchema)
550}
551
552const mergeRefinements = (from: any, jsonSchema: any, ast: AST.AST): any => {
553 const out: any = { ...from, ...getJsonSchemaAnnotations(ast), ...jsonSchema }

Callers 1

goFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected