mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-16 23:10:29 +00:00
adds basic typings for the 'isaac' package
This commit is contained in:
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
// Type definitions for isaac 0.0
|
||||
// Project: https://github.com/StefanoBalocco/isaac.js
|
||||
// Definitions by: Martin Olsson <https://github.com/mo>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export function internals(): any;
|
||||
export function prng(n: number): void;
|
||||
export function rand(): number;
|
||||
export function random(): number;
|
||||
export function reset(): void;
|
||||
export function seed(s: string | number | ReadonlyArray<number>): void;
|
||||
@@ -0,0 +1,8 @@
|
||||
import * as isaac from 'isaac';
|
||||
|
||||
const r1 = isaac.random();
|
||||
const r2 = isaac.rand();
|
||||
isaac.reset();
|
||||
isaac.seed(42);
|
||||
const r3 = isaac.random();
|
||||
const r4 = isaac.rand();
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"isaac-tests.ts"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user