Skip to content

__nullable__ vs Type.Optional #33

@daedalus28

Description

@daedalus28

Why does prismabox generate types with __nullable__ instead of just Type.Optional? I see there is generator for Type.Optional, but it isn't being used.

For a model with a field like this:

name String?

I am getting this:

name: __nullable__(Type.String({ additionalProperties: false })),

Where as I would expect

name: Type.Optional(Type.String()),

Also - this might be a separate issue, by why would prismabox add { additionalProperties: false } to scalar values like strings and numbers?

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