microsoft / microsoft/TypeScript

[JavaScript/TypeScript Language Hints] Hide default `Function` properties/methods until manually typed just like in Rust.

Open
#63,150 2 comments 2 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

Right now if I create a class with static methods/properties or via namespace, it's very hard to distinguish between default and custom ones visually.

Image

I propose to hide those **default** methods, they are not useful to know for beginners, while for experienced ones, it's noisy. Leaving only defined in classes/namespaces.
I'm looking from Rust lang analyzer extension perspective, which does exactly that, and I feel like it's much more convenient, especially if there will be more properties/methods in future.
If the property is fully typed correctly, e.g. `Test.call`, the hint will appear just like typing `Test.constructor`, it's not appearing, but when typed - the hint appears with `Function`.

This can be an option to enable/disable.

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 reproducing the class and namespace completion examples described in the issue, then compare the current TypeScript language hints with the Rust analyzer behavior. Done means default Function members are hidden until explicitly typed, while custom members remain visible and an enable/disable option is considered.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.