mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Add types for ganache-core (#27572)
This commit is contained in:
parent
2a3696f7b4
commit
74bb1da61c
3
types/ganache-core/ganache-core-tests.ts
Normal file
3
types/ganache-core/ganache-core-tests.ts
Normal file
@ -0,0 +1,3 @@
|
||||
import { provider } from "ganache-core";
|
||||
|
||||
provider({ verbose: true });
|
||||
19
types/ganache-core/index.d.ts
vendored
Normal file
19
types/ganache-core/index.d.ts
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
// Type definitions for ganache-core 2.1
|
||||
// Project: https://github.com/trufflesuite/ganache-core#readme
|
||||
// Definitions by: Leonid Logvinov <https://github.com/LogvinovLeon>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.4
|
||||
|
||||
import { Provider } from "ethereum-protocol";
|
||||
export interface GanacheOpts {
|
||||
verbose?: boolean;
|
||||
logger?: {
|
||||
log(msg: string): void;
|
||||
};
|
||||
port?: number;
|
||||
network_id?: number;
|
||||
networkId?: number;
|
||||
mnemonic?: string;
|
||||
gasLimit?: number;
|
||||
}
|
||||
export function provider(opts: GanacheOpts): Provider;
|
||||
23
types/ganache-core/tsconfig.json
Normal file
23
types/ganache-core/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",
|
||||
"ganache-core-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/ganache-core/tslint.json
Normal file
1
types/ganache-core/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user