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

    3.0.1 • Public • Published

    Installation

    npm install --save @types/seedrandom

    Summary

    This package contains type definitions for seedrandom (https://github.com/davidbau/seedrandom).

    Details

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

    index.d.ts

    // Type definitions for seedrandom 3.0
    // Project: https://github.com/davidbau/seedrandom
    // Definitions by: Kern Handa <https://github.com/kernhanda>
    //                 Eugene Zaretskiy <https://github.com/EugeneZ>
    //                 Martin Badin <https://github.com/martin-badin>
    // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
    
    declare namespace seedrandom {
        type State = object;
    
        interface Callback {
            (prng?: prng, shortseed?: string, global?: boolean, state?: State): prng;
        }
    
        interface Options {
            entropy?: boolean | undefined;
            global?: boolean | undefined;
            pass?: Callback | undefined;
            state?: boolean | State | undefined;
        }
    }
    
    interface prng {
        (): number;
        double(): number;
        int32(): number;
        quick(): number;
        state(): seedrandom.State;
    }
    
    interface seedrandom {
        (seed?: string, options?: seedrandom.Options, callback?: seedrandom.Callback): prng;
        alea(seed?: string, options?: seedrandom.Options): prng;
        Alea: new (seed?: string) => prng;
        tychei(seed?: string, options?: seedrandom.Options): prng;
        Tychei: new (seed?: string) => prng;
        xor128(seed?: string, options?: seedrandom.Options): prng;
        Xor128: new (seed?: string) => prng;
        xor4096(seed?: string, options?: seedrandom.Options): prng;
        Xor4096: new (seed?: string) => prng;
        xorshift7(seed?: string, options?: seedrandom.Options): prng;
        XorShift7: new (seed?: string) => prng;
        xorwow(seed?: string, options?: seedrandom.Options): prng;
        XorWow: new (seed?: string) => prng;
    }
    
    declare const seedrandom: seedrandom;
    
    export = seedrandom;

    Additional Details

    • Last updated: Tue, 06 Jul 2021 16:34:27 GMT
    • Dependencies: none
    • Global values: none

    Credits

    These definitions were written by Kern Handa, Eugene Zaretskiy, and Martin Badin.

    Keywords

    none

    Install

    npm i @types/seedrandom

    DownloadsWeekly Downloads

    282,210

    Version

    3.0.1

    License

    MIT

    Unpacked Size

    6.27 kB

    Total Files

    4

    Last publish

    Collaborators

    • types