123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- /// <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
- }
- }
- interface RequestType {
- code: number,
- data: any,
- msg: string
- }
-
- interface AbGroupContextType {
- listen(evt: Function): this
- emit(): this
- loop(time?: number): this
- cleanLoop(): this
- cleanStack(): this
- get(): object
- storeGroup(config: object): void
- getExperimentConfigByName(name: string|number): object | undefined
- validExperiment(name: string|number): boolean
- }
-
- type ConfigType = {
- header?: {},
- method?: 'GET' | 'POST',
- timeout?: number
- }
-
- type DataType = {
- [key: string]: any
- baseInfo?: object
- }
-
- type HttpInstanceType = {
- get(url: string, data?: {}, config?: ConfigType): Promise<any>
- post(url: string, data?: {}, config?: ConfigType): Promise<any>
- }
-
- type RoughCardType = {
- title: string
- shareTitle: string
- coverImg: any
- playCount: number
- totalTime: number
- user: any
- id: number
- videoPath: string
- videoCoverSnapshotPath: string
- shareImgPath: string
- favorited: boolean
- recomTraceId: number
- flowPool: string
- measure: number
- measureType: number
- recommendLogVO: string
- recommendSource: number
- }
-
- type CardType = {
- title: string
- coverImgPath: string
- playCount: number
- totalTime: number
- avatarUrl: string
- nickName: string
- id: number
- videoPath: string
- videoCoverSnapshotPath: string
- shareImgPath: string
- favorited: boolean
- }
-
- declare namespace Taro {
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
- interface TaroStatic {
- $app: Taro.getApp.Instance<TaroGeneral.IAnyObject>
- $global: any
- $wx: any
- $http: HttpInstanceType
- $abGroupInstance: AbGroupContextType
- $network: any
- loginSync(): Promise<TaroGeneral.CallbackResult>
- }
- }
-
- declare const wx
|