I want something like this:
import {get, set} as moduleName from 'module-name'
moduleName.get()
The reason is because sometimes methods of different modules can have the same name, and I don't want to import the whole module because of it
There is no such thing as:
import {get, set} as moduleName from 'module-name'
You can either do it like this:
import * as moduleName from 'module-name';
moduleName.get(); //all the exported items will be accessible.
Or this:
import {get as moduleNameGet, set as moduleNameSet} from 'module-name';
moduleNameGet();
import {get as g, set as s} from "module-name"butimport {get, set} as moduleName from 'module-name'is not valid.