Skip to content

Missing keep_numbers in the type of FormatOptions #1208

@anchengjian

Description

@anchengjian

Bug report or Feature request?

Typescript Type Check Error:

(property) keep_numbers: boolean
Type '{ toplevel: true; safari10: true; compress: { ecma: 2015 | 5; arrows: boolean; drop_console: boolean; }; } | { compress: false; toplevel: true; safari10: true; output: { comments: false; keep_numbers: boolean; quote_keys: true; }; }' is not assignable to type 'MinifyOptions'.
  Type '{ compress: false; toplevel: true; safari10: true; output: { comments: false; keep_numbers: boolean; quote_keys: true; }; }' is not assignable to type 'MinifyOptions'.
    Types of property 'output' are incompatible.
      Type '{ comments: false; keep_numbers: boolean; quote_keys: true; }' is not assignable to type 'FormatOptions'.

        Object literal may only specify known properties, and 'keep_numbers' does not exist in type 'FormatOptions'.ts(2322)

Version (complete output of terser -V or specific git commit)

Complete CLI command or minify() options used

terser input

terser output or error

Expected result
Add the keep_numbers type to FormatOptions

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