boolean()

Define a boolean type


Usage

User.js
import { Model } from 'pinia-orm'class User extends Model {  static entity = 'users'  static fields () {    return {      id: this.number(0),      published: this.boolean(false)    }  }}

With Decorator

User.ts
import { Model } from 'pinia-orm'import { Bool, Num } from 'pinia-orm/dist/decorators'class User extends Model {  static entity = 'users'    @Num(0) declare id: number  @Bool(false) declare published: boolean}

Typescript Declarations

function boolean(value: boolean | null): Bool