o24ui-shared-types
v4.0.1
Published
Shared TypeScript types for EMI Portal applications
Readme
@emi-portal/shared-types
Shared TypeScript type definitions for EMI Portal applications.
Installation
This package is part of the EMI Portal monorepo and is installed automatically via workspace dependencies.
{
"dependencies": {
"@emi-portal/shared-types": "*"
}
}Usage
import type { User, LoginCredentials, ApiResponse } from '@emi-portal/shared-types';
import type { Locale, Settings } from '@emi-portal/shared-types/apps';
const user: User = {
id: '1',
username: 'john.doe',
email: '[email protected]'
};
const response: ApiResponse<User> = {
status: 200,
data: user
};Modules
- index - Main exports
- apps - Application-specific types (Settings, Locale, etc.)
- api - API request/response types
- auth - Authentication types (User, Session, etc.)
- common - Common utility types
Guidelines
- Only include type definitions, interfaces, and enums
- No runtime code or implementations
- Keep types focused and single-purpose
- Use descriptive names that indicate purpose
