phero-hq / phero

Full-stack type-safety with pure TypeScript

Home Page:https://phero.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Go through conditional types when extracting models

jim-lub opened this issue · comments

commented

When extracting models we don't go through conditional types.

export type Document<T> = T extends Kind.Aad
  ? {
      kind: Kind.Aad
      color: string
    }
  : T extends Kind.Fred
  ? {
      kind: Kind.Fred
    }
  : never

We get the error:

messageText: "Return type of exported function has or is using private name 'Kind'.",

With the release of v0.10.0 this should be fixed. Closing this ticket. Please reopen if you still encounter issues.