Skip to content

Negate<0> returns number | bigint #117

Open
@dimitropoulos

Description

@dimitropoulos

Hi!

I noticed that Negate<0> returns number | bigint and I'd expect it to return 0 (doesn't seem like TypeScript has -0, which is fine by me).

import { Call, Numbers } from 'hotscript'

type ShouldBeZero = Call<Numbers.Negate<0>>
//   ^?

type Zero = -0;
//   ^?

https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAbzgYQIYBt0Bo4DkCuIARgKZQDOcAvnAGZQQhwDkAFhDOQMZTBgzMAUIJgBPMCTgBldvnQATAEIkAWmQhwAvCgzoAPAWJlyAOlwkA5qhgk9ABgB8DwQHoXcDwD0A-MLES4NQYtOABaOwBuV3cvbyA

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions