@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
|
@@ -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
|
+
// the manifest of this configuration includes the manifests of these configurations
|
|
22
|
+
/// <reference path="./socket.d.ts" />
|
|
23
|
+
|
|
24
|
+
declare module "embedded:provider/builtin" {
|
|
25
|
+
import type { HTTPServerProvider } from "embedded:network/http/server";
|
|
26
|
+
|
|
27
|
+
interface DeviceNetwork {
|
|
28
|
+
http: DeviceNetworkHTTP;
|
|
29
|
+
}
|
|
30
|
+
interface DeviceNetworkHTTP {
|
|
31
|
+
server: HTTPServerProvider;
|
|
32
|
+
}
|
|
33
|
+
}
|
package/config/i2c.d.ts
ADDED
|
@@ -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
|
+
declare module "embedded:provider/builtin" {
|
|
22
|
+
import type I2C from "embedded:io/i2c";
|
|
23
|
+
import type SMBus from "embedded:io/smbus";
|
|
24
|
+
|
|
25
|
+
interface Device {
|
|
26
|
+
io: DeviceIO;
|
|
27
|
+
i2c: DeviceI2C;
|
|
28
|
+
}
|
|
29
|
+
interface DeviceIO {
|
|
30
|
+
I2C: typeof I2C;
|
|
31
|
+
SMBus: typeof SMBus;
|
|
32
|
+
}
|
|
33
|
+
}
|
package/config/mqtt.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
declare module "embedded:provider/builtin" {
|
|
22
|
+
import type { MQTTClientProvider } from "embedded:network/mqtt/client";
|
|
23
|
+
|
|
24
|
+
interface DeviceNetwork {
|
|
25
|
+
mqtt: MQTTClientProvider;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
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 manifest of this configuration includes the manifests of these configurations
|
|
22
|
+
/// <reference path="./dns.d.ts" />
|
|
23
|
+
/// <reference path="./socket.d.ts" />
|
|
24
|
+
|
|
25
|
+
declare module "embedded:provider/builtin" {
|
|
26
|
+
import type { MQTTClientProvider } from "embedded:network/mqtt/client";
|
|
27
|
+
|
|
28
|
+
interface DeviceNetwork {
|
|
29
|
+
mqtt: MQTTClientProvider;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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 manifest of this configuration includes the manifests of these configurations
|
|
22
|
+
/// <reference path="./tls.d.ts" />
|
|
23
|
+
/// <reference path="./mqttclient.d.ts" />
|
|
24
|
+
/// <reference path="./dns.d.ts" />
|
|
25
|
+
|
|
26
|
+
declare module "embedded:provider/builtin" {
|
|
27
|
+
import type { MQTTClientProvider } from "embedded:network/mqtt/client";
|
|
28
|
+
|
|
29
|
+
interface DeviceNetwork {
|
|
30
|
+
mqtts: MQTTClientProvider;
|
|
31
|
+
}
|
|
32
|
+
}
|
package/config/ntp.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
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 manifest of this configuration includes the manifests of these configurations
|
|
22
|
+
/// <reference path="./dns.d.ts" />
|
|
23
|
+
/// <reference path="./socket.d.ts" />
|
|
24
|
+
|
|
25
|
+
declare module "embedded:provider/builtin" {
|
|
26
|
+
import type { NTPClientProvider } from "embedded:network/ntp/client";
|
|
27
|
+
|
|
28
|
+
interface DeviceNetwork {
|
|
29
|
+
ntp: DeviceNetworkNTP;
|
|
30
|
+
}
|
|
31
|
+
interface DeviceNetworkNTP {
|
|
32
|
+
client: NTPClientProvider;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
declare module "embedded:provider/builtin" {
|
|
22
|
+
import type PulseCount from "embedded:io/pulsecount";
|
|
23
|
+
|
|
24
|
+
interface Device {
|
|
25
|
+
io: DeviceIO;
|
|
26
|
+
}
|
|
27
|
+
interface DeviceIO {
|
|
28
|
+
PulseCount: typeof PulseCount;
|
|
29
|
+
}
|
|
30
|
+
}
|
package/config/pwm.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
declare module "embedded:provider/builtin" {
|
|
22
|
+
import type PWM from "embedded:io/pwm";
|
|
23
|
+
|
|
24
|
+
interface Device {
|
|
25
|
+
io: DeviceIO;
|
|
26
|
+
}
|
|
27
|
+
interface DeviceIO {
|
|
28
|
+
PWM: typeof PWM;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
declare module "embedded:provider/builtin" {
|
|
22
|
+
import type Serial from "embedded:io/serial";
|
|
23
|
+
|
|
24
|
+
interface Device {
|
|
25
|
+
io: DeviceIO;
|
|
26
|
+
serial: DeviceSerial;
|
|
27
|
+
}
|
|
28
|
+
interface DeviceIO {
|
|
29
|
+
Serial: typeof Serial;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
declare module "embedded:provider/builtin" {
|
|
22
|
+
import type TCP from "embedded:io/socket/tcp";
|
|
23
|
+
import type UDP from "embedded:io/socket/udp";
|
|
24
|
+
import type Listener from "embedded:io/socket/listener";
|
|
25
|
+
|
|
26
|
+
interface Device {
|
|
27
|
+
io: DeviceIO;
|
|
28
|
+
}
|
|
29
|
+
interface DeviceIO {
|
|
30
|
+
TCP: typeof TCP;
|
|
31
|
+
UDP: typeof UDP;
|
|
32
|
+
Listener: typeof Listener;
|
|
33
|
+
}
|
|
34
|
+
}
|
package/config/spi.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
declare module "embedded:provider/builtin" {
|
|
22
|
+
import type SPI from "embedded:io/spi";
|
|
23
|
+
|
|
24
|
+
interface Device {
|
|
25
|
+
io: DeviceIO;
|
|
26
|
+
spi: DeviceSPI;
|
|
27
|
+
}
|
|
28
|
+
interface DeviceIO {
|
|
29
|
+
SPI: typeof SPI;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
declare module "embedded:provider/builtin" {
|
|
22
|
+
import type keyValue from "embedded:storage/key-value";
|
|
23
|
+
|
|
24
|
+
interface Device {
|
|
25
|
+
keyValue: typeof keyValue;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
declare module "embedded:provider/builtin" {
|
|
22
|
+
import type System from "embedded:system";
|
|
23
|
+
|
|
24
|
+
interface Device {
|
|
25
|
+
system: typeof System;
|
|
26
|
+
}
|
|
27
|
+
}
|
package/config/tls.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
declare module "embedded:provider/builtin" {
|
|
22
|
+
import type TLS from "embedded:io/socket/tcp/tls";
|
|
23
|
+
|
|
24
|
+
interface Device {
|
|
25
|
+
io: DeviceIO;
|
|
26
|
+
}
|
|
27
|
+
interface DeviceIO {
|
|
28
|
+
TLS: typeof TLS;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
declare module "embedded:provider/builtin" {
|
|
22
|
+
import type update from "embedded:update";
|
|
23
|
+
|
|
24
|
+
interface Device {
|
|
25
|
+
update: typeof update;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
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 manifest of this configuration includes the manifests of these configurations
|
|
22
|
+
/// <reference path="./dns.d.ts" />
|
|
23
|
+
/// <reference path="./socket.d.ts" />
|
|
24
|
+
|
|
25
|
+
declare module "embedded:provider/builtin" {
|
|
26
|
+
import type { WebSocketClientProvider } from "embedded:network/websocket/client";
|
|
27
|
+
|
|
28
|
+
interface DeviceNetwork {
|
|
29
|
+
ws: WebSocketClientProvider;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
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 manifest of this configuration includes the manifests of these configurations
|
|
22
|
+
/// <reference path="./wsclient.d.ts" />
|
|
23
|
+
/// <reference path="./tls.d.ts" />
|
|
24
|
+
/// <reference path="./dns.d.ts" />
|
|
25
|
+
|
|
26
|
+
declare module "embedded:provider/builtin" {
|
|
27
|
+
import type { WebSocketClientProvider } from "embedded:network/websocket/client";
|
|
28
|
+
|
|
29
|
+
interface DeviceNetwork {
|
|
30
|
+
wss: WebSocketClientProvider;
|
|
31
|
+
}
|
|
32
|
+
}
|
package/crc.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ declare module "crc" {
|
|
|
29
29
|
constructor(polynomial: number, initial_value?: number, reflectInput?: boolean, reflectOutput?: boolean, xorOutput?: number)
|
|
30
30
|
close(): void
|
|
31
31
|
checksum(bytes: ByteBuffer): number
|
|
32
|
-
reset():
|
|
32
|
+
reset(): void
|
|
33
33
|
}
|
|
34
34
|
export {CRC8 as default, CRC8, CRC16};
|
|
35
35
|
}
|
package/dns/server.d.ts
CHANGED
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
declare module "embedded:RTC/zephyr-builtin" {
|
|
22
|
+
import type { PortSpecifier } from "embedded:io/_common";
|
|
23
|
+
import type { RTCConfigureOptions } from "embedded:RTC";
|
|
24
|
+
|
|
25
|
+
// Zephyr's built-in real-time clock is selected by port, its devicetree label, rather than connected to a bus.
|
|
26
|
+
// It does not provide the configuration property.
|
|
27
|
+
export interface ZephyrRTCOptions {
|
|
28
|
+
port: PortSpecifier;
|
|
29
|
+
onAlarm?: (this: ZephyrRTC) => void;
|
|
30
|
+
target?: any;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface ZephyrRTC extends Disposable {
|
|
34
|
+
target?: any;
|
|
35
|
+
close(): void;
|
|
36
|
+
/** undefined when the time is unavailable, for example because it has not been set */
|
|
37
|
+
get time(): number | undefined;
|
|
38
|
+
set time(value: number);
|
|
39
|
+
configure(options: RTCConfigureOptions): void;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const ZephyrRTC: {
|
|
43
|
+
new (options: ZephyrRTCOptions): ZephyrRTC;
|
|
44
|
+
readonly prototype: ZephyrRTC;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export default ZephyrRTC;
|
|
48
|
+
}
|
package/embedded/RTC.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2025 Moddable Tech, Inc.
|
|
2
|
+
* Copyright (c) 2025-2026 Moddable Tech, Inc.
|
|
3
3
|
*
|
|
4
4
|
* This file is part of the Moddable SDK Tools.
|
|
5
5
|
*
|
|
@@ -19,25 +19,36 @@
|
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
21
|
declare module "embedded:RTC" {
|
|
22
|
-
|
|
22
|
+
export interface RTCConnection {
|
|
23
|
+
io: abstract new (options: any) => object;
|
|
24
|
+
[option: string]: unknown;
|
|
25
|
+
}
|
|
23
26
|
|
|
24
27
|
export interface RTCOptions {
|
|
28
|
+
clock: RTCConnection;
|
|
29
|
+
interrupt?: RTCConnection;
|
|
30
|
+
onAlarm?: (this: RTC) => void;
|
|
25
31
|
target?: any;
|
|
26
|
-
port?: PortSpecifier;
|
|
27
|
-
onAlarm?: () => void;
|
|
28
32
|
}
|
|
29
33
|
|
|
30
34
|
export interface RTCConfigureOptions {
|
|
31
35
|
alarm?: number;
|
|
32
36
|
}
|
|
33
37
|
|
|
34
|
-
export
|
|
38
|
+
export interface RTCConfiguration {
|
|
39
|
+
alarm?: number;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export class RTC implements Disposable {
|
|
43
|
+
target?: any;
|
|
35
44
|
constructor(options: RTCOptions);
|
|
36
45
|
close(): void;
|
|
37
|
-
time: number;
|
|
46
|
+
get time(): number | undefined;
|
|
47
|
+
set time(value: number);
|
|
38
48
|
configure(options: RTCConfigureOptions): void;
|
|
49
|
+
readonly configuration: RTCConfiguration;
|
|
50
|
+
[Symbol.dispose](): void;
|
|
39
51
|
}
|
|
40
|
-
export interface RTC extends Disposable {}
|
|
41
52
|
|
|
42
53
|
export default RTC;
|
|
43
54
|
}
|