Skip to content

[Feature Request] Augmenting the generated strongly typed JSONs #2350

@Kylyi

Description

@Kylyi

Similar to prisma-json-types-generated, I would like to augment the generated types to achieve proper type-safety when querying the data.

Example

zmodel

type Ruler {
  orientation String
  property1   String?
  property2   Json?
}

The "real" type

type IRulerLtr = {
  orientation: 'ltr'
  property1: string
}

type IRulerRtl = {
  orientation: 'rtl'
  property2: string | number
}

type IRuler = IRulerLtr | IRulerRtl

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions