Skip to content

Commit

Permalink
Export types
Browse files Browse the repository at this point in the history
  • Loading branch information
sudhakar committed Nov 18, 2021
1 parent d16773d commit 141b97d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
type handlerFn = (params: any) => Promise<any>
type promisePair = { resolve: Function; reject: Function }

interface JsonRPC {
export interface JsonRPC {
/** register a method to be called from other side */
register: (method: string, handler: handlerFn) => void

Expand Down Expand Up @@ -128,7 +128,7 @@ class WSRPC implements JsonRPC {
}
}

interface WSTransport {
export interface WSTransport {
setOnMessage(fn: (data: any) => void): void
send(msg: string): void
}
Expand Down Expand Up @@ -222,4 +222,4 @@ class WSServerTransport implements WSTransport {
}
}

export { JsonRPC, WSRPC, WSTransport, WSClientTransport, WSServerTransport }
export { WSRPC, WSClientTransport, WSServerTransport }

0 comments on commit 141b97d

Please sign in to comment.