env.d.ts 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /// <reference types="vite/client" />
  2. declare module 'splitpanes'
  3. declare module 'element-plus/dist/locale/zh-cn.mjs'
  4. declare module 'vite-plugin-eslint' {
  5. import type { Plugin } from 'vite'
  6. interface EslintPluginOptions {
  7. /**
  8. * Enable linting on start
  9. * @default true
  10. */
  11. lintOnStart?: boolean
  12. /**
  13. * Enable linting on dev server start
  14. * @default true
  15. */
  16. lintOnDev?: boolean
  17. /**
  18. * Enable linting on build
  19. * @default true
  20. */
  21. lintOnBuild?: boolean
  22. /**
  23. * Emit errors instead of warnings
  24. * @default false
  25. */
  26. emitError?: boolean
  27. /**
  28. * Emit warnings as errors
  29. * @default false
  30. */
  31. emitWarning?: boolean
  32. /**
  33. * Cache errors and warnings
  34. * @default true
  35. */
  36. cache?: boolean
  37. /**
  38. * Path to eslint cache file
  39. * @default node_modules/.vite/vite-plugin-eslint/cache.json
  40. */
  41. cacheLocation?: string
  42. /**
  43. * Path to eslint config file
  44. * @default undefined
  45. */
  46. configFile?: string
  47. /**
  48. * Fix errors on save
  49. * @default false
  50. */
  51. fix?: boolean
  52. /**
  53. * Path to eslint ignore file
  54. * @default undefined
  55. */
  56. ignorePath?: string
  57. /**
  58. * List of files to include
  59. * @default ['**\/*.{js,jsx,ts,tsx,vue}']
  60. */
  61. include?: string | string[]
  62. /**
  63. * List of files to exclude
  64. * @default ['node_modules']
  65. */
  66. exclude?: string | string[]
  67. }
  68. function eslintPlugin(options?: EslintPluginOptions): Plugin
  69. export default eslintPlugin
  70. }
  71. declare interface Window {
  72. // 是否存在无界
  73. __POWERED_BY_WUJIE__?: boolean
  74. // 子应用公共加载路径
  75. __WUJIE_PUBLIC_PATH__: string
  76. // 原生的querySelector
  77. __WUJIE_RAW_DOCUMENT_QUERY_SELECTOR__: typeof Document.prototype.querySelector
  78. // 原生的querySelectorAll
  79. __WUJIE_RAW_DOCUMENT_QUERY_SELECTOR_ALL__: typeof Document.prototype.querySelectorAll
  80. // 原生的window对象
  81. __WUJIE_RAW_WINDOW__: Window
  82. // 子应用沙盒实例
  83. __WUJIE: WuJie
  84. // 子应用mount函数
  85. __WUJIE_MOUNT: () => void
  86. // 子应用unmount函数
  87. __WUJIE_UNMOUNT: () => void
  88. // 注入对象
  89. $wujie: {
  90. bus: EventBus
  91. shadowRoot?: ShadowRoot
  92. props?: { [key: string]: any }
  93. location?: Object
  94. }
  95. }