-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
Due to the way setKey is written, the original prototype is forgotten. This means all of the functions disappear as well.
focal/packages/focal/src/utils.ts
Lines 7 to 19 in 281b70f
| export function setKey<T, K extends keyof T>(k: K, v: T[K], o: T): T { | |
| if (k in o && structEq(v, o[k])) { | |
| return o | |
| } else { | |
| // this is the fastest way to do it, see | |
| // https://jsperf.com/focal-setkey-for-loop-vs-object-assign | |
| const r: { [k in keyof T]: T[k] } = {} as any | |
| for (const p in o) r[p] = o[p] | |
| r[k] = v | |
| return r | |
| } | |
| } |
Metadata
Metadata
Assignees
Labels
No labels