Skip to content

Type annotations #5

@Nerixyz

Description

@Nerixyz

It would be nice for TypeScript users to have type annotations for the Int64.
I'm currently using it using a custom type but for better warnings from TS by default this would be nice.
This is my current type:

export type CInt64 = {
    constructor(value: number);
    shiftLeft(signedBits: number): CInt64;
    shiftRight(signedBits: number): CInt64;
    xor(other: CInt64): CInt64;
    xor(other: number): CInt64;
    not(other: CInt64): CInt64;
    not(other: number): CInt64;
    and(other: CInt64): CInt64;
    and(other: number): CInt64;
    or(other: CInt64): CInt64;
    or(other: number): CInt64;
    neg(): CInt64;
    eq(other: CInt64): boolean;
    eq(other: number): boolean;
    toNumber(): number;
};

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