Closed FrankiePo closed 6 years ago
Why don't we use typescript's keyof operator instead of just string in pluck operator? I'm saying we can convert pluck types from
keyof
string
pluck<T, R>(props: string[]): R {}
To
pluck<T, K extends keyof T>(props: K[]): T[K] {}
This stuff gives us an error on compilation phase for the following code
Rx.Observable.of({ a: 1, b: 2, }).pluck('c')
Is it a good idea to implement this?
Why don't we use typescript's
keyof
operator instead of juststring
in pluck operator? I'm saying we can convert pluck types fromTo
This stuff gives us an error on compilation phase for the following code
Is it a good idea to implement this?