Skip to content

Improve completions with --checkJs turned off #25931

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

Open
ghost opened this issue Jul 25, 2018 · 1 comment
Open

Improve completions with --checkJs turned off #25931

ghost opened this issue Jul 25, 2018 · 1 comment
Labels
Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature Domain: Completion Lists The issue relates to showing completion lists in an editor Suggestion An idea for TypeScript

Comments

@ghost
Copy link

ghost commented Jul 25, 2018

TypeScript Version: 3.1.0-dev.20180725

Code

/**
 * @typedef {object} I
 * @property {number} m
 */

/** @returns {I} */
function f() { return { x: 0 }; }
const x = f();
x.

Expected behavior:

Get completion for m only.

Actual behavior:

Get completions for I, f, and x. None of which are properties.

@ghost ghost added Suggestion An idea for TypeScript Domain: Completion Lists The issue relates to showing completion lists in an editor labels Jul 25, 2018
@mhegazy mhegazy added the Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature label Jul 25, 2018
@bennidi
Copy link

bennidi commented Jul 31, 2018

As I pointed out in my last comment of #25579 I was wondering why I am presented with a list of suggestions scrolled to its end rather than its beginning. That suggestions list apparently shows the least significant results first while I have to scroll to the top to see the completions that refer to the actual type. I don't mind all the extra suggestions (as they are partly correct and hard/impossible to infer correctly from context) - I do mind, that I don't see the most reasonable suggestions right at the top of the list. Suggestion sort priority? Maybe I am missing a config? Although I think this can be considered pretty much the expected default behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting More Feedback This means we'd like to hear from more people who would be helped by this feature Domain: Completion Lists The issue relates to showing completion lists in an editor Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

2 participants