stellar-sdk
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -5,2 +5,7 @@ # Changelog | ||
## [v2.1.1](https://github.com/stellar/js-stellar-sdk/compare/v2.1.0...v2.1.1) | ||
### Fix | ||
- Fix CallBuilder onmessage type ([#385](https://github.com/stellar/js-stellar-sdk/issues/385)) | ||
## [v2.1.0](https://github.com/stellar/js-stellar-sdk/compare/v2.0.1...v2.1.0) | ||
@@ -7,0 +12,0 @@ |
@@ -5,4 +5,4 @@ /// <reference types="eventsource" /> | ||
import { ServerApi } from "./server_api"; | ||
export interface EventSourceOptions { | ||
onmessage?: (event: MessageEvent) => void; | ||
export interface EventSourceOptions<T> { | ||
onmessage?: (value: T) => void; | ||
onerror?: (event: MessageEvent) => void; | ||
@@ -17,3 +17,3 @@ reconnectTimeout?: number; | ||
call(): Promise<T>; | ||
stream(options?: EventSourceOptions): () => void; | ||
stream(options?: EventSourceOptions<T>): () => void; | ||
cursor(cursor: string): this; | ||
@@ -20,0 +20,0 @@ limit(recordsNumber: number): this; |
{ | ||
"name": "stellar-sdk", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "stellar-sdk is a library for working with the Stellar Horizon server.", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -15,4 +15,4 @@ import isNode from "detect-node"; | ||
export interface EventSourceOptions { | ||
onmessage?: (event: MessageEvent) => void; | ||
export interface EventSourceOptions<T> { | ||
onmessage?: (value: T) => void; | ||
onerror?: (event: MessageEvent) => void; | ||
@@ -92,3 +92,3 @@ reconnectTimeout?: number; | ||
*/ | ||
public stream(options: EventSourceOptions = {}): () => void { | ||
public stream(options: EventSourceOptions<T> = {}): () => void { | ||
this.checkFilter(); | ||
@@ -95,0 +95,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
2920491