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 basic template/generic support for functions #86

Closed
adam-coster opened this issue Jun 15, 2023 · 1 comment
Closed

Add basic template/generic support for functions #86

adam-coster opened this issue Jun 15, 2023 · 1 comment
Labels
🌳 parser ✨ feature New feature or request ⌨️ vscode The Stitch extension for VSCode

Comments

@adam-coster
Copy link
Member

JSDocs support the @template tag for defining generics. Even very limited support would be extremely helpful, e.g.

/// @template {Any} T
/// @param {T} _data
/// @returns {T}
function clone(_data) {
  return __clone_recurse(_data);
}

This would allow stronger type support with less code.

@adam-coster adam-coster added ✨ feature New feature or request ⌨️ vscode The Stitch extension for VSCode 🌳 parser labels Jun 15, 2023
@adam-coster
Copy link
Member Author

Added in v1.12.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌳 parser ✨ feature New feature or request ⌨️ vscode The Stitch extension for VSCode
Projects
None yet
Development

No branches or pull requests

1 participant