Skip to content

Commit

Permalink
Update index.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
KABBOUCHI committed Oct 17, 2022
1 parent d4322fe commit a80111b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,11 @@ export const setWeb3LibraryCallback = (
getLibrary = cb
}

export type VueWeb3Library = any
export interface IVueWeb3Library {
[key: string]: any
}

export const useWeb3 = <VueWeb3Library>() => {
export const useWeb3 = <TVueWeb3Library extends IVueWeb3Library>() => {
const onErrorCb = ref<(error: Error) => void>()

const activate = async (
Expand Down Expand Up @@ -191,7 +193,7 @@ export const useWeb3 = <VueWeb3Library>() => {
})

return {
library: library as Ref<VueWeb3Library>,
library: library as Ref<TVueWeb3Library>,
active,
activate,
deactivate,
Expand Down

0 comments on commit a80111b

Please sign in to comment.