@moddable/typings 5.7.0 → 5.9.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 (3) hide show
  1. package/crypt.d.ts +34 -0
  2. package/net.d.ts +3 -3
  3. package/package.json +1 -1
package/crypt.d.ts ADDED
@@ -0,0 +1,34 @@
1
+ /*
2
+ * Copyright (c) 2025 Satoshi Tanaka
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 "crypt" {
22
+ type DigestType = "MD5" | "SHA1" | "SHA224" | "SHA256" | "SHA384" | "SHA512";
23
+
24
+ export class Digest {
25
+ constructor(type: DigestType);
26
+
27
+ write(message: string | ArrayBuffer): void;
28
+ close(): ArrayBuffer;
29
+ reset(): void;
30
+ get blockSize(): number;
31
+ get outputSize(): number;
32
+ update(message: string | ArrayBuffer): void;
33
+ }
34
+ }
package/net.d.ts CHANGED
@@ -26,11 +26,11 @@ declare module "net" {
26
26
  /**
27
27
  * The IP address of the network connection as a `String`, e.g. "10.0.1.4"
28
28
  */
29
- get(what: "IP"): string;
29
+ get(what: "IP", mode?: "station" | "ap" | "ethernet"): string;
30
30
  /**
31
31
  * The MAC address of the device as a `String`, e.g. "A4:D1:8C:DB:C0:20"
32
32
  */
33
- get(what: "MAC"): string;
33
+ get(what: "MAC", mode?: "station" | "ap"| "ethernet"): string;
34
34
  /**
35
35
  * The name of the Wi-Fi access point as a `String`, e.g. "Moddable Wi-Fi"
36
36
  */
@@ -64,4 +64,4 @@ declare module "net" {
64
64
  ): void;
65
65
  }
66
66
  export {Net as default};
67
- }
67
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moddable/typings",
3
- "version": "5.7.0",
3
+ "version": "5.9.0",
4
4
  "main": "",
5
5
  "types": [
6
6
  "xs.d.ts",