#Need help with Auto completion in Generics

3 messages · Page 1 of 1 (latest)

wooden mirageBOT
#

@knotty mantle Here's a shortened URL of your playground link! You can remove the full link from your message.

im_okay#0

Preview:```ts
const Fruits = {
APPLE: "APPLE",
MANGO: "MANGO",
WATERMELON: "WATERMELON",
} as const

type Keyof<T extends {}> = Extract<keyof T, string>

type FruitsType = typeof Fruits[keyof typeof Fruits]
type FruitKeys = Keyof<t
...```

knotty mantle
#

the return type is correct when I pass those fruits as generics
however, the generics won't be auto suggseted