Skip to content

v0.8.0

Latest

Choose a tag to compare

@github-actions github-actions released this 08 Apr 12:12
  • feat: 🎸 extract s.coerce into standalone opt-in module (20329ad)

BREAKING CHANGE

  • 🧨 Move the coerce implementation from src/index.ts into a new
    src/coerce.ts side-effect module, matching the pattern ofstring.ts /
    number.ts / array.ts. s.coerce is an empty object by default — methods
    are only availableafter importing the coerce module: import
    '@esmj/schema/coerce'; // side-effect only import { s } from
    '@esmj/schema/coerce'; // re-exports index.ts import { s } from
    '@esmj/schema/full'; // includes all modulesWithout this import,
    calling any s.coerce method throws at runtime.TypeScript enforces this
    through the empty CoerceInterface./