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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

v9.6 pipe is broken,but v6.15 is ok. #272

Open
skimhugo opened this issue Nov 14, 2021 · 2 comments
Open

v9.6 pipe is broken,but v6.15 is ok. #272

skimhugo opened this issue Nov 14, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@skimhugo
Copy link

馃悶 Bug Report

Describe the bug

I use F.Pipe for a mixin class factory function.
the factory type is
type ClassExtends<T = {}> = new (...args: any[]) => T; type ClassFactory<SubI, SupI = {}> = <Super extends ClassExtends<SupI>>( superclass: Super, ) => ClassExtends<SubI> & Super;

the pipe function is :
export const pipe: F.Pipe = (...args: any) => { // The pipe return type, aka the composed function signature return (input: any) => args.reduce((val: any, fn: any) => fn(val), input); };

the result of 6.15 is right,but 9.6 is wrong.

I guess is Curry<Function<P, R0>> did the thing.

I copy 6.15 pipe to make a workaround.

I suggest CurryFunction make a mode for pipe. because this cause different behaviour in pipe.

Reproduce the bug

// REPL or a link to your repository if applicable.
// A *self-contained* demonstration of the problem.

Expected behavior

Possible Solution

Screenshots

Additional context

@millsp
Copy link
Owner

millsp commented Nov 15, 2021

Thanks for reporting, it has broken since TypeScript 4.4.

@millsp millsp added the bug Something isn't working label Nov 15, 2021
@skimhugo
Copy link
Author

@millsp I found anther proplem,maybe it is not the curry , but IntersectOf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants