@moddable/typings 9.5.0 → 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.
Files changed (164) hide show
  1. package/DS18X20.d.ts +40 -0
  2. package/{embedded_io/system.d.ts → ResourceIterator.d.ts} +4 -9
  3. package/ble/bleclient.d.ts +1 -0
  4. package/ble/bleserver.d.ts +1 -0
  5. package/ble/btutils.d.ts +3 -0
  6. package/ble/connection.d.ts +1 -0
  7. package/ble/gap.d.ts +2 -0
  8. package/ble/gatt.d.ts +4 -0
  9. package/ble/hidclient.d.ts +5 -0
  10. package/ble/sm.d.ts +3 -0
  11. package/captiveportal.d.ts +5 -5
  12. package/commodetto/Poco.d.ts +10 -2
  13. package/commodetto/ReadGIF.d.ts +1 -1
  14. package/commodetto/outline.d.ts +4 -1
  15. package/commodetto/parseRLE.d.ts +1 -1
  16. package/commodetto/readJPEG.d.ts +1 -1
  17. package/config/analog.d.ts +31 -0
  18. package/config/digital.d.ts +32 -0
  19. package/config/dns.d.ts +33 -0
  20. package/config/dnssd.d.ts +31 -0
  21. package/config/files.d.ts +27 -0
  22. package/config/flash.d.ts +27 -0
  23. package/config/httpclient.d.ts +34 -0
  24. package/config/httpsclient.d.ts +34 -0
  25. package/config/httpserver.d.ts +33 -0
  26. package/config/i2c.d.ts +33 -0
  27. package/config/mqtt.d.ts +27 -0
  28. package/config/mqttclient.d.ts +31 -0
  29. package/config/mqttsclient.d.ts +32 -0
  30. package/config/ntp.d.ts +34 -0
  31. package/config/pulsecount.d.ts +30 -0
  32. package/config/pwm.d.ts +30 -0
  33. package/config/serial.d.ts +31 -0
  34. package/config/socket.d.ts +34 -0
  35. package/config/spi.d.ts +31 -0
  36. package/config/storage.d.ts +27 -0
  37. package/config/system.d.ts +27 -0
  38. package/config/tls.d.ts +30 -0
  39. package/config/update.d.ts +27 -0
  40. package/config/wsclient.d.ts +31 -0
  41. package/config/wssclient.d.ts +32 -0
  42. package/crc.d.ts +1 -1
  43. package/dns/server.d.ts +1 -0
  44. package/embedded/RTC/zephyr-builtin.d.ts +48 -0
  45. package/embedded/RTC.d.ts +18 -7
  46. package/embedded/display.d.ts +8 -3
  47. package/embedded/storage/files.d.ts +10 -7
  48. package/embedded/storage/flash.d.ts +2 -2
  49. package/embedded/storage/key-value.d.ts +27 -6
  50. package/embedded/system.d.ts +49 -0
  51. package/embedded_io/_common.d.ts +42 -3
  52. package/embedded_io/analog.d.ts +7 -7
  53. package/embedded_io/audio/in.d.ts +3 -2
  54. package/embedded_io/audio/out.d.ts +12 -4
  55. package/embedded_io/ble/central.d.ts +5 -4
  56. package/embedded_io/ble/peripheral.d.ts +6 -5
  57. package/embedded_io/crypt/digest.d.ts +2 -2
  58. package/embedded_io/digital.d.ts +4 -3
  59. package/embedded_io/digitalbank.d.ts +9 -5
  60. package/embedded_io/i2c.d.ts +9 -6
  61. package/embedded_io/image/in/camera.d.ts +82 -0
  62. package/embedded_io/pulsecount.d.ts +7 -5
  63. package/embedded_io/pwm.d.ts +11 -5
  64. package/embedded_io/serial.d.ts +33 -16
  65. package/embedded_io/socket/listener.d.ts +3 -2
  66. package/embedded_io/socket/tcp/tls.d.ts +41 -12
  67. package/embedded_io/socket/tcp.d.ts +26 -12
  68. package/embedded_io/socket/udp.d.ts +17 -12
  69. package/embedded_io/spi.d.ts +8 -6
  70. package/embedded_network/dns/resolver/udp.d.ts +13 -6
  71. package/embedded_network/dns/server/udp.d.ts +39 -0
  72. package/embedded_network/dnssd.d.ts +9 -7
  73. package/embedded_network/http/client.d.ts +21 -7
  74. package/embedded_network/http/server/route/serversentevents.d.ts +48 -0
  75. package/embedded_network/http/server/route/static.d.ts +41 -0
  76. package/embedded_network/http/server/route/webdav.d.ts +42 -0
  77. package/embedded_network/http/server/route/ws/handshake.d.ts +28 -0
  78. package/embedded_network/http/server.d.ts +27 -6
  79. package/embedded_network/interface/ethernet.d.ts +3 -3
  80. package/embedded_network/interface/wifi/accesspoint.d.ts +2 -2
  81. package/embedded_network/interface/wifi.d.ts +21 -12
  82. package/embedded_network/mdns.d.ts +2 -2
  83. package/embedded_network/mqtt/client.d.ts +55 -16
  84. package/embedded_network/ntp/client.d.ts +16 -8
  85. package/embedded_network/websocket/client.d.ts +47 -28
  86. package/embedded_provider/builtin.d.ts +40 -34
  87. package/file.d.ts +4 -0
  88. package/flash.d.ts +1 -0
  89. package/global.d.ts +0 -3
  90. package/host/default.d.ts +31 -0
  91. package/host/esp32/moddable_six.d.ts +50 -0
  92. package/host/esp32/moddable_two.d.ts +55 -0
  93. package/host/generic.d.ts +47 -0
  94. package/host/index.d.ts +24 -0
  95. package/host/lin.d.ts +30 -0
  96. package/host/mac.d.ts +30 -0
  97. package/host/pebble.d.ts +70 -0
  98. package/host/win.d.ts +30 -0
  99. package/http.d.ts +2 -0
  100. package/mcpack.d.ts +20 -0
  101. package/mdns.d.ts +1 -0
  102. package/modules.d.ts +1 -1
  103. package/mqtt/js.d.ts +22 -4
  104. package/neopixel.d.ts +2 -2
  105. package/onewire.d.ts +31 -0
  106. package/package.json +14 -4
  107. package/pebble/accelerometer.d.ts +5 -5
  108. package/pebble/battery.d.ts +3 -3
  109. package/pebble/button.d.ts +2 -2
  110. package/pebble/compass.d.ts +3 -3
  111. package/pebble/dictation.d.ts +2 -2
  112. package/pebble/global.d.ts +37 -3
  113. package/pebble/health.d.ts +2 -2
  114. package/pebble/location.d.ts +2 -2
  115. package/pebble/message.d.ts +5 -5
  116. package/pebble/piu.d.ts +2 -57
  117. package/pebble/poco.d.ts +2 -2
  118. package/pebble/texture.d.ts +33 -0
  119. package/pebble/touch.d.ts +47 -0
  120. package/ping.d.ts +1 -0
  121. package/pins/analog.d.ts +1 -0
  122. package/pins/audioin.d.ts +1 -0
  123. package/pins/digital.d.ts +1 -0
  124. package/pins/i2c.d.ts +1 -0
  125. package/pins/pwm.d.ts +1 -0
  126. package/pins/rmt.d.ts +1 -0
  127. package/pins/servo.d.ts +1 -0
  128. package/pins/smbus.d.ts +1 -0
  129. package/piu/MC-types.d.ts +231 -97
  130. package/piu/MC.d.ts +2 -1
  131. package/piu/QRCode.d.ts +5 -0
  132. package/piu/RoundRect.d.ts +53 -0
  133. package/piu/SVGImage.d.ts +62 -0
  134. package/piu/Timeline.d.ts +17 -21
  135. package/pococolorcell.d.ts +25 -0
  136. package/pocoqrcode.d.ts +25 -0
  137. package/pocostatic.d.ts +25 -0
  138. package/preference.d.ts +1 -0
  139. package/securesocket.d.ts +1 -0
  140. package/sntp.d.ts +1 -0
  141. package/socket.d.ts +6 -0
  142. package/ssl/session.d.ts +60 -0
  143. package/time.d.ts +1 -1
  144. package/tsconfig.es2024.json +0 -1
  145. package/tsconfig.es2025.json +1 -1
  146. package/web/bluetooth.d.ts +112 -0
  147. package/web/decompressionstream.d.ts +1 -1
  148. package/web/eventsource.d.ts +12 -7
  149. package/web/fetch-streams.d.ts +57 -0
  150. package/web/fetch.d.ts +1 -1
  151. package/web/serial.d.ts +58 -0
  152. package/web/websocket.d.ts +18 -13
  153. package/web/webstorage.d.ts +3 -0
  154. package/web/worker.d.ts +2 -0
  155. package/websocket.d.ts +2 -0
  156. package/wifi.d.ts +1 -0
  157. package/xs.d.ts +52 -5
  158. package/data/location/nmea.d.ts +0 -103
  159. package/data/location/ubx.d.ts +0 -78
  160. package/display.d.ts +0 -68
  161. package/embedded/sensor/Barometer-Humidity-Temperature/BME280.d.ts +0 -102
  162. package/embedded/sensor/Location/GPS.d.ts +0 -96
  163. package/embedded/sensor/Location/IP.d.ts +0 -67
  164. package/pebble/device.d.ts +0 -51
package/DS18X20.d.ts ADDED
@@ -0,0 +1,40 @@
1
+ /*
2
+ * Copyright (c) 2023 Moddable Tech, Inc.
3
+ * Copyright (c) 2023 Thorsten von Eicken
4
+ *
5
+ * This file is part of the Moddable SDK.
6
+ *
7
+ * This work is licensed under the
8
+ * Creative Commons Attribution 4.0 International License.
9
+ * To view a copy of this license, visit
10
+ * <http://creativecommons.org/licenses/by/4.0>.
11
+ * or send a letter to Creative Commons, PO Box 1866,
12
+ * Mountain View, CA 94042, USA.
13
+ *
14
+ */
15
+
16
+ declare module "DS18X20" {
17
+ import type OneWire from "onewire";
18
+
19
+ export default class DS18X20 {
20
+ // the sensor is the one with the given id (its 8 byte ROM code), else the one at index in the bus's search results, else the first
21
+ constructor(dictionary: {
22
+ bus: OneWire;
23
+ id?: ArrayBuffer;
24
+ index?: number;
25
+ });
26
+ toString(): string;
27
+ readonly family: number;
28
+ get scratchpad() : Uint8Array;
29
+ set scratchpad(bytes: Uint8Array);
30
+ get resolution(): number;
31
+ set resolution(bits: number);
32
+ readonly present: boolean;
33
+ // null when the CRC of the reading is wrong
34
+ readonly temperature: number | null;
35
+ // starts a conversion. with a callback, it is called with the temperature when the conversion completes.
36
+ // with no callback, returns the previous reading.
37
+ getTemperature(): number | null;
38
+ getTemperature(callback: (temp: number | null) => void): void;
39
+ }
40
+ }
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2022 Shinya Ishikawa
2
+ * Copyright (c) 2025 Moddable Tech, Inc.
3
3
  *
