so i have a function type like (simplified variant)
type get = <MyObj extends Record<string, unknown> = Record<string, unknown>, T extends keyof MyObj>(key: T) => Environment[T]
but this just doesn't seem to work - whatever way i try to turn it.
so basically the function should be used like
const value = get<{ example: string }>('example') // < should only allow 'example' as key
// ^ should have value of type string
so i want that the user passes a object type as first arg and the second arg should be inferred, but the inferring part doesn't work how i want it to
