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

Clean up dependencies #1999

Open
teabroker opened this issue Oct 20, 2023 · 0 comments
Open

Clean up dependencies #1999

teabroker opened this issue Oct 20, 2023 · 0 comments

Comments

@teabroker
Copy link
Contributor

After some review I've found dependencies which could be removed for various reasons. Some of them need clarification.

Move to dev dependencies:

  • @types/oauth imported internally.
  • @types/ws reexported from parsers, but without any particular purpose. I propose to change the interface of parsers from
interface Parser {
  parse(event: WS.MessageEvent) void
}

to something like that:

interface Parser {
  parse(event: {data: string | Buffer | ArrayBuffer | Buffer[]}) void
}

In anyway now it only uses the first argument to consume data property which in its turn has the type similar to what JSON.parse can consume as an argument. So currently I see no need of having WS.MessageEvent as a type.

Remove:

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

No branches or pull requests

1 participant