apollographql / subscriptions-transport-ws

:arrows_clockwise: A WebSocket client + server for GraphQL subscriptions
https://www.npmjs.com/package/subscriptions-transport-ws
MIT License
1.52k stars 342 forks source link

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

Closed jimisaacs closed 2 years ago

jimisaacs commented 3 years ago

In the latest published version of this package of 0.9.18: https://registry.npmjs.com/subscriptions-transport-ws/-/subscriptions-transport-ws-0.9.18.tgz

In dist/server.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: https://github.com/microsoft/TypeScript/issues/31148#issuecomment-782321503

I've also already commented on this package here: https://github.com/apollographql/apollo-client/issues/7734

Though I'm confused and would like some clarification.

jimisaacs commented 3 years ago

Related issue: https://github.com/apollographql/invariant-packages/issues/74