Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #710 from godtaehee/feature/evan/current-provider
Browse files Browse the repository at this point in the history
Add CurrentProvider Type Definition in index.d.ts
  • Loading branch information
kjhman21 authored Oct 25, 2022
2 parents 9bbe672 + fd3729a commit 6f0d102
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { Account } from './packages/caver-account/src'
import { Contract as BaseContract } from './packages/caver-contract/src'
import { CoreHelpers, Formatters } from './packages/caver-core-helpers/src'
import { Method } from './packages/caver-core-method/src'
import { HttpProvider, IpcProvider, WebsocketProvider } from './packages/caver-core-requestmanager/src'
import { provider, HttpProvider, IpcProvider, WebsocketProvider } from './packages/caver-core-requestmanager/src'
import { IPFS } from './packages/caver-ipfs/src'
import { KCT } from './packages/caver-kct/src'
import { DeprecatedKlayRPC } from './packages/caver-klay/src'
Expand Down Expand Up @@ -68,6 +68,7 @@ export class AbstractCaver {
constructor(provider?: RequestProvider, net?: net.Socket)

version: string
currentProvider: provider
utils: Utils
abi: ABI
formatters: Formatters
Expand Down
3 changes: 3 additions & 0 deletions types/test/caver-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ let caver = new Caver('http://localhost:8551')
// $ExpectType string
caver.version

// $ExpectType provider
caver.currentProvider

// $ExpectType Utils
caver.utils

Expand Down

0 comments on commit 6f0d102

Please sign in to comment.