Skip to content

compat/isSafeInteger doesn't actually narrow the type #1508

@GingerAdonis

Description

@GingerAdonis

The documentation on isSafeInteger states: "This function can also serve as a type predicate in TypeScript, narrowing the type of the argument to number.". But it actually doesn't do that, as the native Number.isSafeInteger doesn't do that either.

It would be great if it actually would narrow the type. Same goes for functions like isFinite.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedGood for new contributorsp1: minor bugbugs in minor functions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions