UNPKG

ts-node-app

Version:

CLI para geração de componentes em arquiteturas DDD, hexagonal ou Clean Architecture ...

13 lines (11 loc) 388 B
### Ports (Interfaces) - Define contracts that adapters need to implement. ```ts // violation.repository.port.ts export interface ViolationRepositoryPort { save(violation: Violation): Promise<void>; findById(id: string): Promise<Violation | null>; } ``` - Keep the application decoupled from infrastructure details. - Can be adapted for databases, queues, external APIs, etc.