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

Implement support for computed names

jim-lub opened this issue · comments

commented

Example:

export enum Kind {
  Aad = "Aad",
  Fred = "Fred",
}

export interface Data {
  d: Document<Kind.Aad>
  collection: {
    [Kind.Aad]: Document<Kind.Aad>
  }
}

export type Document<T extends Kind> = {
  kind: T
}

Error:

    S146: No support for computed names [Kind.Aad]

    8   collection: {

    9     [Kind.Aad]: Document<Kind.Aad>
      ~~~~~~~~~~~~~~

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