Skip to content

Releases: esp/esp-js

0.8.3

08 Jul 21:21
Compare
Choose a tag to compare

Minor TypeScript definition updates as per #100

0.8.2

07 Jul 22:01
Compare
Choose a tag to compare

Minor fixes as per #99

0.8.1

07 Jul 12:18
Compare
Choose a tag to compare

Minor bug fix as per #98

0.8.0

06 Jul 20:10
Compare
Choose a tag to compare

Adding Observable.subscribeOn and Observable.observeOn. This enables better model to model interactions by allowing models to expose and consume observable streams which will run within a dispatch loop for the model/s in question.

For example a model could expose an esp observable stream such as:

    getPrices() {
        return esp.Observable.create(
            observer => {
                // on a dispatch loop for this.modelId
                return this.priceSubject.observe(observer);
            }
        ).subscribeOn(this._router, this.modelId);
    }

When a consumer observes this stream the observation factory will be called on the dispatch loop for this.modelId in question.

Similarly, a model consuming an observable stream can do this:

        _testModel1
            .getPrices()
            .observeOn(_router, 'myModelId') // i.e. the model where this code resides 
            .where(p => p.pair === 'EURUSD')
            .observe(
                p => {
                       // on a dispatch loop for myModelId
                       // update model state here
                },
                () => {
                      // on a dispatch loop for myModelId
                }
            );

Check the tests for more usage examples.

0.7.12

14 May 19:11
Compare
Choose a tag to compare

type script def changes are per #95

0.7.11

13 May 11:59
Compare
Choose a tag to compare

Typescript definition updates as per #94

0.7.10

12 May 08:26
Compare
Choose a tag to compare

TypeScript def changes as per #93

0.7.9

12 May 08:04
Compare
Choose a tag to compare

Minor TypeScript definition update as per #92

0.7.8

10 May 15:48
Compare
Choose a tag to compare

Minor TypeScript definition update as per #91

0.7.7

08 May 20:26
Compare
Choose a tag to compare

Minor typescript definition update:

Adds DisposableBase and CompositeDisposable which exists in the JS