Skip to content
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

Completion: Higher priority for the same name when assign access expression to property #40078

Closed
5 tasks done
Kingwl opened this issue Aug 17, 2020 · 2 comments
Closed
5 tasks done
Labels
Declined The issue was declined as something which matches the TypeScript vision Suggestion An idea for TypeScript

Comments

@Kingwl
Copy link
Contributor

Kingwl commented Aug 17, 2020

Search Terms

completions

Examples

interface T {
  a: string
  b: number
}

interface U {
  b: number
}

declare const a: T

const b: U = {
  b: a. /*Currently is dictionary order but usualy assume as a.b */
}

Checklist

My suggestion meets these guidelines:

  • This wouldn't be a breaking change in existing TypeScript/JavaScript code
  • This wouldn't change the runtime behavior of existing JavaScript code
  • This could be implemented without emitting different JS based on the types of the expressions
  • This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
  • This feature would agree with the rest of TypeScript's Design Goals.
@RyanCavanaugh RyanCavanaugh added Declined The issue was declined as something which matches the TypeScript vision Suggestion An idea for TypeScript labels Aug 17, 2020
@RyanCavanaugh
Copy link
Member

This just seems a little too magical; the completion order can't have too many heuristics or it becomes very unpredictable

@Kingwl
Copy link
Contributor Author

Kingwl commented Aug 18, 2020

Are there any plan to improve suggestion by more contextual info?eg: same type, same name,etc.
In my usages of jetbrains it's fells better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Declined The issue was declined as something which matches the TypeScript vision Suggestion An idea for TypeScript
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants