TypeScript - type definition for extended standard lib Math

I want to use javascript library

seedrandom.js

in the TypeScript project can't figure out yet how to write a type definition for this library, which extends the standard javascript Math library with an additional method:

Math.seedrandom();

      

+3


source to share


1 answer


Just add to the interface Math



interface Math {
    seedrandom(seed?: string);
}

Math.seedrandom();

      

+5


source







All Articles