env.d.ts 318 B

123456789
  1. /// <reference types="vite/client" />
  2. interface ImportMetaEnv {
  3. // 我们每次添加完新的环境变量就在此添加一次ts类型
  4. // 这样我们就能在使用 import.meta.env 时获得ts语法提示
  5. readonly VITE_APP_API_BASEURL: string;
  6. }
  7. interface ImportMeta {
  8. readonly env: ImportMetaEnv;
  9. }