-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
chore(pubsub): enable eslint and remove tslint #13081
Conversation
@@ -52,7 +53,7 @@ export enum ConnectionState { | |||
ConnectedPendingKeepAlive = 'ConnectedPendingKeepAlive', | |||
} | |||
|
|||
export type PubSubContent = Record<string, unknown>; | |||
export type PubSubContent = Record<string | symbol, unknown>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
curious: how is this coming up only now? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the api-graphql
package (if I remembered correctly), it trying to assign an object that uses symbol
as key to this type. Which causes incompatible key signature error, so expanding the key to union symbol here
}): void; | ||
onConnectionLost(params: { errorCode: number }): void; | ||
connect( | ||
params: Record<string, string | number | boolean | (() => void)>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why prefer record over the current implementation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original implementation is a Record with string
as the key. Record
is more readable and recommended I presume so it has been auto fixed.
678690c
to
86323c4
Compare
Description of changes
Change details see each commit of this PR.
Issue #, if available
Description of how you validated changes
Checklist
yarn test
passesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.