Is it possible to Import * in typescript -
is possible import of exported classes , function in .ts
file @ 1 using *
import * './mymodule';
i don't want import * me './mymodule';
, call functions me.myfunc
i want python from mymodule import *
no, not possible. either have specifiy want import this:
import {someclass, someinterface} './somemodule';
or import variable , call there stated:
import * somemodule './somemodule';
you can import module without assigning variable it, if don't need functionality in module. useful, if sets global state:
import './somemodule';
Comments
Post a Comment