magnoli-types
v1.2.598
Published
Magnoli API Contracts
Downloads
2,006
Readme
magnoli-types
TypeScript type definitions and Zod schemas for Magnoli's core business entities.
Installation
npm install magnoli-types
# or
yarn add magnoli-types
# or
pnpm add magnoli-typesFeatures
- Type definitions for all Magnoli business entities
- Zod schemas for runtime type validation
- Full TypeScript support
- Zero runtime dependencies (except for Zod)
- Tree-shakeable exports
Usage
Import types and schemas as needed:
import { Employee, EmployeeSchema } from "magnoli-types";
// Use types in your TypeScript code
const employee: Employee = {
// ... employee data
};
// Validate data at runtime using Zod schemas
const validatedEmployee = EmployeeSchema.parse(employee);Development
| Command | Description |
| ------------------------------- | ----------------------------- |
| npm run build | Build the package |
| npm run release | Publish a new version |
| npm run typecheck | Type checking |
| npm run lint | Run all linters |
| npm run lint:fix | Run all linters with auto-fix |
| npm run lint:eslint | Lint code |
| npm run lint:eslint:fix | Lint code with auto-fix |
| npm run lint:markdownlint | Lint markdown |
| npm run lint:markdownlint:fix | Lint markdown with auto-fix |
| npm run lint:commitlint | Lint commit message |
| npm run format | Format code |
| npm run format:check | Check formatting |
| npm run prepare | Install git hooks |
