🧹 chore: separating the repository into a type alias makes the code more modular

This commit is contained in:
eshanized
2025-01-01 10:56:50 +05:30
parent 27a017795e
commit d77d05f16d

View File

@@ -1,11 +1,26 @@
// Type alias for repository categories
export type Repository = 'core' | 'extra' | 'community' | 'multilib';
// Interface representing a single package
export interface Package {
/** The name of the package */
name: string;
/** The version of the package */
version: string;
/** A brief description of the package */
description: string;
repository: 'core' | 'extra' | 'community' | 'multilib';
/** The repository where the package is located */
repository: Repository;
}
// Interface representing the response containing a list of packages
export interface PackageResponse {
/** Array of packages */
packages: Package[];
/** Total number of packages available */
total: number;
}
}