@ahfc/unity-types
v4.0.5
Published
shared DTO type library and schema validation for unity projects
Downloads
101
Readme
@ahfc/unity-types
This library is designed to provide a set of TypeScript types for the Alaska Housing Finance Corporation's Unity project. It aims to streamline development and ensure type safety across the project.
Technologies
- TypeScript: Used for static typing to ensure type safety and improve developer productivity.
- Zod: Used for building and validating runtime types.
Features
This library is designed to provide domain-object types and schemas for the primary entities within Unity's data model. In addition, the library delineates the data transfer objects (DTOs) that are accepted by the unity-core
API. Both the types and schemas are exported for use. It is common practice to validate these with strict()
on the server side, hence it is advisable to perform client-side validation using the exported schemas as a preliminary step.
For each endpoint, a succinct jsdoc
is provided within the component files. For a more comprehensive and current description, please refer to the official API specification.
The types are organized by module and are all exported at the root level.
Installation
To install this library, run the following command:
npm install @ahfc/unity-types