Official TypeScript type definitions for VTubers.TV services. This package provides essential type definitions and utilities for type-safe development across the VTubers.TV ecosystem.
- 🎯 Comprehensive type definitions
- 🔧 Utility types for common patterns
- 🛡️ Type-safe event handling
- 📦 Zero dependencies
- 📚 Well-documented with examples
Since this is an internal package, install it directly from the GitHub repository:
npm install git://github.com/vtuberstv/types.git
# or
yarn add git://github.com/vtuberstv/types.git
# or
pnpm add git://github.com/vtuberstv/types.git
import type { Result, APIResponse, UUID } from '@vtubers.tv/types'
// Use Result type for operations that can fail
async function fetchUser(id: UUID): Promise<Result<User>> {
// Implementation
}
// Use APIResponse for standardized API responses
const response: APIResponse<User> = {
status: 200,
data: { id: "123", name: "John" },
timestamp: "2024-03-20T15:30:00Z"
}
The package includes comprehensive documentation for all type definitions:
- Primitive Types - Basic type aliases (UUID, ISO8601DateTime, etc.)
- Utility Types - Type manipulation utilities
- API Types - API response and result types
- Event Types - Event emitter and function types
- Data Structure Types - Tuple and array operations
See the full documentation for detailed examples and usage guidelines.
- Primitive type aliases (UUID, ISO8601DateTime, etc.)
- Nullability helpers (Nullable, Optional, etc.)
- Promise & Async helpers
- Readonly & Mutable transforms
- Result pattern for operation results
- API response wrappers
- Pagination types
- Type-safe event emitter
- Event handler types
- Event map definitions
- Tuple operations
- Array utilities
- Dictionary types
- Union and intersection operations
- TypeScript >= 4.5
- Node.js >= 16.0.0
- Fork the repository
- Create your feature branch
- Add your changes
- Update documentation
- Submit a pull request
This project is licensed under the AGPL-3.0 License and the VTubers.TV Commercial License (VCL) v1.0. See the LICENSE and LICENSE-VCL file for details.
(Or view the LICENSES.md file for a complete list of licenses)
For support, please open an issue in the GitHub repository.