Definitelytyped: @types/socketcluster update to v15

Created on 27 Jan 2020  路  9Comments  路  Source: DefinitelyTyped/DefinitelyTyped

If you know how to fix the issue, make a pull request instead.

  • [x] I tried using the @types/socketcluster package and had problems.
  • [x] I tried using the latest stable version of tsc. https://www.npmjs.com/package/typescript
  • [x] I have a question that is inappropriate for StackOverflow. (Please ask any appropriate questions there).
  • [x] [Mention](https://github.com/blog/821-mention-somebody-they-re-notified) the authors (see Definitions by: in index.d.ts) so they can respond.

    • Authors: @DanielRose

If you do not mention the authors the issue will be ignored.

Description

Socketcluster recently updated to v15. Code has been restructured based on asyngular-client and asyngular-server and prefix SC is now AG

@DanielRose thank you for adding the SCxxx types but it would be great if you can update to v15 with AGxxxx.

Most helpful comment

Ok, I'll take a look.

All 9 comments

Ok, I'll take a look.

socketcluster itself changed into a cli-tool with version 15, so there are no type definitions which make sense. However, I updated the other related type-definitions, ex. socketcluster-server and socketcluster-client: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/42068

Thank you!!!

PR was merged, so you can close this :)

Ok I started using it and looking good, except for the 'subscribeStateChange' listener data (see docs: https://socketcluster.io/docs/api-ag-client-socket/#events)

in socketcluster-client/lib/clientsocket.d.ts:414 the SubscribeStateChangeData type should be

interface SubscribeStateChangeData extends SubscribeData {
    oldChannelState: AGChannel.ChannelState;
    newChannelState: AGChannel.ChannelState;
}

I suppose I should create a new issue? Is there an easy way to amend your commit. Is another PR required?

Yup, my mistake. The PR is merged, so a new PR is needed. Do you want to do that?

Would you mind doing the PR? I think the merge gets fast tracked when an author of the package makes the PR and I've never done one for DefinitelyTyped before.

Also, one other tiny thing came up: for socketcluster-server, I think the option 'protocolVersion' is not required, see socketcluster-server/server.d.ts:199-201

I made a new issue #42192

The PR moves into the same fast lane if the author approves it too, and he seems pretty responsive :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JWT
svipas picture svipas  路  3Comments

victor-guoyu picture victor-guoyu  路  3Comments

jrmcdona picture jrmcdona  路  3Comments

lilling picture lilling  路  3Comments

fasatrix picture fasatrix  路  3Comments