Improve ganache-core's GanacheOpts type and require it instead of any

This commit is contained in:
Fabio Berger
2018-06-27 18:33:32 +02:00
parent 133b6fe240
commit 51211a21ba
2 changed files with 3 additions and 1 deletions

View File

@@ -15,7 +15,7 @@ export class GanacheSubprovider extends Subprovider {
* Instantiates a GanacheSubprovider * Instantiates a GanacheSubprovider
* @param opts The desired opts with which to instantiate the Ganache provider * @param opts The desired opts with which to instantiate the Ganache provider
*/ */
constructor(opts: any) { constructor(opts: Ganache.GanacheOpts) {
super(); super();
this._ganacheProvider = Ganache.provider(opts); this._ganacheProvider = Ganache.provider(opts);
} }

View File

@@ -7,7 +7,9 @@ declare module 'ganache-core' {
}; };
port?: number; port?: number;
network_id?: number; network_id?: number;
networkId?: number;
mnemonic?: string; mnemonic?: string;
gasLimit?: number;
} }
// tslint:disable-next-line:completed-docs // tslint:disable-next-line:completed-docs
export function provider(opts: GanacheOpts): Provider; export function provider(opts: GanacheOpts): Provider;