@types/cuint
TypeScript icon, indicating that this package has built-in type declarations

0.2.4 • Public • Published

Installation

npm install --save @types/cuint

Summary

This package contains type definitions for cuint (https://github.com/pierrec/js-cuint).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/cuint.

index.d.ts

export interface Uint {
    // Math
    add(x: this): this;
    subtract(x: this): this;
    multiply(x: this): this;
    div(x: this): this;

    // Compare
    equals(x: this): boolean;
    eq(x: this): boolean;
    greaterThan(x: this): boolean;
    gt(x: this): boolean;
    lessThan(x: this): boolean;
    lt(x: this): boolean;

    // Bitwise
    negate(): this;
    or(x: this): this;
    and(x: this): this;
    xor(x: this): this;
    not(x: this): this;
    shiftRight(n: number): this;
    shiftr(n: number): this;
    shiftLeft(n: number): this;
    shiftl(n: number): this;
    rorateLeft(n: number): this;
    rotl(n: number): this;
    rorateRight(n: number): this;
    rotr(n: number): this;

    // Deserialize
    fromNumber(n: number): this;
    fromBits(...bits: number[]): this;
    fromString(integer: string, radix?: number): this;

    // Serialize
    toNumber(): number;
    toString(base?: number): string;
    clone(): this;

    _low: number;
    _high: number;
}

export interface UintConstructor<T extends Uint> {
    // called as a function:
    (low: number, high?: number): T;
    // tslint:disable-next-line:unified-signatures
    (text: string, radix?: number): T;

    // called as a constructor:
    new(low: number, high?: number): T;
    // tslint:disable-next-line:unified-signatures
    new(text: string, radix?: number): T;

    prototype: T;
}

export interface Uint64Constructor<T extends Uint> extends UintConstructor<T> {
    // called as a function:
    (a00: number, a16: number, a32: number, a48: number): T;

    // called as constructor:
    new(a00: number, a16: number, a32: number, a48: number): T;
}

export const UINT64: Uint64Constructor<Uint>;
export const UINT32: UintConstructor<Uint>;

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:05 GMT
  • Dependencies: none

Credits

These definitions were written by Lukas Tetzlaff.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.2.11,912ts2.0
0.2.11,912ts2.1
0.2.11,912ts2.2
0.2.11,912ts2.3
0.2.11,912ts2.4
0.2.11,912ts2.5
0.2.11,912ts2.6
0.2.11,912ts2.7
0.2.11,912ts2.8
0.2.11,912ts2.9
0.2.11,912ts3.0
0.2.11,912ts3.1
0.2.11,912ts3.2
0.2.11,912ts3.3
0.2.11,912ts3.4
0.2.11,912ts3.5
0.2.11,912ts3.6
0.2.11,912ts3.7
0.2.11,912ts3.8
0.2.11,912ts3.9
0.2.11,912ts4.0
0.2.11,912ts4.1
0.2.11,912ts4.2
0.2.41,297ts5.7
0.2.41,297ts5.6
0.2.41,297latest
0.2.41,297ts4.5
0.2.41,297ts4.6
0.2.41,297ts4.7
0.2.41,297ts4.8
0.2.41,297ts4.9
0.2.41,297ts5.0
0.2.41,297ts5.1
0.2.41,297ts5.2
0.2.41,297ts5.3
0.2.41,297ts5.4
0.2.41,297ts5.5
0.2.41,297ts5.8
0.2.213ts4.3
0.2.213ts4.4

Version History

VersionDownloads (Last 7 Days)Published
0.2.41,297
0.2.30
0.2.213
0.2.11,912
0.2.00

Package Sidebar

Install

npm i @types/cuint

Weekly Downloads

3,029

Version

0.2.4

License

MIT

Unpacked Size

6 kB

Total Files

5

Last publish

Collaborators

  • types