Import typescript extension-methods file

I have been working with extension methods in Typescript recently and discovered that there is an import declartion necessary in the invoking file to make them work. Even though Webstorm doesn't require one. Also Webstorm doesn't provide an automatic import. I thought about making a LiveTemplate but since the path is always different it won't help.

Is there any way to make this more comfortable?

0
1 comment

Not sure what extension methods you are talking about... Normally the IDE auto-imports modules but doesn't suggest importing global functions.

You can use existing live templates (importdefault, importitems and importns ) to quickly create import statements, but the path should be entered manually in such cases

0

Please sign in to leave a comment.