I want to use the javascript library
in a TypeScript project yet can't figure out how to write a type definition for this lib which extends the standard javascript Math library with an additional method:
Math.seedrandom();
I want to use the javascript library
in a TypeScript project yet can't figure out how to write a type definition for this lib which extends the standard javascript Math library with an additional method:
Math.seedrandom();
Just add to the Math
interface
interface Math {
seedrandom(seed?: string);
}
Math.seedrandom();