microsoft / microsoft/TypeScript
[Feature Request] Ability to auto-generate a type file for local JS module
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
I'm facing the current issue when importing a JS file into a TS project

The solution is to create a @types/cognitoAuth/index.d.ts file for the types, or convert the file to typescript.
It would be great if in vscode we could use the code action feature ( CTRL + . ) to either generate an empty types file with boilerplate, or try convert file to TS?
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 reviewing the TypeScript language-service code-action support and the local JavaScript-module workflow described in the issue. Determine whether the goal is boilerplate declaration generation, JavaScript-to-TypeScript conversion, or both; done means a VS Code action provides the agreed result for a local JS import.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100