@moddable/typings 5.10.0 → 5.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/embedded_io/ble/client.d.ts +3 -6
- package/mcpack.d.ts +12 -8
- package/package.json +1 -1
|
@@ -10,13 +10,9 @@ declare module "embedded:io/bluetoothle/central" {
|
|
|
10
10
|
get(adType: number): ArrayBuffer | undefined;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
interface GAPClientFilters {
|
|
14
|
-
services?: string[]
|
|
15
|
-
}
|
|
16
|
-
|
|
17
13
|
interface GAPClientOptions {
|
|
18
14
|
target?: any;
|
|
19
|
-
|
|
15
|
+
services?: string[]
|
|
20
16
|
onError?: (this: GAPClient, error: Error) => void;
|
|
21
17
|
onReadable?: (this: GAPClient, count: number) => void;
|
|
22
18
|
}
|
|
@@ -80,7 +76,8 @@ declare module "embedded:io/bluetoothle/central" {
|
|
|
80
76
|
write(what: GATTClientCharacteristic | GATTClientDescriptor, value: Buffer, callback?: (error: Error | null) => void): void;
|
|
81
77
|
write(what: GATTClientCharacteristic | GATTClientDescriptor, value: Buffer, options: GATTClientWriteOptions, callback?: (error: Error | null) => void): void;
|
|
82
78
|
|
|
83
|
-
|
|
79
|
+
subscribe(characteristic: GATTClientCharacteristic, callback?: (error?: Error) => void) : void;
|
|
80
|
+
unsubscribe(characteristic: GATTClientCharacteristic, callback?: (error?: Error) => void) : void;
|
|
84
81
|
|
|
85
82
|
get maximumWrite(): number;
|
|
86
83
|
|
package/mcpack.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2020-
|
|
2
|
+
* Copyright (c) 2020-2025 Moddable Tech, Inc
|
|
3
3
|
*
|
|
4
4
|
* This file is part of the Moddable SDK Tools.
|
|
5
5
|
*
|
|
@@ -18,17 +18,21 @@
|
|
|
18
18
|
*
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
+
import type Timer from "timer";
|
|
22
|
+
|
|
21
23
|
interface Console {
|
|
22
24
|
log(...log: (string | number | boolean)[]):void;
|
|
23
25
|
}
|
|
24
|
-
declare const console: Console;
|
|
25
26
|
|
|
26
|
-
declare
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
declare global {
|
|
28
|
+
const console: Console;
|
|
29
|
+
const clearImmediate: (timer: Timer) => void;
|
|
30
|
+
const clearInterval: (timer: Timer) => void;
|
|
31
|
+
const clearTimeout: (timer: Timer) => void;
|
|
32
|
+
const setImmediate: (handler: Function) => Timer;
|
|
33
|
+
const setInterval: (handler: Function, timeout?: number) => Timer;
|
|
34
|
+
const setTimeout: (handler: Function, timeout?: number) => Timer;
|
|
35
|
+
}
|
|
32
36
|
|
|
33
37
|
// import fetch from "fetch";
|
|
34
38
|
// import Headers from "headers";
|