question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Salsa] Support jsdoc `@namespace`

See original GitHub issue

Support treating variable declarations with @namespace JSDoc tag as TS namespaces.

/** @namespace */
var Documents = {
    /**
     * An ordinary newspaper.
     */
    Newspaper: 1,
    /**
     * My diary.
     * @private
     */
    Diary: 2
};

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:23
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

7reactions
mhegazycommented, Apr 20, 2018

you can just use:

// @filename: usage.js

/** @typedef {import('./interfaces').Foo} Foo */

/** @type {Foo} */
let foo;
6reactions
callionicacommented, Jun 13, 2021

Just here to say that I expected the following to work in a Javascript file and it didn’t work:

/** @namespace {import("vscode")} vscode */

/** @type {vscode.TextDocument} */

as a not very obvious workaround, I used

/** @type {import("vscode").TextDocument} */

instead.

It would be good if the first version using @namespace worked.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use JSDoc: @namespace
Overview. The @namespace tag indicates that an object creates a namespace for its members. You can also write a virtual JSDoc comment that...
Read more >
Type-safe JavaScript code with JsDoc - Prisma
JsDoc improves code documentation in a more structured manner using tags to describe arguments, return values, namespaces, modules, etc.
Read more >
Joshua's Docs - JSDoc Cheatsheet and Type Safety Tricks
Cheatsheet on using JSDoc, especially with VSCode, and some tips on type safety and advanced usage.
Read more >
Namespace: OData - JSDoc - SAP Help Portal
sap. OData. Provides the ability to offline OData services. The plugin provides the client with the ability to define offline stores for an...
Read more >
ioK - ALBA.Net
... Jsdoc namespace, Cariddi nardulli filmografia, P38 range rover battery! ... Norra bantorget hotel stockholm, Alpha support services ltd, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found