Comments (9)
I believe a simple fix to this line would do:
Line 61 in 271f283
Changing it to something like:
return typedPath(handlersConfig, [...path, (typeof name === 'number' ? name : name.toString())], true);
This would break some typing currently in place but would also make sure we support ramda properly.
from typed-path.
Hi @paul-sachs
Thanks for the report.
I've added another default handler, .$rawPath
, to keep backward compatibility.
Could you try your scenario with version [email protected]
and .$rawPath
?
https://github.com/bsalex/typed-path/tree/beta#rawpath
from typed-path.
@bsalex Yeah I'll give it a shot in the next few days. Thanks for the quick response.
from typed-path.
@bsalex looks better. I think my version of ramda has problems with the (string | number | symbol)[]
bit though, works fine with (string | number)[]
. Might just my version of ramda types though (@types/[email protected]) so I can work around that with a simple cast.
from typed-path.
@paul-sachs
Thanks.
Could you clarify whether the changes in the 2.2.0-beta.0
fixed the issue you have with ramda
(with the workaround)?
The goal is to push the changes to the public package if they help.
Also, it would be great to add documentation for a simple use case with ramda
.
Could you share an example for the issue that you've encountered?
from typed-path.
@bsalex yeah, i'll write something up shortly. My example is pretty nested in an application so I'll simplify and put something together.
from typed-path.
@bsalex I've created a simple codesandbox to show the issue: https://codesandbox.io/s/thirsty-sunset-q85b2?file=/src/App.tsx
You can see the change in array status if you switch to an older version of typed-path (and replace $rawPath with $raw)
from typed-path.
Thanks for the contribution,
[email protected] has been published
https://www.npmjs.com/package/typed-path
from typed-path.
I'm closing the issue, thanks again for the report.
Feel free to open another issue if you encounter a problem.
from typed-path.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typed-path.