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

Function mergeSignatureAnnotations

packages/effect/src/Schema.ts:1815–1841  ·  view source on GitHub ↗
(
  ast: PropertySignature.AST,
  annotations: AST.Annotations
)

Source from the content-addressed store, hash-verified

1813}
1814
1815const mergeSignatureAnnotations = (
1816 ast: PropertySignature.AST,
1817 annotations: AST.Annotations
1818): PropertySignature.AST => {
1819 switch (ast._tag) {
1820 case "PropertySignatureDeclaration": {
1821 return new PropertySignatureDeclaration(
1822 ast.type,
1823 ast.isOptional,
1824 ast.isReadonly,
1825 { ...ast.annotations, ...annotations },
1826 ast.defaultValue
1827 )
1828 }
1829 case "PropertySignatureTransformation": {
1830 return new PropertySignatureTransformation(
1831 ast.from,
1832 new ToPropertySignature(ast.to.type, ast.to.isOptional, ast.to.isReadonly, {
1833 ...ast.to.annotations,
1834 ...annotations
1835 }, ast.to.defaultValue),
1836 ast.decode,
1837 ast.encode
1838 )
1839 }
1840 }
1841}
1842
1843/**
1844 * @since 3.10.0

Callers 2

annotationsMethod · 0.85
annotationsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected