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
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')
All CLA requirements met.
see also advanced-types
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
To
This stuff gives us an error on compilation phase for the following code