Skip to content

Missing autocomplete on the "abstract" keyword #45260

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

Closed
pushkine opened this issue Aug 1, 2021 · 8 comments Β· Fixed by #45710
Closed

Missing autocomplete on the "abstract" keyword #45260

pushkine opened this issue Aug 1, 2021 · 8 comments Β· Fixed by #45710
Labels
Bug A bug in TypeScript Domain: Completion Lists The issue relates to showing completion lists in an editor Good First Issue Well scoped, documented and has the green light Help Wanted You can do this
Milestone

Comments

@pushkine
Copy link
Contributor

pushkine commented Aug 1, 2021

Bug Report

πŸ•— Version & Regression Information

ts stable & nightly

⏯ Playground Link

Playground Link

πŸ’» Code

export class Foo {}

Code_2021-08-01_08-43-51

@DanielRosenwasser DanielRosenwasser added Bug A bug in TypeScript Domain: Completion Lists The issue relates to showing completion lists in an editor Good First Issue Well scoped, documented and has the green light Help Wanted You can do this labels Aug 2, 2021
@DanielRosenwasser DanielRosenwasser added this to the Backlog milestone Aug 2, 2021
@heyAyushh
Copy link

@DanielRosenwasser I want to work on this.
How do I get started?

@DanielRosenwasser
Copy link
Member

The fix will likely start in src/services/completions.ts and you should start with a failing test in tests/cases/fourslash/.

@fabioemoutinho
Copy link

fabioemoutinho commented Aug 13, 2021

is this related?
#34491
#32474

@sourabh112
Copy link

Hi @DanielRosenwasser, I would like to work on this issue if no one else is working on it. As I'm quite new to this, I might need your guidance for a lot of things.

@DanielRosenwasser
Copy link
Member

DanielRosenwasser commented Aug 23, 2021

If @heyAyushh isn't still working on this, go for it, but I would encourage you to explore/familiarize yourself with the surrounding code I've pointed out above, and look to those PRs to get a sense of what sort of work this change might involve. If you get it working, I or someone else on the team can provide code review feedback.

@heyAyushh
Copy link

Yes @DanielRosenwasser , I haven't started contributing as I am exploring typescript source code right now.
If there's a resource let me know.

I also didn't have the resources for testing docker.

@DanielRosenwasser
Copy link
Member

You don't need to use Docker to contribute, using a container is just an option if you find that helpful.

@sourabh112
Copy link

@DanielRosenwasser, I was looking at the code of file src/services/completions.ts. and found this piece of code.

function isClassMemberCompletionKeyword(kind: SyntaxKind) {
switch (kind) {
case SyntaxKind.AbstractKeyword:
case SyntaxKind.ConstructorKeyword:
case SyntaxKind.GetKeyword:
case SyntaxKind.SetKeyword:
case SyntaxKind.AsyncKeyword:
case SyntaxKind.DeclareKeyword:
case SyntaxKind.OverrideKeyword:
return true;
default:
return isClassMemberModifier(kind);
}
}

I think Abstractkeyword should not be placed here because it can be used anywhere not only in classes. So, I was thinking of removing it from here and adding it places for global completion following #34491. Then I will run the test on tests/cases/fourslash/ and make changes if needed.

Please confirm, If I'm going in the right direction. If not then please correct me, As it is my first time working on TypeScript.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: Completion Lists The issue relates to showing completion lists in an editor Good First Issue Well scoped, documented and has the green light Help Wanted You can do this
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants