Skip to content
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

Does anyone know where the reference to @types/node is coming from? #74

Closed
jimisaacs opened this issue Feb 19, 2021 · 2 comments · Fixed by #81
Closed

Does anyone know where the reference to @types/node is coming from? #74

jimisaacs opened this issue Feb 19, 2021 · 2 comments · Fixed by #81

Comments

@jimisaacs
Copy link

jimisaacs commented Feb 19, 2021

In the latest published version of this package of 0.6.0: https://registry.npmjs.com/ts-invariant/-/ts-invariant-0.6.0.tgz

In lib/invariant.d.ts, you can see this right at the top:

/// <reference types="node" />

Though how is it getting there? I don't see it anywhere in the sources within this repo.

This is causing the node types to leak into our projects based on this issue:
microsoft/TypeScript#31148 (comment)

I've also already commented on this package here:
apollographql/apollo-client#7734

Though I'm confused and would like some clarification.

@jimisaacs
Copy link
Author

Related issue: apollographql/subscriptions-transport-ws#851

@Venryx
Copy link

Venryx commented Feb 20, 2021

I have the same issue. It's apparently stemming from the processStub variable in ts-invariant/src/invariant.ts.

More info here: apollographql/apollo-client#7734 (comment)

benjamn added a commit that referenced this issue Feb 23, 2021
Should resolve #74 and the ts-invariant side of
apollographql/apollo-client#7734.

Added a quick test:no-node script to fail if the word "node" (any
capitalization) ever creeps into ts-invariant/lib/invariant.d.ts again.
benjamn added a commit that referenced this issue Feb 23, 2021
Should resolve #74 and the ts-invariant side of
apollographql/apollo-client#7734.

Added a quick test:no-node script to fail if the word "node" (any
capitalization) ever creeps into ts-invariant/lib/invariant.d.ts again.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants