Skip to content

🆕 What's New in v4 ​

v4 adds TypeScript support directly into the existing drea package. There is no separate edition to install — TypeScript users get types automatically on npm install drea@4.

AreaBefore v4v4
TypeScript typesNot includedBundled — import { ... } from 'drea' just works
Type-narrowing guardsNot availableasserts value is T on every guard
Generic modelsNot availablevalidate<T> / nestvalidate<T> — result type inferred from input
File validationNot available__File() wrapper — prevents nestvalidate recursing into File objects
Guard systemManual null/type checks per functionDedicated named guard on every public surface
Error descriptionsInconsistentAlways "Expected X for 'paramName', got Y"