-
Notifications
You must be signed in to change notification settings - Fork 14
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
BC-8008 - Fix any type linter warning #3549
Conversation
…type and mockResource
…pe and the resource type definition
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.
tests need some changing, will look into that
@@ -45,12 +45,12 @@ describe("env-config module", () => { | |||
describe("when configs loaded successfully", () => { | |||
const setup = () => { | |||
const serverConfigresponse = createMock< | |||
AxiosResponse<ConfigResponse, any> | |||
AxiosResponse<ConfigResponse, 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.
The second type parameter defaults to any
and therefore can be left out:
export interface AxiosResponse<T = any, D = 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.
Just as a hint. Can be left "as-is".
}; | ||
|
||
spy.mockReturnValue( | ||
taskApiMock as unknown as serverApi.TaskApiInterface |
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 remove the setup()
? Couldn't we just do the type cast there?
|
Short Description
Links to Ticket and related Pull-Requests
BC-8008
Changes
Data-security
Deployment
New Repos, NPM packages or vendor scripts
Screenshots of UI changes
Checklist before merging