I'm not sure if it's document somewhere but I was wondering if there's any way to use import
of ES2015
as an expression. The only thing I've seen it being used is with statements.
e.g. in CJS
I can do this:-
require('someArray').map(arr=>arr+1);
but I haven't quite figured out how to do that with import
. All I can think of is:-
import * as someArray from 'someArray';
someArray.map(arr=>arr+1);
Is it something that isn't possible with new import
keyword?