Skip to content
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

Return type for partial is any #372

Open
danmichaelo opened this issue Dec 20, 2023 · 1 comment
Open

Return type for partial is any #372

danmichaelo opened this issue Dec 20, 2023 · 1 comment

Comments

@danmichaelo
Copy link
Contributor

danmichaelo commented Dec 20, 2023

partial returns any, which doesn't seem to be in line with the project's focus on strong typing.

@its-hmny
Copy link

its-hmny commented Apr 9, 2024

Hi @danmichaelo, seems to be fixed in version 12.1.10, the following code:

const add = (a: null, b: number): number => a + b
partial(add, null)(5);

produces the given type annotation and works at the typechecking level

const` partial: <[a: null, b: number], [null], number>(fn: (a: null, b: number) => number, args_0: null) => (b: number) => number

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants