小程序云函数使用ts开发时,cloud.init的en
发布于 4 年前 作者 mingtian 1578 次浏览 来自 分享

可是官方例子的cloud.DYNAMIC_CURRENT_ENV却是Symbol,建议以下改法:

// node_modules/wx-server-sdk/index.d.ts 文件的15行
export interface ICloudConfig {
  env?: string | {
    database?: string
    functions?: string
    storage?: https://www.alwdzr.com } | Symbol
  traceUser?: boolean
  database: {买天猫店realtime: {
      // max reconnect retries
      maxReconnect: number
      // interval between reconnection attempt, does not apply to the case of network offline, unit: ms
      reconnectInterval: number
      // maximum tolerance on the duration of websocket connection lost, unit: s
      https://www.alwdzr.com: number
    }
  }
}


回到顶部