-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Support JSDoc name paths in JavaScript #22158
Labels
Declined
The issue was declined as something which matches the TypeScript vision
Domain: JSDoc
Relates to JSDoc parsing and type generation
Comments
DanielRosenwasser
added
Salsa
Domain: JSDoc
Relates to JSDoc parsing and type generation
labels
Feb 23, 2018
DanielRosenwasser
changed the title
Support hacky JSDoc module name paths in checkJs
Support JSDoc module name paths in checkJs
Feb 24, 2018
DanielRosenwasser
changed the title
Support JSDoc module name paths in checkJs
Support JSDoc module name paths in JavaScript
Feb 24, 2018
DanielRosenwasser
changed the title
Support JSDoc module name paths in JavaScript
Support JSDoc name paths in JavaScript
Feb 24, 2018
For reference, this is a possible solution to #14377. |
DanielRosenwasser
added
the
Awaiting More Feedback
This means we'd like to hear from more people who would be helped by this feature
label
Mar 9, 2018
closing in favor of #14844 |
mhegazy
added
Declined
The issue was declined as something which matches the TypeScript vision
and removed
Awaiting More Feedback
This means we'd like to hear from more people who would be helped by this feature
labels
Mar 9, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Declined
The issue was declined as something which matches the TypeScript vision
Domain: JSDoc
Relates to JSDoc parsing and type generation
Background
Part of TypeScript's goal is to provide a rich tooling experience. This includes the scenarios where users are
checkJs
on a full JS project to leverage the breadth of.d.ts
files on DefinitelyTyped.We'd like to provide users richer tools that can possibly work for existing code as well.
Basic Proposal
This issue pertains to our JavaScript support via the language service,
allowJs
, andcheckJs
.It tracks understanding some combined set of functionality between JSDoc's namepaths as well as the way in which import paths function in TypeScript today.
For example, the following
@typedef
tags import theRequest
andResponse
interfaces from the module specifiers"express"
and"../node_modules/express.Response"
.Since in TypeScript the import specifier
"express"
could originate from...node_modules
when using"moduleResolution": "node"
declare module "express"
compilerOptions.paths
we would do the same resolution here for
express
inmodule:express.Request
.Open questions:
What this issue doesn't cover?
While name paths are typically introduced via the the
/** @module */
tag (which is not currently supported), this proposal doesn't rely on it. In our brief research, it was unclear whether enough users had a consistent understanding of the tag.However, one could speculate that the
module
tag would function similarly to an ambient module declaration. This should be covered in a different proposal.The text was updated successfully, but these errors were encountered: