Skip to content

Add BigInt primitive number type #4677

Closed
@Bubbler-4

Description

@Bubbler-4

I'm surprised no one suggested this yet (the only other relevant issue I could find was #2903). Now that all major browsers and runtimes support it (ignoring IE which is EOL'd anyway), I guess it's about time to add it as a primitive number type.

  • BigInt literals 1n, 9007199254740991n
  • Conversion from/to strings/ints/floats
  • Binary operators and/or built-in functions for arithmetic on bigints, e.g. + - * / ** %

(The MDN doc shows a couple static functions too, but they're not yet supported on Safari, and I don't think they're that useful.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions