bscotch / stitch

Tools and apps for GameMaker development: a CLI for pipeline development, a VSCode extension for coding, and more.
Other
119 stars 13 forks source link

Add basic template/generic support for functions #86

Closed adam-coster closed 1 year ago

adam-coster commented 1 year ago

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 commented 1 year ago

Added in v1.12.0