Is there a way to define multiple file types in an interface?
interface App {
service: Record<ServiceName, Service>
}
For example, the ServiceName could be Cart, Product, User, etc. And the Service should be an imported object from a .ts file. Here is the structure of my directory:
- model
- handler
- service
* Cart.ts
* Product.ts
* User.ts