Skip to content

Booleans should not be optional #140

@petermakeswebsites

Description

@petermakeswebsites

Describe the bug

AFAIK booleans cannot be optional in Pocketbase's SQL, they are either true or false never null or undefined. If this is so, then this output needs to be changed from this:

export type AnimalsRecord = {
	big?: boolean
}

to this:

export type AnimalsRecord = {
	big: boolean
}

to save extra unnecessary type guards.

Versions
pocketbase-typegen version: 1.3.1
pocketbase version: 0.30.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions