DEV Community

Discussion on: How to simplify and organize imports in Typescript

Collapse
 
lissetteibnz profile image
Sara Lissette Luis Ibáñez

If you create a index.ts file with:
export * from './beers.service';
export * from './whiski.service';
export * from './wine.service';

After, you can import all services as:
import { BeersService, WhiskyService, WineService } from './services';

You don't need to add index

Collapse
 
danywalls profile image
Dany Paredes

Thanks! I update the post adding your buckets.

Seatle Storm