-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Types don't use unique symbol
type
#41
Comments
This apparently is also at odds with |
Also of note: |
I'm still seeing this issue with Error: node_modules/symbol-observable/index.d.ts:6:14 - error TS2717: Subsequent property declarations must have the same type. Property 'observable' must be of type 'symbol', but here has type 'unique symbol'.
6 readonly observable: unique symbol;
~~~~~~~~~~
node_modules/@types/node/globals.d.ts:146:14
146 readonly observable: symbol;
~~~~~~~~~~
'observable' was also declared here. Update: Installing an older 2.x version of this package as noted in apollographql/apollo-client#7337 fixed the issue, still unsure why the latest of both wouldn't work though. Lmk if you'd like me to create a separate issue. |
Consumers of this library may do something like this:
If using TypeScript their output .d.ts will look like the following, because
$$observable
is not aunique symbol
:However, if we use the
unique symbol
type the output .d.ts will be:This
allowsimproves interop between observable interfaces with regards to typing (rxjs and xstream in my case). There are unfortunately more issues between rxjs and xstream; namely theSubscribable
interfaces.Would you accept a PR amending the types to use the
unique symbol
type? Note that usingunique symbol
would require a TS upgrade to~2.7.0
and an update to rxjs so as to not regress ReactiveX/rxjs#3697.The text was updated successfully, but these errors were encountered: