This repository was archived by the owner on Jul 23, 2021. It is now read-only.
forked from immutable-js/immutable-js
-
-
Notifications
You must be signed in to change notification settings - Fork 6
Type safe getIn/setIn (TypeScript) #64
Labels
Comments
Hello I actually wanted to have getIn and setIn to preserve types as well and made a module.
with this it should actually work but it is finicky and may show “Type instantiation is excessively deep and possibly infinite” since it has more than 50 cycles. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
From @dinony on Tue, 19 Dec 2017 11:15:48 GMT
I'm using
v4.0.0-rc.9
with TypeScript a lot.I wonder if it would be possible to preserve type information when using
getIn
orsetIn
.const r = nested.getIn(['some', 'long', 'path']) // r: any :'(
Any TS pros out there, who could help with the TS declarations?
Copied from original issue: immutable-js#1462
The text was updated successfully, but these errors were encountered: