3 ms·
Here is assocIn variant 1 type in TypeScript: declare function assocIn<T, K extends keyof T>(t: T[], x: [number, K], val: T[K]):T[] You can try it out: http
by spion 9y ago
Here is assocIn variant 1 type in TypeScript:
declare function assocIn<T, K extends keyof T>(t: T[], x: [number, K], val: T[K]):T[]
You can try it out: https://goo.gl/3JrmX3 https://goo.gl/3JrmX3
- weavejester 9y agoIt generates a type error when I write: assocIn({ a: 1, b: 2 }, ['b'], 4)