uni-ticket-system/node_modules/@dcloudio/uni-push/lib/gtpush-min.d.ts
2023-12-05 10:11:10 +08:00

40 lines
839 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

declare namespace GtPush {
/**
* 设置调试模式
* @param debugMode 打开或关闭调试模式
*/
function setDebugMode(debugMode: boolean): void
/**
* 重新连接或断开socket
* @param enable
*/
function enableSocket(enable: boolean): void
/**
* 初始化GtPush
*/
function init(obj: {
/**
* 个推官网生成的appid
*/
appid: string
/**
* 错误回调
*/
onError?: (res: { error: any }) => void
/**
* 个推终端ID回调标识当前终端和应用
*/
onClientId?: (res: { cid: string }) => void
/**
* 个推终端ID在线状态回调
*/
onlineState?: (res: { online: boolean }) => void
/**
* 推送消息回调
*/
onPushMsg?: (res: { message: string }) => void
}): void
}
export default GtPush