Code Monkey home page Code Monkey logo

zen-observable-ts's Introduction

zen-observable-ts

Thin wrapper around zen-observable and @types/zen-observable, to support ESM exports as well as CommonJS exports, with TypeScript types provided by @types/zen-observable.

Usage

After installing zen-observable-ts using a tool like npm or yarn, you can import the Observable class by name:

import { Observable } from "zen-observable-ts";

Note that this package does not currently have a default export, so the {} braces are mandatory.

Previous versions

This tiny wrapper package replaces an older version of zen-observable-ts that used to provide TypeScript types for zen-observable, before @types/zen-observable was introduced. This version of the package is not intended to be perfectly compatible with the older version, so we have bumped the major version of the package to reflect the difference.

Future plans

As explained in apollographql/apollo-client#7615, the zen-observable-ts package exists to fill a gap in the functionality of the zen-observable package, so we will retire this package in favor of using zen-observable directly, when/if this PR is ever merged.

zen-observable-ts's People

Contributors

benjamn avatar brainkim avatar dependabot[bot] avatar phryneas avatar svc-secops avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zen-observable-ts's Issues

Polyfill of Symbol.observables causes RxJs issues

Regarding to zenparsing/zen-observable#87, please remove the polyfill of Symbol.observable in your code (https://github.com/apollographql/zen-observable-ts/blob/main/module.js#L24-L26) Your code causes httpClient issues in our environment using RxJS Observables after your polyfill is taken place. If your code was loaded first, then the observable check in https://github.com/ReactiveX/rxjs/blob/72bc92191ab959e27a969dc4476e14d95416573f/src/internal/observable/innerFrom.ts#L21 will fail. Please also update the library versions you are using (#316

Thank you very much :)

Upgrade zen-observable to 0.9.0

@benjamn When you get a chance, can you bump zen-observable here and in the @apollo/client to use the 0.9.0 release which features the new Observable.all() feature? Additionally, npmjs.org only shows 1.1.0 so there needs a deployment there as well.

The `start` function as part of the TS `Observer` type is misleading and doesn't do anything

It appears the TS types for this package specify that a start function can be given to the observer. It, however, doesn't seem to exist in the implementation of zen-observable.

This is a bit misleading as that function won't actually get called. Consider removing this property from the types.

Here is a reference to an issue where someone attempted to use this function and nothing happened: apollographql/apollo-client#10559 (comment)

Upgrade zen-observable to 0.10.0

Following the pattern of #310, this is a request to update the zen-observable dependency to v0.10.0. Version 0.10.0 of zen-observable fixes this issue. I don't use zen-observable directly, but I do use Apollo Client which indirectly depends on that package through this one. More information can be found in this issue: zenparsing/zen-observable#87

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.