Coder Social home page Coder Social logo

material-motion / indefinite-observable-js Goto Github PK

View Code? Open in Web Editor NEW
67.0 17.0 19.0 495 KB

An Observable for JavaScript that never calls complete or error

License: Apache License 2.0

JavaScript 51.02% TypeScript 48.98%
typescript javascript observables

indefinite-observable-js's Issues

Add Symbol.observable to Observable interface

Can't add the [$$observable] line of

export interface Observable<T> {
  subscribe(listener: Observer | Next): Subscription;
  [$$observable](): Observable<T>;
}

because $$observable throws this error:

TS1169: A computed property name in an interface must directly refer to a built-in symbol.

Symbol didn't exist until Safari 8, so using Symbol.observable rather than $$observable would affect our compatibility with Safari 8 for no user-justifiable reason.

Document and/or move IndefiniteSubject

IndefiniteSubject isn't documented in the README and hasn't been implemented in Swift/Java. IndefiniteObservable has. Therefore, v1.0.0 is blocked by documentation here and implementation across the platforms.

Potential solutions:

  • Fork the present repo into indefinite-subject, delete the indefinite-observable code, and depend on indefinite-observable for types and wrapWithObserver.
  • Move indefinite-subject into materal-motion-js/packages.
  • Move IndefiniteSubject.ts (and the associated tests) into material-motion-js/packages/streams

Rename creator

What was creator was changed to connect on the docs branch, but that never made it back to develop.

I'd just do it, but since the native platforms are using subscriber, maybe we should be consistent.

Move to CircleCI

Port .travis.yml to circle.yml and delete .travis.yml.

Travis works, but we're using Circle to be compatible with Phabricator in the main repo, so we should be consistent here.

index.html example

Should just be a simple index.html with a direct import of indefinite-observable.js and inline JavaScript.

Handle multiple calls to unsubscribe

You probably shouldn't be able to call unsubscribe on a subscription that isn't subscribed.

The TC39 spec tracks this in a boolean called closed. Can we implement this while maintaining our goal of a fits-on-a-page minimal correct implementation?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.