4
4
  * This file is part of the Moddable SDK Tools.
5
5
  *
@@ -18,13 +18,8 @@
18
18
  *
19
19
  */
20
20
 
21
- declare module "embedded:io/system" {
22
- /**
23
- * @experimental
24
- */
25
- class System {
26
- static deepSleep(us: number, mode: number): void;
27
- static restart(): void;
21
+ declare module "Resource" {
22
+ interface ResourceConstructor {
23
+ [Symbol.iterator](): Iterator<string>;
28
24
  }
29
- export default System;
30
25
  }
@@ -40,6 +40,7 @@ declare module "bleclient" {
40
40
  /**
41
41
  * The `BLEClient` class provides access to the BLE client features.
42
42
  */
43
+ /** @deprecated Use the ECMA-419 Bluetooth LE central, embedded:io/bluetoothle/central */
43
44
  export class BLEClient {
44
45
 
45
46
  securityParameters: securityParameters
@@ -186,6 +186,7 @@ declare module "bleserver" {
186
186
  /**
187
187
  * Provides access to the BLE server features.
188
188
  */
189
+ /** @deprecated Use the ECMA-419 Bluetooth LE peripheral, embedded:io/bluetoothle/peripheral */
189
190
  export class BLEServer {
190
191
 
191
192
  /**
package/ble/btutils.d.ts CHANGED
@@ -34,6 +34,7 @@ type ManufacturerSpec = {
34
34
 
35
35
  declare module "btutils" {
36
36
 
37
+ /** @deprecated The BLE modules are legacy; prefer the ECMA-419 embedded:io/bluetoothle/* modules */
37
38
  export class Bytes extends ArrayBuffer {
38
39
  constructor(bytes: string | ArrayBufferLike, littleEndian?: boolean)
39
40
  /**
@@ -107,11 +108,13 @@ declare module "btutils" {
107
108
  * Convert a Bluetooth UUID expressed as a hex string to a `Bytes` instance.
108
109
  * @param strings
109
110
  */
111
+ /** @deprecated The BLE modules are legacy; prefer the ECMA-419 embedded:io/bluetoothle/* modules */
110
112
  export function uuid(strings: TemplateStringsArray): Bytes;
111
113
 
112
114
  /**
113
115
  * Convert a Bluetooth address expressed as a hex string to a `Bytes` instance.
114
116
  * @param strings
115
117
  */
118
+ /** @deprecated The BLE modules are legacy; prefer the ECMA-419 embedded:io/bluetoothle/* modules */
116
119
  export function address(strings: TemplateStringsArray): Bytes;
117
120
  }
@@ -19,6 +19,7 @@
19
19
  */
20
20
 
21
21
  declare module "connection" {
22
+ /** @deprecated The BLE modules are legacy; prefer the ECMA-419 embedded:io/bluetoothle/* modules */
22
23
  export class Connection {
23
24
  disconnect(): void;
24
25
  }
package/ble/gap.d.ts CHANGED
@@ -20,6 +20,7 @@
20
20
 
21
21
  declare module "gap" {
22
22
 
23
+ /** @deprecated The BLE modules are legacy; prefer the ECMA-419 embedded:io/bluetoothle/* modules */
23
24
  const enum gapAddressTypes {
24
25
  PUBLIC = 0,
25
26
  RANDOM = 1,
@@ -27,6 +28,7 @@ declare module "gap" {
27
28
  RPA_RANDOM = 3,
28
29
  }
29
30
 
31
+ /** @deprecated The BLE modules are legacy; prefer the ECMA-419 embedded:io/bluetoothle/* modules */
30
32
  export const GAP: {
31
33
  readonly SCAN_FAST_INTERVAL: 0x0030, // TGAP(scan_fast_interval) 30ms to 60ms
32
34
  readonly SCAN_FAST_WINDOW: 0x0030, // TGAP(scan_fast_window) 30ms
package/ble/gatt.d.ts CHANGED
@@ -26,6 +26,7 @@ declare module "gatt" {
26
26
 
27
27
  type getAddressType = (typeof GAP.AddressType);
28
28
 
29
+ /** @deprecated The BLE modules are legacy; prefer the ECMA-419 embedded:io/bluetoothle/* modules */
29
30
  export interface Client {
30
31
  connection: number,
31
32
  address: Bytes,
@@ -75,6 +76,7 @@ declare module "gatt" {
75
76
  /**
76
77
  * A single Peripheral GATT service.
77
78
  */
79
+ /** @deprecated The BLE modules are legacy; prefer the ECMA-419 embedded:io/bluetoothle/* modules */
78
80
  export interface Service {
79
81
  connection: number;
80
82
  uuid: Bytes;
@@ -108,6 +110,7 @@ declare module "gatt" {
108
110
  *
109
111
  * @url https://github.com/Moddable-OpenSource/moddable/blob/public/documentation/network/ble/ble.md#class-characteristic
110
112
  */
113
+ /** @deprecated The BLE modules are legacy; prefer the ECMA-419 embedded:io/bluetoothle/* modules */
111
114
  export interface Characteristic {
112
115
  connection: number;
113
116
  uuid: Bytes;
@@ -158,6 +161,7 @@ declare module "gatt" {
158
161
  *
159
162
  * @url https://github.com/Moddable-OpenSource/moddable/blob/public/documentation/network/ble/ble.md#class-descriptor
160
163
  */
164
+ /** @deprecated The BLE modules are legacy; prefer the ECMA-419 embedded:io/bluetoothle/* modules */
161
165
  export interface Descriptor {
162
166
  connection: number;
163
167
  uuid: string;
@@ -32,6 +32,7 @@ declare module "hidclient" {
32
32
  reports: number[],
33
33
  };
34
34
 
35
+ /** @deprecated The BLE modules are legacy; prefer the ECMA-419 embedded:io/bluetoothle/* modules */
35
36
  const enum ReportType {
36
37
  NONE = 0x00,
37
38
  INPUT = 0x01,
@@ -39,6 +40,7 @@ declare module "hidclient" {
39
40
  FEATURE = 0x03,
40
41
  }
41
42
 
43
+ /** @deprecated The BLE modules are legacy; prefer the ECMA-419 embedded:io/bluetoothle/* modules */
42
44
  const enum UsageID {
43
45
  POINTER = 1,
44
46
  MOUSE = 2,
@@ -48,6 +50,7 @@ declare module "hidclient" {
48
50
  KEYPAD = 7,
49
51
  }
50
52
 
53
+ /** @deprecated The BLE modules are legacy; prefer the ECMA-419 embedded:io/bluetoothle/* modules */
51
54
  const enum Appearance {
52
55
  GENERIC = 960,
53
56
  KEYBOARD = 961,
@@ -56,6 +59,7 @@ declare module "hidclient" {
56
59
  GAMEPAD = 964,
57
60
  }
58
61
 
62
+ /** @deprecated The BLE modules are legacy; prefer the ECMA-419 embedded:io/bluetoothle/* modules */
59
63
  export class BLEHIDClient extends BLEClient {
60
64
  constructor();
61
65
 
@@ -77,6 +81,7 @@ declare module "hidclient" {
77
81
 
78
82
  }
79
83
 
84
+ /** @deprecated The BLE modules are legacy; prefer the ECMA-419 embedded:io/bluetoothle/* modules */
80
85
  export class Bonded {
81
86
  static get(usageID: UsageID): BondedInfo;
82
87
 
package/ble/sm.d.ts CHANGED
@@ -27,6 +27,7 @@ declare module "sm" {
27
27
  /**
28
28
  * @url https://github.com/Moddable-OpenSource/moddable/blob/public/documentation/network/ble/ble.md#class-sm
29
29
  */
30
+ /** @deprecated The BLE modules are legacy; prefer the ECMA-419 embedded:io/bluetoothle/* modules */
30
31
  export const enum IOCapability {
31
32
  NoInputNoOutput = 0,
32
33
  DisplayOnly = 1,
@@ -35,6 +36,7 @@ declare module "sm" {
35
36
  DisplayYesNo = 4,
36
37
  }
37
38
 
39
+ /** @deprecated The BLE modules are legacy; prefer the ECMA-419 embedded:io/bluetoothle/* modules */
38
40
  export const enum Authorization {
39
41
  None = 0,
40
42
  NoMITM = 1,
@@ -47,6 +49,7 @@ declare module "sm" {
47
49
  * Provides objects used to configure BLE client and server security requirements
48
50
  * and device capabilities.
49
51
  */
52
+ /** @deprecated The BLE modules are legacy; prefer the ECMA-419 embedded:io/bluetoothle/* modules */
50
53
  export class SM {
51
54
 
52
55
 
@@ -47,12 +47,12 @@ declare module "captiveportal" {
47
47
  }
48
48
 
49
49
  export interface CaptivePortalOptions {
50
- onPage: (this: void, path: string) => CaptivePortalPage | undefined;
50
+ onPage: (this: CaptivePortal, path: string) => CaptivePortalPage | undefined;
51
51
 
52
- onStatus?: (this: void, phase: CaptivePortalPhase, detail?: CaptivePortalAccess | CaptivePortalCredentials) => void;
53
- onInfo?: (this: void, msg: any) => void;
54
- onClose?: (this: void) => void;
55
- onError?: (this: void, error: Error) => void;
52
+ onStatus?: (this: CaptivePortal, phase: CaptivePortalPhase, detail?: CaptivePortalAccess | CaptivePortalCredentials) => void;
53
+ onInfo?: (this: CaptivePortal, msg: any) => void;
54
+ onClose?: (this: CaptivePortal) => void;
55
+ onError?: (this: CaptivePortal, error: Error) => void;
56
56
 
57
57
  SSID?: string;
58
58
  password?: string;
@@ -40,6 +40,13 @@ declare module "commodetto/Poco" {
40
40
  bitmap: Bitmap
41
41
  }
42
42
 
43
+ // font data used directly, without parsing: a font for cfe8x8, cfeNFNT, or a scalable font for cfeFT.
44
+ // size selects the pixel size of a scalable font.
45
+ export type FontData = ByteBuffer & {
46
+ size?: number
47
+ bitmap?: Bitmap
48
+ }
49
+
43
50
  export interface PocoPrototype {
44
51
  close(): void
45
52
  begin(x?: number, y?: number, width?: number, height?: number): void
@@ -53,6 +60,7 @@ declare module "commodetto/Poco" {
53
60
  origin(): void
54
61
 
55
62
  makeColor(r: number, g: number, b: number): number
63
+ makeColor(name: string): number
56
64
  fillRectangle(color: number, x: number, y: number, width: number, height: number): void
57
65
  blendRectangle(color: number, blend: number, x: number, y: number, width: number, height: number): void
58
66
  drawPixel(color: number, x: number, y: number): void
@@ -76,8 +84,8 @@ declare module "commodetto/Poco" {
76
84
  fillPattern(bits: Bitmap, x: number, y: number, w: number, h: number): void
77
85
  fillPattern(bits: Bitmap, x: number, y: number, w: number, h: number, sx: number, sy: number, sw: number, sh: number): void
78
86
 
79
- drawText(text: string, font: Font, color: number, x: number, y: number, width?: number): void
80
- getTextWidth(text: string, font: Font): number
87
+ drawText(text: string, font: Font | FontData, color: number | Bitmap, x: number, y: number, width?: number): void
88
+ getTextWidth(text: string, font: Font | FontData): number
81
89
 
82
90
  adaptInvalid(area: Rectangle): void
83
91
 
@@ -41,7 +41,7 @@ declare module "commodetto/ReadGIF" {
41
41
  transparentColor: number;
42
42
 
43
43
  readonly ready: boolean
44
- avaiable: number
44
+ available: number
45
45
  }
46
46
 
47
47
  export {ReadGIF as default};
@@ -56,12 +56,13 @@ declare module "commodetto/outline" {
56
56
  }
57
57
 
58
58
  export class Outline {
59
- clone(): Outline
59
+ clone(target?: Outline): Outline
60
60
  rotate(angle: number): Outline
61
61
  rotate(angle: number, cx: number, cy: number): Outline
62
62
  scale(scale: number): Outline
63
63
  scale(xScale: number, yScale: number): Outline
64
64
  translate(x: number, y: number): Outline
65
+ transform(cx: number, cy: number, angle: number, xScale: number, yScale: number, tx: number, ty: number): Outline
65
66
 
66
67
  readonly bounds: {
67
68
  x: number,
@@ -75,6 +76,8 @@ declare module "commodetto/outline" {
75
76
  static PolygonPath: PolygonPath
76
77
  static RoundRectPath: RoundRectPath
77
78
  static SVGPath: SVGPath
79
+ // font is the data of a scalable font in a host buffer (a Resource) with its size property set
80
+ static TextPath(font: HostBuffer & { size?: number }, text: string): CommodettoPath
78
81
 
79
82
  static fill(path: CommodettoPath, rule?: number): Outline
80
83
  static stroke(path: CommodettoPath, weight?: number, linecap?: number, linejoin?: number, miterLimit?: number): Outline
@@ -21,5 +21,5 @@
21
21
  declare module "commodetto/parseRLE" {
22
22
  import Bitmap from "commodetto/Bitmap"
23
23
 
24
- export default function (bmp: HostBuffer): Bitmap
24
+ export default function (bmp: HostBuffer | ArrayBufferLike): Bitmap
25
25
  }
@@ -29,7 +29,7 @@ declare module "commodetto/readJPEG" {
29
29
  class JPEG {
30
30
  constructor(buffer?: (ByteBuffer), options?: { pixelFormat: number })
31
31
 
32
- read(): Block
32
+ read(): Block | undefined
33
33
  push(buffer: ByteBuffer): void
34
34
 
35
35
  readonly ready: boolean
@@ -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 Analog from "embedded:io/analog";
23
+
24
+ interface Device {
25
+ io: DeviceIO;
26
+ analog: DeviceAnalog;
27
+ }
28
+ interface DeviceIO {
29
+ Analog: typeof Analog;
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
+ declare module "embedded:provider/builtin" {
22
+ import type Digital from "embedded:io/digital";
23
+ import type DigitalBank from "embedded:io/digitalbank";
24
+
25
+ interface Device {
26
+ io: DeviceIO;
27
+ }
28
+ interface DeviceIO {
29
+ Digital: typeof Digital;
30
+ DigitalBank: typeof DigitalBank;
31
+ }
32
+ }
@@ -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 { DNSResolverProvider } from "embedded:network/dns/resolver/udp";
26
+
27
+ interface DeviceNetwork {
28
+ dns: DeviceNetworkDNS;
29
+ }
30
+ interface DeviceNetworkDNS {
31
+ resolver: DNSResolverProvider;
32
+ }
33
+ }
@@ -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 DNSSD from "embedded:network/dnssd";
23
+ import type { DNSSDSocketOptions } from "embedded:network/dnssd";
24
+
25
+ interface DeviceNetwork {
26
+ dnssd: {
27
+ io: typeof DNSSD;
28
+ socket: DNSSDSocketOptions;
29
+ };
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 { Directory } from "embedded:storage/files";
23
+
24
+ interface Device {
25
+ files: Directory;
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 flash from "embedded:storage/flash";
23
+
24
+ interface Device {
25
+ flash: typeof flash;
26
+ }
27
+ }
@@ -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 { HTTPClientProvider } from "embedded:network/http/client";
27
+
28
+ interface DeviceNetwork {
29
+ http: DeviceNetworkHTTP;
30
+ }
31
+ interface DeviceNetworkHTTP {
32
+ client: HTTPClientProvider;
33
+ }
34
+ }
@@ -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="./httpclient.d.ts" />
23
+ /// <reference path="./tls.d.ts" />
24
+
25
+ declare module "embedded:provider/builtin" {
26
+ import type { HTTPClientProvider } from "embedded:network/http/client";
27
+
28
+ interface DeviceNetwork {
29
+ https: DeviceNetworkHTTPS;
30
+ }
31
+ interface DeviceNetworkHTTPS {
32
+ client: HTTPClientProvider;
33
+ }
34
+ }
@@ -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
+ }
@@ -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
+ }