pladaria / reconnecting-websocket

Reconnecting WebSocket. For Web, React Native, cli (Node.js)
MIT License
1.23k stars 199 forks source link

Release 3.2.2 on npm differs from GitHub Release 3.2.2. #33

Closed ffflorian closed 7 years ago

ffflorian commented 7 years ago

Hi,

PR #32 was merged (yay!) and 3.2.2 was published but I noticed that the index.d.ts (from commit d4c121ec2a) differs from the one published on npm (to be found in reconnecting-websocket-3.2.2.tgz).

diff --git a/npm/dist/index.d.ts b/d4c121ec2a/dist/index.d.ts
index 11799e8..d4c3b0e 100644
--- a/npm/dist/index.d.ts
+++ b/d4c121ec2a/dist/index.d.ts
@@ -1,6 +1,5 @@
 interface ReconnectingWebsocket extends WebSocket {
     [key: string]: any;
-    close(code?: number, reason?: string, config?: {keepClosed: boolean, fastClose: boolean, delay: number}): void;
 }
 declare const ReconnectingWebsocket: (url: string | (() => string), protocols?: string | string[], options?: {
     [key: string]: any;

Is it possible that you re-published after removing the changes from #32?

pladaria commented 7 years ago

d.ts files are autogenerated in build time. If you find a way to type the source so that the d.ts file includes missing types, a PR would be appreciated.

Anyway, for me typescript is just a tool that I used to develop a JS library, not the target environment.