Aggregate imports then export in TypeScript -
i'm used using es6 syntax. tend aggregate react component files 1 "import" file use index.js of components folder. allows me write destructing imports so:
import { app, ticker, timer } "./components"
inside of index.js file can write export import commands so:
export app "./app" export ticker "./ticker" export timer "./timer"
is there way can in typescript? can't seem index.ts recognized default file in module. there syntax export import in typescript?
is there way can in typescrip
just use es6 export *
syntax:
export * "./components";
alternatively can still do:
export {app,ticker,timer} "./compoents"
Comments
Post a Comment