breeze-bindgen 1.1.19 → 1.1.21

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/dist/cli.mjs CHANGED
@@ -140,6 +140,15 @@ var CTypeParser = class {
140
140
  "async_simple.coro.Lazy": "Promise"
141
141
  };
142
142
  let tsBasicType = (typeMap[node.type] ?? node.type) + (node.template ? "<" + node.argsTemplate.map((a) => this.formatToTypeScript(a, namespace)).join(", ") + ">" : "");
143
+ if (node.type === "std.vector" && node.template && node.argsTemplate.length === 1) {
144
+ const innerType = node.argsTemplate[0].type;
145
+ if (innerType === "uint8_t" || innerType === "std.uint8_t") {
146
+ return "ArrayBuffer";
147
+ }
148
+ }
149
+ if (node.type === "JSValue") {
150
+ return "any";
151
+ }
143
152
  const ignoreTypes = ["std.variant", "std.shared_ptr", "std.function"];
144
153
  if (ignoreTypes.includes(node.type)) {
145
154
  tsBasicType = node.argsTemplate.map((a) => this.formatToTypeScript(a, namespace)).join(" | ");
package/dist/core.cjs CHANGED
@@ -350,6 +350,15 @@ var CTypeParser = class {
350
350
  "async_simple.coro.Lazy": "Promise"
351
351
  };
352
352
  let tsBasicType = (typeMap[node.type] ?? node.type) + (node.template ? "<" + node.argsTemplate.map((a) => this.formatToTypeScript(a, namespace)).join(", ") + ">" : "");
353
+ if (node.type === "std.vector" && node.template && node.argsTemplate.length === 1) {
354
+ const innerType = node.argsTemplate[0].type;
355
+ if (innerType === "uint8_t" || innerType === "std.uint8_t") {
356
+ return "ArrayBuffer";
357
+ }
358
+ }
359
+ if (node.type === "JSValue") {
360
+ return "any";
361
+ }
353
362
  const ignoreTypes = ["std.variant", "std.shared_ptr", "std.function"];
354
363
  if (ignoreTypes.includes(node.type)) {
355
364
  tsBasicType = node.argsTemplate.map((a) => this.formatToTypeScript(a, namespace)).join(" | ");
package/dist/core.mjs CHANGED
@@ -346,6 +346,15 @@ var CTypeParser = class {
346
346
  "async_simple.coro.Lazy": "Promise"
347
347
  };
348
348
  let tsBasicType = (typeMap[node.type] ?? node.type) + (node.template ? "<" + node.argsTemplate.map((a) => this.formatToTypeScript(a, namespace)).join(", ") + ">" : "");
349
+ if (node.type === "std.vector" && node.template && node.argsTemplate.length === 1) {
350
+ const innerType = node.argsTemplate[0].type;
351
+ if (innerType === "uint8_t" || innerType === "std.uint8_t") {
352
+ return "ArrayBuffer";
353
+ }
354
+ }
355
+ if (node.type === "JSValue") {
356
+ return "any";
357
+ }
349
358
  const ignoreTypes = ["std.variant", "std.shared_ptr", "std.function"];
350
359
  if (ignoreTypes.includes(node.type)) {
351
360
  tsBasicType = node.argsTemplate.map((a) => this.formatToTypeScript(a, namespace)).join(" | ");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e",
3
3
  "name": "breeze-bindgen",
4
- "version": "1.1.19",
4
+ "version": "1.1.21",
5
5
  "main": "dist/core.cjs",
6
6
  "module": "dist/core.mjs",
7
7
  "types": "dist/core.d.ts",