TypeScript Importer – Add the “Import” to your code automatically

This feature was one of the reasons some of my friends chose WebStorm over VS Code.

What ? who?

suppose you create a new service AService. Then, you want to inject it into your component.
currently you have to add an  Import statement at the top of your code, and inject the service in the constructor.

Here is the shortcut: install “TypeScript Imported” extension in your vs code (ctrl+p then “ext install tsimporter”) , and from now on your life will be much easier.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s