-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why path isn't curried? #185
Comments
tl;dr: just hadn't bothered to do the curried codegen for those variants. it sucks a bit worse than you'd expect as the versions from different typing strategies must be mixed, lest TS ignore all but the first option with matching first param set.
I think using the assertion operator |
@tycho01 can you do codegen now? |
The codegen is always available since it's just auto-currying, but the question is, is its prototype (*.d.ts in |
Hm. Isn't dropping the overloads a regression? |
The overloads are mixin with the template, so that it isn't dropped. See dist branch/src/path.d.ts |
@tycho01 well, I can't even update to new types because there's dozen of errors |
New types removed some outdated types (R.isArrayLike, R.isNaN, etc., they're not exist in v0.24), and some types' generics are changed (some of them does not need to use type parameter explicitly now). @goodmind Is the codebase public? If you need help, I can look into them to find out what the problem is. |
@ikatyang yes, here is pull goodmind/treact#44 |
|
@tycho01 well, I'm using nightly typescript, maybe this an issue? |
In my |
|
Oh, sorry, yes, in 2.5 microsoft/TypeScript#17455 made the issue pop up everywhere, my recent PR should help fix that. |
@tycho01 i tested against 2.4.2 and there is no |
Right, that issue was only in some 2.5 versions. |
@tycho01 Also I wonder why you returned to |
I guess what you're saying is the pre-curried functions were better for having parameter names? Or are you getting inference issues related to these? |
@tycho01 yes, there's something with inference, because it worked with old types (maybe old types was wrong who knows) |
While looking into it, I found the problems are mostly the following things:
|
@ikatyang that looks like a relatively good upgrade guide. perhaps we could put it in the readme or a changelog or something. hopefully that would help save a few questions. |
@tycho01 maybe we could open an new issue for upgrade guide just like ramda does? |
Fair enough. :) |
@tycho01 well, I tried to update but all this |
@goodmind: I'd prefer if it could automatically get things right as well, I would say that is the ideal goal here |
Why path isn't curried? (I mean ones with mapped types).
And why
T
was replaced withT | undefined
in last update?The text was updated successfully, but these errors were encountered: