index.d.ts 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. interface PackageManifest {
  2. name: string;
  3. display: string;
  4. addon?: boolean;
  5. author?: string;
  6. description?: string;
  7. external?: string[];
  8. globals?: Record<string, string>;
  9. manualImport?: boolean;
  10. deprecated?: boolean;
  11. submodules?: boolean;
  12. build?: boolean;
  13. iife?: boolean;
  14. cjs?: boolean;
  15. mjs?: boolean;
  16. dts?: boolean;
  17. target?: string;
  18. utils?: boolean;
  19. copy?: string[];
  20. }
  21. interface VueUseFunction {
  22. name: string;
  23. package: string;
  24. importPath?: string;
  25. lastUpdated?: number;
  26. category?: string;
  27. description?: string;
  28. docs?: string;
  29. deprecated?: boolean;
  30. internal?: boolean;
  31. component?: boolean;
  32. directive?: boolean;
  33. external?: string;
  34. alias?: string[];
  35. related?: string[];
  36. }
  37. interface VueUsePackage extends PackageManifest {
  38. dir: string;
  39. docs?: string;
  40. }
  41. interface PackageIndexes {
  42. packages: Record<string, VueUsePackage>;
  43. categories: string[];
  44. functions: VueUseFunction[];
  45. }
  46. interface CommitInfo {
  47. functions: string[];
  48. version?: string;
  49. hash: string;
  50. date: string;
  51. message: string;
  52. refs?: string;
  53. body?: string;
  54. author_name: string;
  55. author_email: string;
  56. }
  57. interface ContributorInfo {
  58. name: string;
  59. count: number;
  60. hash: string;
  61. }
  62. declare const metadata: PackageIndexes;
  63. declare const functions: VueUseFunction[];
  64. declare const packages: Record<string, VueUsePackage>;
  65. declare const categories: string[];
  66. declare const functionNames: string[];
  67. declare const categoryNames: string[];
  68. declare const coreCategoryNames: string[];
  69. declare const addonCategoryNames: string[];
  70. declare const getFunction: (name: string) => VueUseFunction | undefined;
  71. declare function getCategories(functions: VueUseFunction[]): string[];
  72. declare function uniq<T extends any[]>(a: T): any[];
  73. export { CommitInfo, ContributorInfo, PackageIndexes, PackageManifest, VueUseFunction, VueUsePackage, addonCategoryNames, categories, categoryNames, coreCategoryNames, functionNames, functions, getCategories, getFunction, metadata, packages, uniq };