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

Use typescript namespace in JSDoc comments #20281

Closed
mjbvz opened this issue Nov 27, 2017 · 7 comments
Closed

Use typescript namespace in JSDoc comments #20281

mjbvz opened this issue Nov 27, 2017 · 7 comments
Labels
Duplicate An existing issue was already created

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Nov 27, 2017

From @Liero on November 22, 2017 15:5

When I install npm package, VS Code nicely shows typescript definitions in javascript file:
typescript definitions inside js

I would expect, that I will be able to use these definitions in JSDoc comments:

/**
 * compiles application javascripts using specified bundler, either browserify or watchify
 * @param {browserify.BrowserifyObject} bundler
 * @param {string} bundleFileName - output javascript file
 */
function compileJs(bundler, bundleFileName) {

But the parameter type is still reported as any:
image

Copied from original issue: microsoft/vscode#38964

@mjbvz mjbvz self-assigned this Nov 27, 2017
@mjbvz mjbvz removed the javascript label Nov 27, 2017
@mjbvz mjbvz removed their assignment Nov 27, 2017
@mjbvz mjbvz added the VS Code Tracked There is a VS Code equivalent to this issue label Nov 27, 2017
@mjbvz
Copy link
Contributor Author

mjbvz commented Nov 27, 2017

@Liero Do you import or require broswerify anywhere in that file?

Possibly related to #11825 and #14377

@mhegazy
Copy link
Contributor

mhegazy commented Nov 27, 2017

looks like a duplicate of #14377

@mhegazy mhegazy added Duplicate An existing issue was already created and removed VS Code Tracked There is a VS Code equivalent to this issue labels Nov 27, 2017
@Liero
Copy link

Liero commented Nov 28, 2017

@mjbvz:

Do you import or require broswerify anywhere in that file?

yes, I do. Otherwise I would not be able to call browserify(), see the first screenshot. The definitions are actually downloaded and works, but I'm not able to use it in my own JSDoc comments (see seconds screenshot)

@Liero
Copy link

Liero commented Nov 28, 2017

@mhegazy:

looks like a duplicate of #14377

Is it? I'm not sure. I'm actually importing the `browserify' module, see my previous comment

@mhegazy
Copy link
Contributor

mhegazy commented Nov 28, 2017

Is it? I'm not sure. I'm actually importing the `browserify' module, see my previous comment

Well, i can not tell if you are from the screen shot above. if you are not importing it, then you need #14377 to be fixed, if you are, then you are running into #16489

@Liero
Copy link

Liero commented Nov 29, 2017

@mhegazy:
it looks like this could be duplicate of #16489. Just make sure following works, pls:

const browserify = require('browserify');
var b = browserify(); //definitions are shown in tooltips and autocomplete hints

/** @param {browserify.BrowserifyObject} bundler */
function compileJs(bundler) {
  //bundler is reported as any...
}

package.json:

{
  "devDependencies": {
    "browserify": "^14.5.0"
  }
}

@typescript-bot
Copy link
Collaborator

Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.

@microsoft microsoft locked and limited conversation to collaborators Jul 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

4 participants