Enhance the support of TypeScript. Now every js file has its own d.ts file for partially importing in TypeScript. And all types has been tested.
A real random generator from globalThis.crypto is used instead of Math.random. If the environment doesn't support globalThis(or global/window/self/frames), it will rollback to Math.random with a warning log.