microsoft / microsoft/TypeScript

allow inline intellisense comment on es6 export

Open
#30,620 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Experience Enhancement Suggestion
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

Search Terms

intellisense export

Suggestion

allow inline intellisense documentation of es6 export, or at least propagate the intellisense comments of the exported package. currently nothing is exported (other than type definitions)

Use Cases

allows for index files for large libraries to have better descriptions of the sub-modules it contains.

current (working) approach is to use the old pre-es6 /** comment */export import x = requires("x")

Examples

/** promise fs based api and related quality-of-life helper functions */
import * as fs from "./fs";
export { fs };

the above intellisense comment doesn't propagate.

Checklist

My suggestion meets these guidelines:

  • [ X] This wouldn't be a breaking change in existing TypeScript/JavaScript code
  • [ X] This wouldn't change the runtime behavior of existing JavaScript code
  • [ X] This could be implemented without emitting different JS based on the types of the expressions
  • [ X] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
  • [ X] This feature would agree with the rest of TypeScript's Design Goals.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the TypeScript compiler handling for JSDoc or IntelliSense comments on ES6 export declarations, then compare it with the provided export { fs } example. Done means the inline description propagates to the exported package or module without changing emitted JavaScript.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.