microsoft / microsoft/TypeScript
VSCode Angular 9 Auto-Import for Custom Libraries
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
TS Template added by @mjbvz
TypeScript Version: 3.8.3
Search Terms
- angular
I'm currently building an Angular 9 Library using VSCode (version 1.42.1 on MAC OS). I followed the Angular Tutorial on how to create libraries - https://angular.io/guide/creating-libraries.
I also added schematics to the angular package, I'm currently having problems when I add the Library to Angular Application using the ng add ~/projects/my-library-0.01.tgz --save command.
VSCode is unable to auto-import components or classes defined in this package.
Cannot find name 'MyService'.
If I manually add import { MyService } from 'my-library' this works fines.
Is there a reason why the auto-import is not working for custom angular libraries?
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 issue with the documented ng add ~/projects/my-library-0.01.tgz --save command in the Angular 9 library setup, then compare auto-import behavior with the working manual import from my-library. No source file or test is named; done means determining whether exported components and classes from the custom package are offered by VSCode auto-import and capturing that behavior in a focused regression test if the issue remains reproducible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100