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

Fix typescript errors related to never and axios #1504

Merged
merged 1 commit into from
Jan 13, 2022

Conversation

himdel
Copy link
Collaborator

@himdel himdel commented Jan 13, 2022

Follow-up to #1493

editors can't seem to handle some of the typing bits, leading to Property 'meta' does not exist on type 'never'.ts(2339),
turns out Promise<never> is superfluous here, removing :)

and also seeing

Argument of type '(result: AxiosResponse<any>) => void' is not assignable to parameter of type '(value: AxiosResponse<any>) => AxiosResponse<any> | PromiseLike<AxiosResponse<any>>'.
Type 'void' is not assignable to type 'AxiosResponse<any> | PromiseLike<AxiosResponse<any>>'.ts(2345)

=> changing http type back to any.

Cc @ShaiahWren does this help? :)

@himdel himdel force-pushed the ts-errros branch 2 times, most recently from 3ce6cde to 89fb099 Compare January 13, 2022 18:20
Follow-up to ansible#1493

editors can't seem to handle some of the typing bits, leading to `Property 'meta' does not exist on type 'never'.ts(2339)`,
turns out `Promise<never>` is superfluous here, removing

and also seeing

    Argument of type '(result: AxiosResponse<any>) => void' is not assignable to parameter of type '(value: AxiosResponse<any>) => AxiosResponse<any> | PromiseLike<AxiosResponse<any>>'.
    Type 'void' is not assignable to type 'AxiosResponse<any> | PromiseLike<AxiosResponse<any>>'.ts(2345)

=> changing `http` type back to `any`.

No-Issue
Copy link
Contributor

@ShaiahWren ShaiahWren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me!
Do we know why cypress isn't passing?

@himdel
Copy link
Collaborator Author

himdel commented Jan 13, 2022

Ah, good to hear that :)

cypress.. The Test Runner unexpectedly exited via a exit event with signal SIGTRAP .. that's definitely not our fault :) but restarting, I think it should go away :)

@himdel
Copy link
Collaborator Author

himdel commented Jan 13, 2022

Yup, now we're back to the usual sporadic failure, Milan is fixing that :).

@himdel himdel merged commit 41b2dbe into ansible:master Jan 13, 2022
@himdel himdel deleted the ts-errros branch January 13, 2022 22:01
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

Successfully merging this pull request may close these issues.

None yet

2 participants