-
Notifications
You must be signed in to change notification settings - Fork 119
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
refactor: remove some instances of implicit any #1066
Conversation
const integrationKey = `$${tag}`; | ||
|
||
if (!nuxtCtx.$vsf || !nuxtCtx.$vsf[integrationKey]) { | ||
if (!nuxtCtx.$vsf || !(nuxtCtx.$vsf as Record<string, any>)[integrationKey]) { |
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.
Intentional cast with any since it's expected that you can assign anything
locale: undefined, | ||
country: undefined, | ||
currency: undefined, | ||
locale: undefined as 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.
Can't be avoided
@@ -1,902 +1,15 @@ | |||
/* istanbul ignore file */ |
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 asked about this file on Slack. I don't really see it being used apart from the few interfaces I left at the bottom.
ac81685
to
a17cde3
Compare
...s/theme/modules/customer/composables/useUserAddress/commands/createCustomerAddressCommand.ts
Outdated
Show resolved
Hide resolved
7af5dc0
to
9b44e15
Compare
@@ -1,6 +1,6 @@ | |||
import type { CustomerCreateInput } from '~/modules/GraphQL/types'; | |||
|
|||
export const generateUserData = (userData): CustomerCreateInput => { | |||
export const generateUserData = (userData: any): CustomerCreateInput => { |
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.
Have you tried with Customer or User instead of any here?
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.
Yes but they didn't fit. This is M2-664
Note this PR is meant to remove only implicit any, such as writing the below in a .ts file
I tried setting noImplicitAny in tsconfig so the cases I'm removing here wouldn't even build but there's too many cases to fix. Even after this PR, there are ~140 implicit any related errors left.
I only fixed the easy ones here. The ones that are left are more difficult (require changes in implementation, removal of certain files etc.)