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

Add return types to all interface methods in Zowe Explorer API #2952

Closed
t1m0thyj opened this issue Jun 12, 2024 · 2 comments · Fixed by #3021
Closed

Add return types to all interface methods in Zowe Explorer API #2952

t1m0thyj opened this issue Jun 12, 2024 · 2 comments · Fixed by #3021
Assignees
Labels
enhancement New feature or request priority-high Production outage - this quarter or at least next quarter v3

Comments

@t1m0thyj
Copy link
Member

Zowe Explorer API defines many interfaces containing methods, some of which do not have return types defined.

For example, many of the methods on the IZoweTree interface are lacking return types:
https://github.com/zowe/zowe-explorer-vscode/blob/next/packages/zowe-explorer-api/src/tree/IZoweTree.ts

Adding return types could be considered a breaking change but should improve the experience for developers/extenders. For example, when calling ZoweTreeProvider.addFavorite it'd be nice to have a return type Promise<void> displayed by IntelliSense instead of any 😋

Copy link

Thank you for raising this enhancement request.
The community has 90 days to vote on it.
If the enhancement receives at least 10 upvotes, it is added to our development backlog.
If it receives fewer votes, the issue is closed.

@traeok
Copy link
Member

traeok commented Jun 18, 2024

Something to consider as part of adding return types: do we intend on supporting asynchronous types for some functions?

For example, the rename function could be typed as follows to allow both asynchronous and synchronous operations:

/**
 * Rename the node. Begins a dialog.
 * @param the node to be renamed
 */
rename(node: IZoweTreeNode): void | PromiseLike<void>;

@JTonda JTonda added the priority-high Production outage - this quarter or at least next quarter label Jul 18, 2024
@zowe-robot zowe-robot moved this from New Issues to High Priority in Zowe Explorer for VS Code Jul 18, 2024
@JTonda JTonda assigned zFernand0 and unassigned JillieBeanSim Jul 18, 2024
zFernand0 added a commit that referenced this issue Jul 23, 2024
@zFernand0 zFernand0 linked a pull request Jul 23, 2024 that will close this issue
16 tasks
zFernand0 added a commit that referenced this issue Jul 25, 2024
@zFernand0 zFernand0 linked a pull request Jul 25, 2024 that will close this issue
17 tasks
@JTonda JTonda moved this from High Priority to In Progress in Zowe Explorer for VS Code Jul 25, 2024
zFernand0 added a commit that referenced this issue Jul 26, 2024
zFernand0 added a commit that referenced this issue Jul 29, 2024
zFernand0 added a commit that referenced this issue Jul 29, 2024
@zFernand0 zFernand0 moved this from In Progress to Review/QA in Zowe Explorer for VS Code Jul 31, 2024
@zFernand0 zFernand0 moved this from Review/QA to In Progress in Zowe Explorer for VS Code Jul 31, 2024
t1m0thyj added a commit that referenced this issue Aug 8, 2024
types: Add missing return types, see #2952
@JTonda JTonda closed this as completed Aug 12, 2024
@github-project-automation github-project-automation bot moved this from Review/QA to Closed in Zowe Explorer for VS Code Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority-high Production outage - this quarter or at least next quarter v3
Projects
Status: Closed
Development

Successfully merging a pull request may close this issue.

5 participants