global.d.ts 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /// <reference types="@tarojs/taro" />
  2. declare module '*.png';
  3. declare module '*.gif';
  4. declare module '*.jpg';
  5. declare module '*.jpeg';
  6. declare module '*.svg';
  7. declare module '*.css';
  8. declare module '*.less';
  9. declare module '*.scss';
  10. declare module '*.sass';
  11. declare module '*.styl';
  12. declare namespace NodeJS {
  13. interface ProcessEnv {
  14. /** NODE 内置环境变量, 会影响到最终构建生成产物 */
  15. NODE_ENV: 'development' | 'production';
  16. /** 当前构建的平台 */
  17. TARO_ENV:
  18. | 'weapp'
  19. | 'swan'
  20. | 'alipay'
  21. | 'h5'
  22. | 'rn'
  23. | 'tt'
  24. | 'qq'
  25. | 'jd'
  26. | 'harmony'
  27. | 'jdrn';
  28. /**
  29. * 当前构建的小程序 appid
  30. * @description 若不同环境有不同的小程序,可通过在 env 文件中配置环境变量`TARO_APP_ID`来方便快速切换 appid, 而不必手动去修改 dist/project.config.json 文件
  31. * @see https://taro-docs.jd.com/docs/next/env-mode-config#特殊环境变量-taro_app_id
  32. */
  33. TARO_APP_ID: string;
  34. USE_MSW?: string;
  35. }
  36. }