@moddable/typings 9.0.1 → 10.0.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/DS18X20.d.ts +40 -0
- package/{embedded_io/system.d.ts → ResourceIterator.d.ts} +4 -15
- package/ble/bleclient.d.ts +1 -0
- package/ble/bleserver.d.ts +1 -0
- package/ble/btutils.d.ts +3 -0
- package/ble/connection.d.ts +1 -0
- package/ble/gap.d.ts +2 -0
- package/ble/gatt.d.ts +4 -0
- package/ble/hidclient.d.ts +5 -0
- package/ble/sm.d.ts +3 -0
- package/captiveportal.d.ts +71 -0
- package/commodetto/Poco.d.ts +10 -2
- package/commodetto/ReadGIF.d.ts +1 -1
- package/commodetto/outline.d.ts +4 -1
- package/commodetto/parseRLE.d.ts +1 -1
- package/commodetto/readJPEG.d.ts +1 -1
- package/config/analog.d.ts +31 -0
- package/config/digital.d.ts +32 -0
- package/config/dns.d.ts +33 -0
- package/config/dnssd.d.ts +31 -0
- package/config/files.d.ts +27 -0
- package/config/flash.d.ts +27 -0
- package/config/httpclient.d.ts +34 -0
- package/config/httpsclient.d.ts +34 -0
- package/config/httpserver.d.ts +33 -0
- package/config/i2c.d.ts +33 -0
- package/config/mqtt.d.ts +27 -0
- package/config/mqttclient.d.ts +31 -0
- package/config/mqttsclient.d.ts +32 -0
- package/config/ntp.d.ts +34 -0
- package/config/pulsecount.d.ts +30 -0
- package/config/pwm.d.ts +30 -0
- package/config/serial.d.ts +31 -0
- package/config/socket.d.ts +34 -0
- package/config/spi.d.ts +31 -0
- package/config/storage.d.ts +27 -0
- package/config/system.d.ts +27 -0
- package/config/tls.d.ts +30 -0
- package/config/update.d.ts +27 -0
- package/config/wsclient.d.ts +31 -0
- package/config/wssclient.d.ts +32 -0
- package/crc.d.ts +1 -1
- package/dns/server.d.ts +1 -0
- package/embedded/RTC/zephyr-builtin.d.ts +48 -0
- package/embedded/RTC.d.ts +18 -7
- package/embedded/display.d.ts +8 -3
- package/embedded/storage/files.d.ts +10 -7
- package/embedded/storage/flash.d.ts +2 -2
- package/embedded/storage/key-value.d.ts +27 -6
- package/embedded/system.d.ts +49 -0
- package/embedded_io/_common.d.ts +42 -3
- package/embedded_io/analog.d.ts +7 -7
- package/embedded_io/audio/in.d.ts +3 -2
- package/embedded_io/audio/out.d.ts +12 -4
- package/embedded_io/ble/central.d.ts +5 -4
- package/embedded_io/ble/peripheral.d.ts +6 -5
- package/embedded_io/crypt/digest.d.ts +2 -2
- package/embedded_io/digital.d.ts +4 -3
- package/embedded_io/digitalbank.d.ts +9 -5
- package/embedded_io/i2c.d.ts +9 -6
- package/embedded_io/image/in/camera.d.ts +82 -0
- package/embedded_io/pulsecount.d.ts +7 -5
- package/embedded_io/pwm.d.ts +11 -5
- package/embedded_io/serial.d.ts +33 -16
- package/embedded_io/smbus.d.ts +1 -1
- package/embedded_io/socket/listener.d.ts +3 -2
- package/embedded_io/socket/tcp/tls.d.ts +41 -12
- package/embedded_io/socket/tcp.d.ts +26 -12
- package/embedded_io/socket/udp.d.ts +17 -12
- package/embedded_io/spi.d.ts +8 -6
- package/embedded_network/dns/resolver/udp.d.ts +13 -6
- package/embedded_network/dns/server/udp.d.ts +39 -0
- package/embedded_network/dnssd.d.ts +9 -7
- package/embedded_network/http/client.d.ts +23 -8
- package/embedded_network/http/server/route/serversentevents.d.ts +48 -0
- package/embedded_network/http/server/route/static.d.ts +41 -0
- package/embedded_network/http/server/route/webdav.d.ts +42 -0
- package/embedded_network/http/server/route/ws/handshake.d.ts +28 -0
- package/embedded_network/http/server.d.ts +28 -6
- package/embedded_network/interface/ethernet.d.ts +3 -3
- package/embedded_network/interface/wifi/accesspoint.d.ts +2 -2
- package/embedded_network/interface/wifi.d.ts +21 -12
- package/embedded_network/mdns.d.ts +2 -2
- package/embedded_network/mqtt/client.d.ts +55 -16
- package/embedded_network/ntp/client.d.ts +16 -8
- package/embedded_network/websocket/client.d.ts +49 -29
- package/embedded_provider/builtin.d.ts +40 -34
- package/file.d.ts +4 -0
- package/flash.d.ts +1 -0
- package/global.d.ts +0 -3
- package/host/default.d.ts +31 -0
- package/host/esp32/moddable_six.d.ts +50 -0
- package/host/esp32/moddable_two.d.ts +55 -0
- package/host/generic.d.ts +47 -0
- package/host/index.d.ts +24 -0
- package/host/lin.d.ts +30 -0
- package/host/mac.d.ts +30 -0
- package/host/pebble.d.ts +70 -0
- package/host/win.d.ts +30 -0
- package/http.d.ts +2 -0
- package/mcpack.d.ts +20 -0
- package/mdns.d.ts +1 -0
- package/modules.d.ts +1 -1
- package/mqtt/js.d.ts +22 -4
- package/neopixel.d.ts +2 -2
- package/onewire.d.ts +31 -0
- package/package.json +14 -4
- package/pebble/accelerometer.d.ts +5 -5
- package/pebble/battery.d.ts +3 -3
- package/pebble/button.d.ts +2 -2
- package/pebble/compass.d.ts +3 -3
- package/pebble/dictation.d.ts +2 -2
- package/pebble/global.d.ts +37 -3
- package/pebble/health.d.ts +2 -2
- package/pebble/location.d.ts +2 -2
- package/pebble/message.d.ts +5 -5
- package/pebble/piu.d.ts +2 -57
- package/pebble/poco.d.ts +2 -2
- package/pebble/texture.d.ts +33 -0
- package/pebble/touch.d.ts +47 -0
- package/ping.d.ts +1 -0
- package/pins/analog.d.ts +1 -0
- package/pins/audioin.d.ts +1 -0
- package/pins/digital.d.ts +1 -0
- package/pins/i2c.d.ts +1 -0
- package/pins/pwm.d.ts +1 -0
- package/pins/rmt.d.ts +1 -0
- package/pins/servo.d.ts +1 -0
- package/pins/smbus.d.ts +1 -0
- package/piu/MC-types.d.ts +231 -97
- package/piu/MC.d.ts +2 -1
- package/piu/QRCode.d.ts +5 -0
- package/piu/RoundRect.d.ts +53 -0
- package/piu/SVGImage.d.ts +62 -0
- package/piu/Timeline.d.ts +17 -21
- package/pococolorcell.d.ts +25 -0
- package/pocoqrcode.d.ts +25 -0
- package/pocostatic.d.ts +25 -0
- package/preference.d.ts +1 -0
- package/securesocket.d.ts +1 -0
- package/sntp.d.ts +1 -0
- package/socket.d.ts +6 -0
- package/ssl/session.d.ts +60 -0
- package/time.d.ts +1 -1
- package/tsconfig.es2024.json +0 -1
- package/tsconfig.es2025.json +1 -1
- package/web/bluetooth.d.ts +112 -0
- package/web/decompressionstream.d.ts +1 -1
- package/web/eventsource.d.ts +12 -7
- package/web/fetch-streams.d.ts +57 -0
- package/web/fetch.d.ts +1 -1
- package/web/serial.d.ts +58 -0
- package/web/websocket.d.ts +18 -13
- package/web/webstorage.d.ts +3 -0
- package/web/worker.d.ts +2 -0
- package/websocket.d.ts +2 -0
- package/wifi.d.ts +1 -0
- package/xs.d.ts +54 -6
- package/display.d.ts +0 -68
- package/pebble/device.d.ts +0 -51
package/pebble/button.d.ts
CHANGED
|
@@ -58,10 +58,10 @@ interface PebbleButtonMultipleOptions extends PebbleButtonRecognizers {
|
|
|
58
58
|
|
|
59
59
|
type PebbleButtonOptions = PebbleButtonSingleOptions | PebbleButtonMultipleOptions;
|
|
60
60
|
|
|
61
|
-
declare class PebbleButton {
|
|
61
|
+
declare class PebbleButton implements Disposable {
|
|
62
62
|
constructor(options: PebbleButtonOptions);
|
|
63
63
|
close(): void;
|
|
64
|
+
[Symbol.dispose](): void;
|
|
64
65
|
}
|
|
65
|
-
interface PebbleButton extends Disposable {}
|
|
66
66
|
|
|
67
67
|
export default PebbleButton;
|
package/pebble/compass.d.ts
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
21
|
interface CompassOptions {
|
|
22
|
-
onSample?: () => void;
|
|
22
|
+
onSample?: (this: Compass) => void;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
interface CompassConfigureOptions {
|
|
@@ -30,12 +30,12 @@ interface CompassSample {
|
|
|
30
30
|
heading: number;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
declare class Compass {
|
|
33
|
+
declare class Compass implements Disposable {
|
|
34
34
|
constructor(options: CompassOptions);
|
|
35
35
|
close(): void;
|
|
36
36
|
configure(options: CompassConfigureOptions): void;
|
|
37
37
|
sample(): CompassSample;
|
|
38
|
+
[Symbol.dispose](): void;
|
|
38
39
|
}
|
|
39
|
-
interface Compass extends Disposable {}
|
|
40
40
|
|
|
41
41
|
export default Compass;
|
package/pebble/dictation.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ interface DictationConfigureOptions {
|
|
|
29
29
|
errorDialogs?: boolean;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
declare class Dictation {
|
|
32
|
+
declare class Dictation implements Disposable {
|
|
33
33
|
constructor(options: DictationOptions);
|
|
34
34
|
close(): void;
|
|
35
35
|
configure(options: DictationConfigureOptions): void;
|
|
@@ -37,7 +37,7 @@ declare class Dictation {
|
|
|
37
37
|
stop(): void;
|
|
38
38
|
read(): string | undefined;
|
|
39
39
|
readonly format: "string";
|
|
40
|
+
[Symbol.dispose](): void;
|
|
40
41
|
}
|
|
41
|
-
interface Dictation extends Disposable {}
|
|
42
42
|
|
|
43
43
|
export default Dictation;
|
package/pebble/global.d.ts
CHANGED
|
@@ -18,6 +18,13 @@
|
|
|
18
18
|
*
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
+
// on Pebble, a texture may be created from the id of a GBitmap resource
|
|
22
|
+
/// <reference path="./texture.d.ts" />
|
|
23
|
+
// the Piu QRCode, RoundRect and SVGImage contents are the same modules as on every other target; their typings declare the globals
|
|
24
|
+
/// <reference path="../piu/QRCode.d.ts" />
|
|
25
|
+
/// <reference path="../piu/RoundRect.d.ts" />
|
|
26
|
+
/// <reference path="../piu/SVGImage.d.ts" />
|
|
27
|
+
|
|
21
28
|
/*
|
|
22
29
|
console
|
|
23
30
|
*/
|
|
@@ -116,6 +123,35 @@ declare function setInterval(callback: () => void, delay: number): number;
|
|
|
116
123
|
declare function clearInterval(id: number): void;
|
|
117
124
|
declare function setTimeout(callback: () => void, delay: number): number;
|
|
118
125
|
declare function clearTimeout(id: number): void;
|
|
126
|
+
declare function setImmediate(callback: () => void): number;
|
|
127
|
+
declare function clearImmediate(id: number): void;
|
|
128
|
+
|
|
129
|
+
/*
|
|
130
|
+
Modules and native functions
|
|
131
|
+
*/
|
|
132
|
+
|
|
133
|
+
/** imports a module of the application and returns its namespace */
|
|
134
|
+
declare function importNow(specifier: string): any;
|
|
135
|
+
/** the application's C functions, when it has any (see XS FFI) */
|
|
136
|
+
declare const Natives: Record<string, (...args: any[]) => any>;
|
|
137
|
+
|
|
138
|
+
/*
|
|
139
|
+
Screen: Pebble's display adds whether it is color and round, and the area not obstructed by the system
|
|
140
|
+
*/
|
|
141
|
+
|
|
142
|
+
declare module "commodetto/Poco" {
|
|
143
|
+
interface Screen {
|
|
144
|
+
readonly color: boolean;
|
|
145
|
+
readonly round: boolean;
|
|
146
|
+
readonly frameBuffer: true;
|
|
147
|
+
readonly unobstructed: {
|
|
148
|
+
readonly x: number;
|
|
149
|
+
readonly y: number;
|
|
150
|
+
readonly width: number;
|
|
151
|
+
readonly height: number;
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
}
|
|
119
155
|
|
|
120
156
|
/*
|
|
121
157
|
Web
|
|
@@ -150,15 +186,13 @@ type Texture = import("piu/MC-types").Texture;
|
|
|
150
186
|
type Transition = import("piu/MC-types").Transition;
|
|
151
187
|
|
|
152
188
|
declare const Inverter: InverterConstructor;
|
|
153
|
-
declare const RonndRect: RoundRectConstructor;
|
|
154
189
|
declare const ScreenBuffer: ScreenBufferConstructor;
|
|
155
|
-
declare const SVGImage: SVGImageConsructor;
|
|
156
190
|
|
|
157
191
|
/*
|
|
158
192
|
ECMA-419
|
|
159
193
|
*/
|
|
160
194
|
|
|
161
|
-
// device is
|
|
195
|
+
// device is typed by typings/host/pebble.d.ts
|
|
162
196
|
|
|
163
197
|
declare module "embedded:storage/files" {
|
|
164
198
|
interface DirectoryOpenFileOptions {
|
package/pebble/health.d.ts
CHANGED
|
@@ -76,11 +76,11 @@ interface HealthMetricAlertOptions {
|
|
|
76
76
|
threshold: number;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
declare class HealthMetricAlert {
|
|
79
|
+
declare class HealthMetricAlert implements Disposable {
|
|
80
80
|
constructor(options: HealthMetricAlertOptions);
|
|
81
81
|
close(): void;
|
|
82
|
+
[Symbol.dispose](): void;
|
|
82
83
|
}
|
|
83
|
-
interface HealthMetricAlert extends Disposable {}
|
|
84
84
|
|
|
85
85
|
interface HealthMinuteHistoryOptions {
|
|
86
86
|
length: number;
|
package/pebble/location.d.ts
CHANGED
|
@@ -40,12 +40,12 @@ interface LocationConfiguration {
|
|
|
40
40
|
maximumAge?: number;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
declare class Location {
|
|
43
|
+
declare class Location implements Disposable {
|
|
44
44
|
constructor(options: LocationOptions);
|
|
45
45
|
close(): void;
|
|
46
46
|
configure(options: LocationConfiguration): void;
|
|
47
47
|
sample(): LocationSample | undefined;
|
|
48
|
+
[Symbol.dispose](): void;
|
|
48
49
|
}
|
|
49
|
-
interface Location extends Disposable {}
|
|
50
50
|
|
|
51
51
|
export default Location;
|
package/pebble/message.d.ts
CHANGED
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
21
|
interface MessageOptions {
|
|
22
|
-
onReadable?: () => void;
|
|
23
|
-
onWritable?: (count: number) => void;
|
|
24
|
-
onSuspend?: () => void;
|
|
22
|
+
onReadable?: (this: Message) => void;
|
|
23
|
+
onWritable?: (this: Message, count: number) => void;
|
|
24
|
+
onSuspend?: (this: Message) => void;
|
|
25
25
|
format?: "map";
|
|
26
26
|
input?: number;
|
|
27
27
|
output?: number;
|
|
@@ -32,7 +32,7 @@ type MessageKey = string | number;
|
|
|
32
32
|
type MessageReadValue = number | string | ArrayBuffer;
|
|
33
33
|
type MessageWriteValue = number | string | ByteBuffer | boolean;
|
|
34
34
|
|
|
35
|
-
declare class Message {
|
|
35
|
+
declare class Message implements Disposable {
|
|
36
36
|
constructor(options: MessageOptions);
|
|
37
37
|
close(): void;
|
|
38
38
|
read(): Map<MessageKey, MessageReadValue>;
|
|
@@ -41,7 +41,7 @@ declare class Message {
|
|
|
41
41
|
set format(value: "map");
|
|
42
42
|
get input(): number;
|
|
43
43
|
get output(): number;
|
|
44
|
+
[Symbol.dispose](): void;
|
|
44
45
|
}
|
|
45
|
-
interface Message extends Disposable {}
|
|
46
46
|
|
|
47
47
|
export default Message;
|
package/pebble/piu.d.ts
CHANGED
|
@@ -18,63 +18,6 @@
|
|
|
18
18
|
*
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
-
/*
|
|
22
|
-
SVGImage
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
interface SVGImageDictionary extends ContentDictionary {
|
|
26
|
-
clip?: boolean;
|
|
27
|
-
id?: number;
|
|
28
|
-
path?: string;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
interface SVGImage extends Content {
|
|
32
|
-
opacity: number;
|
|
33
|
-
center(x: number, y: number): void;
|
|
34
|
-
cx: number;
|
|
35
|
-
cy: number;
|
|
36
|
-
rotate(a: number): void;
|
|
37
|
-
r: number;
|
|
38
|
-
scale(x: number, y: number): void;
|
|
39
|
-
s: number;
|
|
40
|
-
sx: number;
|
|
41
|
-
sy: number;
|
|
42
|
-
translate(x: number, y: number): void;
|
|
43
|
-
tx: number;
|
|
44
|
-
ty: number;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
interface SVGImageConsructor {
|
|
48
|
-
new(behaviorData?: any, dictionary?: SVGImageDictionary): SVGImage;
|
|
49
|
-
template<T>(this: T, fn: (arg: any) => SVGImageDictionary): T;
|
|
50
|
-
(behaviorData?: any, dictionary?: SVGImageDictionary): SVGImage;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/*
|
|
54
|
-
RoundRect
|
|
55
|
-
*/
|
|
56
|
-
|
|
57
|
-
interface RoundRectDictionary extends ContentDictionary {
|
|
58
|
-
corners?: number;
|
|
59
|
-
radius?: number;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
interface RoundRect extends Content {
|
|
63
|
-
corners: number;
|
|
64
|
-
radius: number;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
interface RoundRectConstructor {
|
|
68
|
-
new(behaviorData?: any, dictionary?: RoundRectDictionary): RoundRect;
|
|
69
|
-
template<T>(this: T, fn: (arg: any) => RoundRectDictionary): T;
|
|
70
|
-
(behaviorData?: any, dictionary?: RoundRectDictionary): RoundRect;
|
|
71
|
-
|
|
72
|
-
readonly topLeft: 1;
|
|
73
|
-
readonly topRight: 2;
|
|
74
|
-
readonly bottomLeft: 4;
|
|
75
|
-
readonly bottomRight: 8;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
21
|
/*
|
|
79
22
|
Inverter
|
|
80
23
|
*/
|
|
@@ -85,6 +28,7 @@ interface Inverter extends Content {
|
|
|
85
28
|
interface InverterConstructor {
|
|
86
29
|
new(behaviorData?: any, dictionary?: ContentDictionary): Inverter;
|
|
87
30
|
template<T>(this: T, fn: (arg: any) => ContentDictionary): T;
|
|
31
|
+
(behaviorData?: any, dictionary?: ContentDictionary): Inverter;
|
|
88
32
|
}
|
|
89
33
|
|
|
90
34
|
/*
|
|
@@ -97,4 +41,5 @@ interface ScreenBuffer extends Content {
|
|
|
97
41
|
interface ScreenBufferConstructor {
|
|
98
42
|
new(behaviorData?: any, dictionary?: ContentDictionary): ScreenBuffer;
|
|
99
43
|
template<T>(this: T, fn: (arg: any) => ContentDictionary): T;
|
|
44
|
+
(behaviorData?: any, dictionary?: ContentDictionary): ScreenBuffer;
|
|
100
45
|
}
|
package/pebble/poco.d.ts
CHANGED
|
@@ -37,8 +37,8 @@ declare module "commodetto/Poco" {
|
|
|
37
37
|
readonly height: number
|
|
38
38
|
};
|
|
39
39
|
drawLine(x0: number, y0: number, x1: number, y1: number, color: number, width: number): void;
|
|
40
|
-
drawRoundRect(x0: number, y0: number, x1: number, y1: number, color: number, radius
|
|
41
|
-
frameRoundRect(x0: number, y0: number, x1: number, y1: number, color: number, radius
|
|
40
|
+
drawRoundRect(x0: number, y0: number, x1: number, y1: number, color: number, radius?: number, corners?: number): void;
|
|
41
|
+
frameRoundRect(x0: number, y0: number, x1: number, y1: number, color: number, radius?: number): void;
|
|
42
42
|
drawCircle(color: number, x: number, y: number, r: number, from: number, to: number): void;
|
|
43
43
|
drawDCI(dci: PebbleDrawCommandImage | PebbleDrawCommandSequence, x: number, y: number): void;
|
|
44
44
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2026 Moddable Tech, Inc.
|
|
3
|
+
*
|
|
4
|
+
* This file is part of the Moddable SDK Tools.
|
|
5
|
+
*
|
|
6
|
+
* The Moddable SDK Tools is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU General Public License as published by
|
|
8
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
* (at your option) any later version.
|
|
10
|
+
*
|
|
11
|
+
* The Moddable SDK Tools is distributed in the hope that it will be useful,
|
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
* GNU General Public License for more details.
|
|
15
|
+
*
|
|
16
|
+
* You should have received a copy of the GNU General Public License
|
|
17
|
+
* along with the Moddable SDK Tools. If not, see <http://www.gnu.org/licenses/>.
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
// on Pebble, a texture may be created from the id of a GBitmap resource (modules/piu/Pebble/piuPebble.js).
|
|
22
|
+
// A module, so that this augments the real module piu/MC-types rather than replacing it.
|
|
23
|
+
|
|
24
|
+
import type { Texture } from "piu/MC-types";
|
|
25
|
+
import type Bitmap from "commodetto/Bitmap";
|
|
26
|
+
|
|
27
|
+
declare module "piu/MC-types" {
|
|
28
|
+
interface TextureConstructor {
|
|
29
|
+
new(resourceID: number): Texture;
|
|
30
|
+
/** a texture over bitmaps already in memory, for example from parseRLE */
|
|
31
|
+
new(path: null | undefined, alphaBitmap: Bitmap | null | undefined, colorBitmap?: Bitmap | null): Texture;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2026 Moddable Tech, Inc.
|
|
3
|
+
*
|
|
4
|
+
* This file is part of the Moddable SDK Tools.
|
|
5
|
+
*
|
|
6
|
+
* The Moddable SDK Tools is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU General Public License as published by
|
|
8
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
* (at your option) any later version.
|
|
10
|
+
*
|
|
11
|
+
* The Moddable SDK Tools is distributed in the hope that it will be useful,
|
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
* GNU General Public License for more details.
|
|
15
|
+
*
|
|
16
|
+
* You should have received a copy of the GNU General Public License
|
|
17
|
+
* along with the Moddable SDK Tools. If not, see <http://www.gnu.org/licenses/>.
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
// the Pebble touch screen, as an ECMA-419 Touch sensor (build/devices/pebble/modules/touch)
|
|
22
|
+
|
|
23
|
+
declare module "embedded:sensor/Touch/pebble" {
|
|
24
|
+
interface TouchOptions {
|
|
25
|
+
/** invoked when the touch state changes: call sample() for the touch in progress */
|
|
26
|
+
onSample?: (this: Touch) => void;
|
|
27
|
+
target?: any;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
interface TouchPoint {
|
|
31
|
+
x: number;
|
|
32
|
+
y: number;
|
|
33
|
+
id: number;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
class Touch implements Disposable {
|
|
37
|
+
constructor(options?: TouchOptions);
|
|
38
|
+
close(): void;
|
|
39
|
+
configure(options?: {}): void;
|
|
40
|
+
/** the touch in progress, if any */
|
|
41
|
+
sample(): TouchPoint[];
|
|
42
|
+
target?: any;
|
|
43
|
+
[Symbol.dispose](): void;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export default Touch;
|
|
47
|
+
}
|
package/ping.d.ts
CHANGED
package/pins/analog.d.ts
CHANGED
package/pins/audioin.d.ts
CHANGED
package/pins/digital.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ declare module 'pins/digital' {
|
|
|
26
26
|
type Output = 8
|
|
27
27
|
type OutputOpenDrain = 9
|
|
28
28
|
export type Mode = Input | InputPullUp | InputPullDown | InputPullUpDown | Output | OutputOpenDrain
|
|
29
|
+
/** @deprecated Use the ECMA-419 Digital class, embedded:io/digital */
|
|
29
30
|
export class Digital {
|
|
30
31
|
public constructor(dictionary: { pin: number; mode: number; port?: string })
|
|
31
32
|
public constructor(pin: number, mode: number)
|
package/pins/i2c.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ declare module 'pins/i2c' {
|
|
|
29
29
|
| Uint8ClampedArray
|
|
30
30
|
| Float32Array
|
|
31
31
|
| Float64Array
|
|
32
|
+
/** @deprecated Use the ECMA-419 I2C class, embedded:io/i2c */
|
|
32
33
|
class I2C {
|
|
33
34
|
public constructor(dictionary: { address: number; scl?: number; sda?: number; hz?: number; timeout?: number })
|
|
34
35
|
public constructor(port: number[], pin: number, mode: number)
|
package/pins/pwm.d.ts
CHANGED
package/pins/rmt.d.ts
CHANGED
package/pins/servo.d.ts
CHANGED
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
21
|
declare module 'pins/servo' {
|
|
22
|
+
/** @deprecated The pins modules are legacy; prefer the ECMA-419 embedded:io/* classes */
|
|
22
23
|
class Servo {
|
|
23
24
|
public constructor(dictionary: { pin: number; min?: number; max?: number })
|
|
24
25
|
public write(degrees: number): void
|
package/pins/smbus.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ declare module 'pins/smbus' {
|
|
|
29
29
|
| Uint8ClampedArray
|
|
30
30
|
| Float32Array
|
|
31
31
|
| Float64Array
|
|
32
|
+
/** @deprecated Use the ECMA-419 SMBus class, embedded:io/smbus */
|
|
32
33
|
class SMBus {
|
|
33
34
|
public constructor(dictionary: { address: number; scl?: number; sda?: number; hz?: number; timeout?: number })
|
|
34
35
|
public constructor(port: number[], pin: number, mode: number)
|