mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Adding typings for json-rpc-random-id
Matching dslint Using declare function Header is required Adding a comment Moving export line Missing space Tslint...
This commit is contained in:
parent
644c7b5909
commit
833ffc438b
14
types/json-rpc-random-id/index.d.ts
vendored
Normal file
14
types/json-rpc-random-id/index.d.ts
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
// Type definitions for json-rpc-random-id 1.0
|
||||
// Project: https://github.com/kumavis/json-rpc-random-id#readme
|
||||
// Definitions by: Micah Riggan <https://github.com/micahriggan>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
/**
|
||||
* Returns a function that generates a random number
|
||||
* This number is to be used with web3 rpc
|
||||
*/
|
||||
declare function IdIterator(options?: {
|
||||
max?: number;
|
||||
start?: number;
|
||||
}): () => number;
|
||||
|
||||
export = IdIterator;
|
||||
2
types/json-rpc-random-id/json-rpc-random-id-tests.ts
Normal file
2
types/json-rpc-random-id/json-rpc-random-id-tests.ts
Normal file
@ -0,0 +1,2 @@
|
||||
import jsonRPCRandomID = require("json-rpc-random-id");
|
||||
const generateId = jsonRPCRandomID();
|
||||
23
types/json-rpc-random-id/tsconfig.json
Normal file
23
types/json-rpc-random-id/tsconfig.json
Normal file
@ -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",
|
||||
"json-rpc-random-id-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/json-rpc-random-id/tslint.json
Normal file
1
types/json-rpc-random-id/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user