1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- /// <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'
- | 'qq'
- | 'jd'
- | 'harmony'
- | 'jdrn';
- /**
- * 当前构建的小程序 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;
- USE_MSW?: string;
- }
- }
- // Cordova API 类型定义
- declare global {
- interface Window {
- cordova?: any;
- }
- interface Navigator {
- camera?: {
- getPicture: (
- successCallback: (imageData: string) => void,
- errorCallback: (error: string) => void,
- options: any
- ) => void;
- };
- }
- // Cordova Camera 插件类型定义
- const Camera: {
- DestinationType: {
- DATA_URL: number;
- FILE_URI: number;
- NATIVE_URI: number;
- };
- PictureSourceType: {
- PHOTOLIBRARY: number;
- CAMERA: number;
- SAVEDPHOTOALBUM: number;
- };
- EncodingType: {
- JPEG: number;
- PNG: number;
- };
- MediaType: {
- PICTURE: number;
- VIDEO: number;
- ALLMEDIA: number;
- };
- };
- }
- export {};
|