Files
zopu-code/repos/effect/.changeset/schema-as-class.md

334 B

effect
effect
patch

Schema: add asClass API to turn any schema into a class with static method support.

Example

import { Schema } from "effect"

class MyString extends Schema.asClass(Schema.String) {
  static readonly decodeUnknownSync = Schema.decodeUnknownSync(this)
}

MyString.decodeUnknownSync("a") // "a"