Skip to content

Math.sign JSDoc comment has grammatical typo #63432

@Bertie690

Description

@Bertie690

⚙ Compilation target

ES2015 or higher

⚙ Library

lib.es2015.core.d.ts

Missing / Incorrect Definition

Math.sign's documentation comment is grammatically incorrect.

    /**
     * Returns the sign of the x, indicating whether x is positive, negative or zero.
     * @param x The numeric expression to test
     */
    sign(x: number): number;

"The sign of the x" is both poor English and inconsistent with other functions in the exact same file (log1p and expm1 both correctly use "...of x" just 30 or so lines down!).

Note

I know this is an incredibly minor and arguably nitpicky bug report, but its small scope renders it all the easier to fix.

Sample Code

https://www.typescriptlang.org/play/?#code/LIQwLgFgdAzglgcwHZA

Picture of offending doc comment

Documentation Link

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sign

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