microsoft / microsoft/TypeScript
'declare method' quick fix for adding a private method
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
From https://github.com/microsoft/vscode/issues/94118
TypeScript Version: 3.9.0-dev.20200330
Search terms
- quick fix
- declare method
- private
Repro
For ts file:
index.ts
class Bar {
bar() {
this._baz(123)
}
}
- Trigger quick fixes on
_baz
Feature request:
https://github.com/microsoft/TypeScript/issues/36249 added a quick fix for adding private properties. However there is no quick fix for adding a private method
Playground Link:
Related Issues:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the missing quick fix in index.ts with the TypeScript version described, then inspect the existing private-property quick fix from issue 36249 as the closest entry point. Done means triggering a quick fix on the missing _baz call offers a way to declare a private method and the relevant checks pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100