This commit is contained in:
2023-08-30 06:09:15 +08:00
commit 90225f68e0
31 changed files with 14842 additions and 0 deletions

31
types/global.d.ts vendored Normal file
View File

@@ -0,0 +1,31 @@
/// <reference types="@tarojs/taro" />
declare module '*.png';
declare module '*.gif';
declare module '*.jpg';
declare module '*.jpeg';
declare module '*.svg';
declare module '*.css';
declare module '*.less';
declare module '*.scss';
declare module '*.sass';
declare module '*.styl';
declare namespace NodeJS {
interface ProcessEnv {
/** NODE 内置环境变量, 会影响到最终构建生成产物 */
NODE_ENV: 'development' | 'production',
/** 当前构建的平台 */
TARO_ENV: 'weapp' | 'swan' | 'alipay' | 'h5' | 'rn' | 'tt' | 'quickapp' | 'qq' | 'jd'
/**
* 当前构建的小程序 appid
* @description 若不同环境有不同的小程序,可通过在 env 文件中配置环境变量`TARO_APP_ID`来方便快速切换 appid 而不必手动去修改 dist/project.config.json 文件
* @see https://taro-docs.jd.com/docs/next/env-mode-config#特殊环境变量-taro_app_id
*/
TARO_APP_ID: string
}
}
declare module '@tarojs/components' {
export * from '@tarojs/components/types/index.vue3'
}

10
types/vue.d.ts vendored Normal file
View File

@@ -0,0 +1,10 @@
export {}
declare module 'vue' {
export interface GlobalComponents extends JSX.IntrinsicElements {
/** Note: Vue 在 runtime 中将 JSX.IntrinsicElements 通过 index signature 重复声明标签
* 这会导致插件无法正常跳转类型,可以手动覆盖声明标签活得更好的体验,参考如下:
* 'scroll-view': JSX.IntrinsicElements['scroll-view']
*/
}
}