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

Types some of the any types and ignores rest #1493

Merged
merged 2 commits into from
Jan 12, 2022
Merged

Conversation

brumik
Copy link
Contributor

@brumik brumik commented Jan 10, 2022

Improves upon #1465 with adding some easily type-able types

@brumik
Copy link
Contributor Author

brumik commented Jan 10, 2022

The others could be typed too probably, but my understanding of the product is too low for it. And I set a 40 min time-frame on this to not to waste time.

Copy link
Collaborator

@himdel himdel 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 👍

Some of the typing info may be too specific now, reflecting how we use those functions instead how we could, but that's something we can fix when we need to :)

@brumik brumik merged commit c9aae96 into master Jan 12, 2022
@brumik brumik deleted the brumik-any-fixes branch January 12, 2022 09:28
himdel added a commit to himdel/ansible-hub-ui that referenced this pull request Jan 13, 2022
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`.
himdel added a commit to himdel/ansible-hub-ui that referenced this pull request Jan 13, 2022
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
himdel added a commit to himdel/ansible-hub-ui that referenced this pull request Jan 13, 2022
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
himdel added a commit to himdel/ansible-hub-ui that referenced this pull request Jan 13, 2022
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
himdel added a commit that referenced this pull request 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`.

No-Issue
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