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, Num, Bool } from 'pinia-orm'class User extends Model {  static entity = 'users'    @Num(0) id!: number  @Bool(false) published!: boolean}

Typescript Declarations

function boolean(value: boolean | null): Bool