breeze-bindgen 1.1.9 → 1.1.11
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 +1 -2
- package/dist/core.cjs +1 -2
- package/dist/core.mjs +1 -2
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
@@ -222,7 +222,6 @@ function processAstAndGenerateCode(astArr, originalCppFilePath, nameFilter, addi
|
|
222
222
|
|
223
223
|
#pragma once
|
224
224
|
#include "binding_types.h"
|
225
|
-
#include "quickjs.h"
|
226
225
|
#include "quickjspp.hpp"
|
227
226
|
|
228
227
|
template <typename T>
|
@@ -387,7 +386,7 @@ export class ${tsClassName}${bases.length > 0 ? ` extends ${bases.map((base) =>
|
|
387
386
|
${fieldDef.trim()}`;
|
388
387
|
});
|
389
388
|
methods.forEach((method) => {
|
390
|
-
let methodDef = `${method.static ? "static " : ""}${method.name}(${method.argNames && method.argNames.length > 0 ? method.args.map((arg, i) => `${method.argNames[i] || `arg${i}`}: ${cTypeToTypeScript(arg, nameFilter)}`).join(", ") : ""}): ${cTypeToTypeScript(method.returnType, nameFilter)}`;
|
389
|
+
let methodDef = `${method.static ? "static " : ""}${method.name}(${method.argNames && method.argNames.length > 0 ? method.args.map((arg, i) => `${method.argNames[i] || `arg${i}`}${arg.startsWith("std::optional") ? "?" : ""}: ${cTypeToTypeScript(arg, nameFilter)}`).join(", ") : ""}): ${cTypeToTypeScript(method.returnType, nameFilter)}`;
|
391
390
|
let comments = "";
|
392
391
|
if (method.comment) comments += method.comment;
|
393
392
|
if (comments || method.argNames && method.argNames.length > 0) {
|
package/dist/core.cjs
CHANGED
@@ -432,7 +432,6 @@ function processAstAndGenerateCode(astArr, originalCppFilePath, nameFilter, addi
|
|
432
432
|
|
433
433
|
#pragma once
|
434
434
|
#include "binding_types.h"
|
435
|
-
#include "quickjs.h"
|
436
435
|
#include "quickjspp.hpp"
|
437
436
|
|
438
437
|
template <typename T>
|
@@ -597,7 +596,7 @@ export class ${tsClassName}${bases.length > 0 ? ` extends ${bases.map((base) =>
|
|
597
596
|
${fieldDef.trim()}`;
|
598
597
|
});
|
599
598
|
methods.forEach((method) => {
|
600
|
-
let methodDef = `${method.static ? "static " : ""}${method.name}(${method.argNames && method.argNames.length > 0 ? method.args.map((arg, i) => `${method.argNames[i] || `arg${i}`}: ${cTypeToTypeScript(arg, nameFilter)}`).join(", ") : ""}): ${cTypeToTypeScript(method.returnType, nameFilter)}`;
|
599
|
+
let methodDef = `${method.static ? "static " : ""}${method.name}(${method.argNames && method.argNames.length > 0 ? method.args.map((arg, i) => `${method.argNames[i] || `arg${i}`}${arg.startsWith("std::optional") ? "?" : ""}: ${cTypeToTypeScript(arg, nameFilter)}`).join(", ") : ""}): ${cTypeToTypeScript(method.returnType, nameFilter)}`;
|
601
600
|
let comments = "";
|
602
601
|
if (method.comment) comments += method.comment;
|
603
602
|
if (comments || method.argNames && method.argNames.length > 0) {
|
package/dist/core.mjs
CHANGED
@@ -428,7 +428,6 @@ function processAstAndGenerateCode(astArr, originalCppFilePath, nameFilter, addi
|
|
428
428
|
|
429
429
|
#pragma once
|
430
430
|
#include "binding_types.h"
|
431
|
-
#include "quickjs.h"
|
432
431
|
#include "quickjspp.hpp"
|
433
432
|
|
434
433
|
template <typename T>
|
@@ -593,7 +592,7 @@ export class ${tsClassName}${bases.length > 0 ? ` extends ${bases.map((base) =>
|
|
593
592
|
${fieldDef.trim()}`;
|
594
593
|
});
|
595
594
|
methods.forEach((method) => {
|
596
|
-
let methodDef = `${method.static ? "static " : ""}${method.name}(${method.argNames && method.argNames.length > 0 ? method.args.map((arg, i) => `${method.argNames[i] || `arg${i}`}: ${cTypeToTypeScript(arg, nameFilter)}`).join(", ") : ""}): ${cTypeToTypeScript(method.returnType, nameFilter)}`;
|
595
|
+
let methodDef = `${method.static ? "static " : ""}${method.name}(${method.argNames && method.argNames.length > 0 ? method.args.map((arg, i) => `${method.argNames[i] || `arg${i}`}${arg.startsWith("std::optional") ? "?" : ""}: ${cTypeToTypeScript(arg, nameFilter)}`).join(", ") : ""}): ${cTypeToTypeScript(method.returnType, nameFilter)}`;
|
597
596
|
let comments = "";
|
598
597
|
if (method.comment) comments += method.comment;
|
599
598
|
if (comments || method.argNames && method.argNames.length > 0) {
|
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.
|
4
|
+
"version": "1.1.11",
|
5
5
|
"main": "dist/core.cjs",
|
6
6
|
"module": "dist/core.mjs",
|
7
7
|
"types": "dist/core.d.ts",
|