DefinitelyTyped/types/seedrandom
Eugene Zaretskiy 13e6a6482d [seedrandom] State should be serializable, and removing incorrect callbacks (#34151)
* Remove incorrect callbacks, change state type

Seedrandom's state function does not return a function. It returns an object intended to be opaque, which I don't know how to describe in TS. It's serializable (unlike a function), so I made it just be an empty object. It's properties are unpredictable, but always of a similar shape: { [x]: number, [y]: number, [z]: number[] }. x,y, and z vary from implementation, and users are not intended to know what they are. The important thing is that it can be passed back to the state option when making a new instance of seedrandom, and that it be serializable (which the previous implementation was not).

In addition, seedrandom's alternate algorithms do not take a third "callback" argument, so I removed it.

* Adding attribution
2019-03-27 16:55:51 -07:00
..
index.d.ts
seedrandom-tests.ts
tsconfig.json
tslint.json