Looking to create a TypeScript import snippet that is simple and efficient, like this:
import * as module from 'module';
I want to maintain the as
part as the same as the module name. The following template works well for me:
"import * as ${1} from '${1:module}';"
However, I am striving for even more efficiency by defaulting the as
name to match the imported module, while still allowing room to adjust it if necessary.
I attempted variations on the code below, but none seemed to function properly and I may be overlooking something.
"import * as ${2:$1} from '${1:module}';"
In the example above, the placeholder $2
is overlooked, preventing me from updating it as intended.
Any guidance or assistance would be greatly appreciated.