@thi.ng/wasm-api 2.2.7 → 2.3.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/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2025-01-04T21:07:38Z
3
+ - **Last updated**: 2025-01-10T10:06:26Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
@@ -9,6 +9,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
9
9
  **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
10
10
  and/or version bumps of transitive dependencies.
11
11
 
12
+ ## [2.3.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/wasm-api@2.3.0) (2025-01-10)
13
+
14
+ #### 🚀 Features
15
+
16
+ - add WasmTypeKeys helper type ([7e293ce](https://github.com/thi-ng/umbrella/commit/7e293ce))
17
+
12
18
  ### [2.2.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/wasm-api@2.2.1) (2024-11-10)
13
19
 
14
20
  #### 🩹 Bug fixes
package/api.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { BigTypedArray, EVENT_ALL, Fn, IDeref, ILength, TypedArray, Values } from "@thi.ng/api";
1
+ import type { BigTypedArray, EVENT_ALL, Fn, IDeref, ILength, Keys, TypedArray, Values } from "@thi.ng/api";
2
2
  import type { WasmBridge } from "./bridge.js";
3
3
  export declare const EVENT_MEMORY_CHANGED = "memory-changed";
4
4
  export declare const EVENT_PANIC = "panic";
@@ -17,6 +17,11 @@ export interface WasmTypeBase {
17
17
  */
18
18
  readonly __bytes: Uint8Array;
19
19
  }
20
+ /**
21
+ * Helper type to extract field names of structs/unions based on
22
+ * {@link WasmTypeBase} (e.g. those generated by thi.ng/wasm-api-bindgen).
23
+ */
24
+ export type WasmTypeKeys<T extends WasmTypeBase> = Keys<Omit<T, Keys<WasmTypeBase>>>;
20
25
  export interface WasmType<T> {
21
26
  /**
22
27
  * Type alignment (in bytes)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/wasm-api",
3
- "version": "2.2.7",
3
+ "version": "2.3.0",
4
4
  "description": "Generic, modular, extensible API bridge and infrastructure for hybrid JS & WebAssembly projects",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -128,5 +128,5 @@
128
128
  "status": "alpha",
129
129
  "year": 2022
130
130
  },
131
- "gitHead": "56c1d57a96565bbcc8c06c73779a619bba0db368\n"
131
+ "gitHead": "d52592c42d33072925fb531e70e2879fd52b26e6\n"
132
132
  }