Skip to content

v0.8.0

Compare
Choose a tag to compare
@kettanaito kettanaito released this 17 Nov 12:28
· 59 commits to main since this release

Features

  • Supports nullable properties (#143).
import { factory, primaryKey, nullable } from '@mswjs/data'

const db = factory({
  user: {
    id: primaryKey(String),
    firstName: String,
    age: nullable(Number)
  }
})

db.create({ firstName: null }) // TypeError
db.create({ age: null }) // OK!