Closed jethrolarson closed 2 years ago
I found a sucky work-around of
updateAll<A>(set('f')<boolean>(true), set('g')(2))(a);
Yeah for some reason boolean
s always trigger this weird behavior. I will try to do some investigation.
It's probably just that the setter is specifying the type of the object and infers the smallest type. I don't know how to solve that and keep the same api though.
It's odd that
set('f')(true)(a)
works though
same problem occurs with fill
updateAll<A>(fill({f: true}), set('g')(2))(a);
Very strange. Soon I should get a weekend off and I'll take a peek at this (and other outstanding issues)
This is resolved by newer versions of TypeScript. I'll publish shades@2.2.0
later today which upgrades all dependencies.
TS 3.8.2 strict
produces