Skip to content

Commit 21b6427

Browse files
authored
feat(types): Adds the BeaconObj type and extends the AdvertiseReqObj interface. (DefinitelyTyped#74329)
1 parent 7c27ede commit 21b6427

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

types/wechat-miniprogram/lib.wx.api.d.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,17 @@ declare namespace WechatMiniprogram {
257257
/** 缩略图路径,若留空则使用视频首帧 */
258258
thumbPath?: string;
259259
}
260+
/** 以 beacon 设备形式广播的参数 */
261+
interface BeaconObj {
262+
/** Beacon 设备广播的 UUID */
263+
uuid: string;
264+
/** Beacon 设备的主 ID */
265+
major: number;
266+
/** Beacon 设备的次 ID */
267+
minor: number;
268+
/** 用于判断距离设备 1 米时 RSSI 大小的参考值 */
269+
measuredPower?: number;
270+
}
260271
/** 广播自定义参数 */
261272
interface AdvertiseReqObj {
262273
/** 当前Service是否可连接 */
@@ -267,6 +278,8 @@ declare namespace WechatMiniprogram {
267278
manufacturerData?: ManufacturerData[];
268279
/** 要广播的serviceUuid列表 */
269280
serviceUuids?: string[];
281+
/** 以 beacon 设备形式广播的参数 */
282+
beacon?: BeaconObj;
270283
}
271284
/** animationData */
272285
interface AnimationExportResult {

0 commit comments

Comments
 (0)