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
Update server monorepo to ESLint 7 #3851
Conversation
Close and reopening to trigger the pipeline |
public async send(messages: object[], tenantId: string, documentId: string): Promise<any> { | ||
public async send(messages: Record<string, unknown>[], tenantId: string, documentId: string): Promise<any> { |
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.
Is this what typescript recommends now? Converting an object to Record<K, T> for better typing?
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.
Also this implements IProducer so I am wondering why TS is not complaining? Are objects and Record<string, unknown> interchangable?
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.
And there are more implementations of IProducer. So may be change them as well?
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.
This was a mistake. I experimented with some fixes and got sloppy about keeping them separate from the ESLint 7 upgrade itself. I'll remove these and replace with the disable comment. If we want to make this or a similar change we should do it separately from this PR.
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.
Resolved in an upcoming push.
8ba3d12
to
b17ce0d
Compare
098a887
to
f42e036
Compare
@@ -16,7 +16,7 @@ export function validateTokenClaims( | |||
documentId: string, | |||
tenantId: string, | |||
maxTokenLifetimeSec: number, | |||
isTokenExpiryEnabled: boolean): ITokenClaims { | |||
isTokenExpiryEnabled: boolean): ITokenClaims | undefined { |
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.
I don't understand how this compiled before...
No description provided.