Code Monkey home page Code Monkey logo

Comments (7)

jcalz avatar jcalz commented on July 17, 2024 1

25 is from #30779 but that doesn't seem to be related to this. The limit here is on the order of 10^5, and if you are trying to write a union bigger than that then you're doing something TS doesn't want you to do. The limit is there for performance so I'm sure they're not going to increase it to some large number just because the number can be represented easily.

from typescript.

RyanCavanaugh avatar RyanCavanaugh commented on July 17, 2024 1

The limit is in place to stop your typechecking from taking six hours, not because we don't have access to 31 bits worth of integer 😉

from typescript.

AtomicGamer9523 avatar AtomicGamer9523 commented on July 17, 2024

It seems that the maximum states that union can represent is 2^32, but Hex6Color and Hex8Color are more than that. The simple fix would be to change the max number of union states from a 32-bit integer to a 64-bit integer. I am just not quite sure where that error actually gets raised

from typescript.

MartinJohns avatar MartinJohns commented on July 17, 2024

Duplicate of #43388.

It seems that the maximum states that union can represent is 2^32

The limit is 25, and that's intentional.

from typescript.

AtomicGamer9523 avatar AtomicGamer9523 commented on July 17, 2024

It seems that the maximum states that union can represent is 2^32

The limit is 25, and that's intentional.

I searched for 25, and can't seem to find where this limitation actually is. Is it possible to submit a PR to increase that value ?

from typescript.

AtomicGamer9523 avatar AtomicGamer9523 commented on July 17, 2024

I see, thank you. In my case the only thing I can really do then is to perform some analysis during compile time, and/or hope for #43335 to be accepted

from typescript.

typescript-bot avatar typescript-bot commented on July 17, 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.