Skip to content

format notation option type missing 'hex'/'bin'/'oct' #3232

@lucasmcht

Description

@lucasmcht

Describe the bug
In the documentation, it is written that we can use 'hex'/'bin'/'oct' as a notation value, in the format function. These option are working, but we get a typescript error when we use them.
The typescript union is written as follow :
notation?: 'fixed' | 'exponential' | 'engineering' | 'auto'
When it should look like this :
notation?: 'fixed' | 'exponential' | 'engineering' | 'auto' | 'hex' | 'bin' | 'oct'

To Reproduce
Use the math.format() function, with the notation option as 'hex' :
format(50, { notation: "hex" })
Error: Type "hex" is not assignable to type "fixed" | "exponential" | "engineering" | "auto" | undefined

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions