shims-vue.d.ts 640 B

123456789101112131415161718192021222324252627282930313233
  1. declare module '*.png' {
  2. const value: string;
  3. export default value;
  4. }
  5. declare module 'vue-leaflet' {
  6. export const LMap: any;
  7. export const LTileLayer: any;
  8. export const LMarker: any;
  9. export const LPopup: any;
  10. }
  11. declare module '*.vue' {
  12. import { DefineComponent } from 'vue';
  13. const component: DefineComponent<{}, {}, any>;
  14. export default component;
  15. }
  16. // global.d.ts 或者您的项目中的某个 .d.ts 文件
  17. interface CustomError extends Error {
  18. response?: {
  19. status: number;
  20. data?: any;
  21. };
  22. message?: string;
  23. }
  24. declare global {
  25. interface ErrorConstructor {
  26. new(message?: string): CustomError;
  27. }
  28. }