Content-Length: 270866 | pFad | http://redirect.github.com/babel/babel/issues/17367

72 Accept bigint as value in BigIntLiteral · Issue #17367 · babel/babel · GitHub
Skip to content

Accept bigint as value in BigIntLiteral #17367

@JLHwung

Description

@JLHwung

💻

  • Would you like to work on this feature?

What problem are you trying to solve?

The current BigIntLiteral stores a string representation of bigint. This is inconsistent with how other primitive literals are stored. For example, NumericLiteral stores the number as value.

Describe the solution you'd like

Add bigint: string property to BigIntLiteral to store the string representation. Change value: string to value: bigint. If a plugin depends on BigIntLiteral#value, they should switch to BigIntLiteral#bigint in Babel 8.

To smooth the transition, accept both string and bigint in the Babel 7 t.bigIntLiteral AST builder. In Babel the builder should only accept positive bigint.

Describe alternatives you've considered

N.A.

Documentation, Adoption, Migration Strategy

This feature is first suggested by @nicolo-ribaudo in #15801 (comment).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: http://redirect.github.com/babel/babel/issues/17367

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy