For sharing type definitions between porter service and consumers of the service
npm install @squiz/dxp-porter-sharedThe @squiz/dxp-porter-shared is designed to streamline communication and data consistency across services within our mono repository. By centralizing common data structures and types.
* Reduce the likelihood of errors and mismatches between services by enforcing a single source of truth for shared types.
* Promote code reusability by providing a centralized location for common types.
* Ensure consistency in data representation and communication protocols.
To leverage the functionality exported by the @squiz/dxp-porter-shared, follow these steps:
* Installation: Install the package in your service's environment using your preferred package manager (e.g., npm or yarn).
``bash`
npm install @squiz/dxp-porter-shared`
* Import Shared Types: Import the necessary types into your service's codebase.ts``
import { PortStatus } from '@squiz/dxp-porter-shared';
* Utilize Shared Types: Once imported, you can freely use the shared types within your service's codebase, ensuring consistent data representation and communication protocols.