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

Add CurrentProvider Type Definition in index.d.ts #710

Merged
merged 4 commits into from
Oct 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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