Open t1m0thyj opened 2 weeks ago
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.
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>;
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.tsAdding 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 typePromise<void>
displayed by IntelliSense instead ofany
😋