Code Monkey home page Code Monkey logo

Comments (7)

Andarist avatar Andarist commented on April 27, 2024 2

duplicate of #52864
#52866 tries to address this and awaits further review

from typescript.

Andarist avatar Andarist commented on April 27, 2024 1

There is also no evidence that PR #52866 actually fixes this issue.

I already added the test case from this issue to my PR - roughly at the same time when I commented here that it's a duplicate of that other issue. See the commit with the test: 7142157

The problem is similar, but the code is completely different.

The root cause really seems to be the same so I think it's fair to classify this as a duplicate of the other issue. The fact that it doesn't work when ur inner call is directly at the argument position of the outer call while it works when it's deeper in the argument is a sign for me that it's the same issue (the other one suffered from exactly the same thing).

from typescript.

RyanCavanaugh avatar RyanCavanaugh commented on April 27, 2024

Why isn't pipe1 declared this way?

function pipe1(action1: Action<string>): (input: string) => string {
  return (input) => action1._run(input);
}

from typescript.

fabian-hiller avatar fabian-hiller commented on April 27, 2024

Because in the actual source code, pipe is a dynamic function that assigns the data type of an action based on the previous action. Without generics, this would require an "infinite" number of overload signatures to support any possible case.

from typescript.

fabian-hiller avatar fabian-hiller commented on April 27, 2024

@RyanCavanaugh I looked at issue #52864. The problem is similar, but the code is completely different. Therefore, I would not consider this PR a "duplicate". There is also no evidence that PR #52866 actually fixes this issue. Could you re-evaluate it? Unfortunately, this problem blocks the entire rewrite of Valibot.

from typescript.

fabian-hiller avatar fabian-hiller commented on April 27, 2024

Thanks for the clarification and for creating a PR! I was wrong and agree with what you wrote. What do you think are the chances of your PR being merged and how long might it take?

from typescript.

typescript-bot avatar typescript-bot commented on April 27, 2024

This issue has been marked as "Duplicate" and has seen no recent activity. It has been automatically closed for house-keeping purposes.

from typescript.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.