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

Don't use the TypeScript any type for return types #2402

Open
jaydenseric opened this issue Jun 18, 2022 · 5 comments
Open

Don't use the TypeScript any type for return types #2402

jaydenseric opened this issue Jun 18, 2022 · 5 comments

Comments

@jaydenseric
Copy link

Functions in the JS API use the TypeScript any type for return types. Please instead use real types so we can use these APIs with type safety.

For example:

async getTransfer(params: GetTransferOptions = {}): Promise<any> {

Screen Shot 2022-06-18 at 5 32 08 pm

Screen Shot 2022-06-18 at 5 48 02 pm

In the mean time, it's not clear the right way to manually type this.

Feature Description

Don't use the TypeScript any type for return types; instead use detailed types that describe the possible variations of the real data that could be returned.

Motivation

So we can use the BitGo JS SDK with type safety.

Context

N/A

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the stale label Jul 19, 2022
@jaydenseric
Copy link
Author

Not stale.

@github-actions github-actions bot removed the stale label Jul 20, 2022
@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the stale label Aug 19, 2022
@jaydenseric
Copy link
Author

Not stale.

@github-actions github-actions bot removed the stale label Aug 20, 2022
@byhow
Copy link
Contributor

byhow commented Aug 31, 2022

Hi @jaydenseric, refactoring this particular function, would require us to also refactor all the modules for our SDK. We created an internal ticket to track this, and we’ll assess and scope the effort soon. In the meantime, we’ll keep this issue open. Thank you!

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

No branches or pull requests

2 participants