@amar4enko/effect-schema-compiler
v0.1.6
Published
Attempt at ergonomic effect/Schema compiler
Downloads
192
Readme
@amar4enko/effect-schema-compiler
Attempt at ergonomic effect/Schema compiler
Installation
bun add @amar4enko/effect-schema-compilerconst compiler = Compiler.make<Result, Context>()
.rule(hasReference, ({ referenceId, propertySignatures }, go, context) => {
//...
})
.rule(isUnionWithUndefined, ({ type }, go, context) => {
//...
})
const result = yield* compiler.compile(MySchema.ast, initialContext)Rationale
Working with effect/Schema AST is non-trivial to say the least.
I've put this library together after spending some time on writing code compiling schemas to Confluence docs, other language types etc.
It doesn't automagically weave the need to understand AST, yet provides some nice-to-haves when working with it.
