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

IntelliSense with types of JSDoc #3802

Closed
anseki opened this issue Mar 8, 2016 · 2 comments
Closed

IntelliSense with types of JSDoc #3802

anseki opened this issue Mar 8, 2016 · 2 comments
Assignees

Comments

@anseki
Copy link

anseki commented Mar 8, 2016

I tried this:

/**
 * @param {string} param1 - Normal
 * @param {string|number|boolean} param2 - Multiple types
 * @param {null} param3 - (I know this is strange param.)
 * @param {string|number|null} param4 - Multiple types includes `null`
 * @param {Object} param5 - Object type
 * @param {Array} param6 - Array type
 * @param {jQuery} param7 - Another type
 * @param {MyClass} param8 - Another type
 * @param {string|number|Array} param9 - Multiple types includes `Array`
 * @param {?string} param10 - Nullable type
 * @param {string} [param11] - Optional
 * @returns {?string} result
 */
function fnc(param1, param2, param3, param4, param5, param6,
    param7, param8, param9, param10, param11) {
  return param11;
}

fnc();
  • param3: any, param4: any, param6: any, param7: any, param8: any, param9: any
  • param10: string

It seems that:

  • The type of @param that includes null, Array, and other classes other than Object are shown as any.
  • The optional params are shown with ?, but nullable params and returns are shown with nothing.

I hope that the specified types are shown even if that is null, Array, or unknown type such as jQuery or MyClass. And nullable params are shown like optional params.

@egamma
Copy link
Member

egamma commented Mar 8, 2016

moving to TypeScript

@egamma
Copy link
Member

egamma commented Mar 8, 2016

This issue was moved to microsoft/TypeScript#7428

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants