Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Type definitions for observables #485

Open
TrySound opened this issue Sep 6, 2017 · 4 comments
Open

Type definitions for observables #485

TrySound opened this issue Sep 6, 2017 · 4 comments

Comments

@TrySound
Copy link
Contributor

TrySound commented Sep 6, 2017

from in types accepts Observable which is not correct. It should be { [SymbolObservable]: Observable } according source code.
Flow has some problems with symbols. Don't know about typescript.

@briancavalier
Copy link
Member

briancavalier commented Sep 6, 2017

Sadly, I don't think it's possible in Flow right now to use symbols. That basically means that Flow users aren't doing to be able to use Observables in general, so I don't think we're currently making the situation any worse. If we are, though, and there's a way we could do better, I'm all for it.

@TylorS @Frikki: do either of you know if it's possible in TS?

@TylorS
Copy link
Collaborator

TylorS commented Sep 6, 2017

In TypeScript the situation is similar. I've been following this thread for over a year now.

TypeScript is only capable of handling "well-known" (by TypeScript) Symbols in types. e.g. Symbol.iterator and other Symbol.**.

@briancavalier
Copy link
Member

Thanks @TylorS. Seems like we've done all we can do for now until Flow and TS support Symbol.observable.

@Kinrany
Copy link

Kinrany commented Mar 18, 2019

In TypeScript the situation is similar. I've been following this thread for over a year now.

microsoft/TypeScript#5579 has been fixed.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants