utils.d.ts 444 B

123456789101112131415
  1. declare module '#utils' {
  2. // 在这里定义模块的类型
  3. // 例如,如果模块导出一个函数,可以这样定义:
  4. export function someUtilityFunction(arg: string): number;
  5. // 如果模块导出多个内容,可以使用命名导出
  6. export interface UtilityOptions {
  7. optionA: string;
  8. optionB: number;
  9. }
  10. // 如果模块有默认导出
  11. const defaultExport: UtilityOptions;
  12. export default defaultExport;
  13. }