breeze-bindgen 1.1.8 → 1.1.10
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 +3 -3
- package/dist/core.cjs +3 -3
- package/dist/core.mjs +3 -3
- package/package.json +2 -2
package/dist/cli.mjs
CHANGED
@@ -307,8 +307,8 @@ declare module '${tsModuleName}' {
|
|
307
307
|
}
|
308
308
|
methods.push({
|
309
309
|
name: node.name,
|
310
|
-
returnType: ctypeToQualified(parsed.returnType, path),
|
311
|
-
args: parsed.args.map((arg) => ctypeToQualified(arg, path)),
|
310
|
+
returnType: ctypeToQualified(parsed.returnType, [...path, node.name]),
|
311
|
+
args: parsed.args.map((arg) => ctypeToQualified(arg, [...path, node_struct.name])),
|
312
312
|
static: node.storageClass === "static",
|
313
313
|
comment: comment.length > 0 ? comment : void 0,
|
314
314
|
argNames
|
@@ -387,7 +387,7 @@ export class ${tsClassName}${bases.length > 0 ? ` extends ${bases.map((base) =>
|
|
387
387
|
${fieldDef.trim()}`;
|
388
388
|
});
|
389
389
|
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)}`;
|
390
|
+
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
391
|
let comments = "";
|
392
392
|
if (method.comment) comments += method.comment;
|
393
393
|
if (comments || method.argNames && method.argNames.length > 0) {
|
package/dist/core.cjs
CHANGED
@@ -517,8 +517,8 @@ declare module '${tsModuleName}' {
|
|
517
517
|
}
|
518
518
|
methods.push({
|
519
519
|
name: node.name,
|
520
|
-
returnType: ctypeToQualified(parsed.returnType, path),
|
521
|
-
args: parsed.args.map((arg) => ctypeToQualified(arg, path)),
|
520
|
+
returnType: ctypeToQualified(parsed.returnType, [...path, node.name]),
|
521
|
+
args: parsed.args.map((arg) => ctypeToQualified(arg, [...path, node_struct.name])),
|
522
522
|
static: node.storageClass === "static",
|
523
523
|
comment: comment.length > 0 ? comment : void 0,
|
524
524
|
argNames
|
@@ -597,7 +597,7 @@ export class ${tsClassName}${bases.length > 0 ? ` extends ${bases.map((base) =>
|
|
597
597
|
${fieldDef.trim()}`;
|
598
598
|
});
|
599
599
|
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)}`;
|
600
|
+
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
601
|
let comments = "";
|
602
602
|
if (method.comment) comments += method.comment;
|
603
603
|
if (comments || method.argNames && method.argNames.length > 0) {
|
package/dist/core.mjs
CHANGED
@@ -513,8 +513,8 @@ declare module '${tsModuleName}' {
|
|
513
513
|
}
|
514
514
|
methods.push({
|
515
515
|
name: node.name,
|
516
|
-
returnType: ctypeToQualified(parsed.returnType, path),
|
517
|
-
args: parsed.args.map((arg) => ctypeToQualified(arg, path)),
|
516
|
+
returnType: ctypeToQualified(parsed.returnType, [...path, node.name]),
|
517
|
+
args: parsed.args.map((arg) => ctypeToQualified(arg, [...path, node_struct.name])),
|
518
518
|
static: node.storageClass === "static",
|
519
519
|
comment: comment.length > 0 ? comment : void 0,
|
520
520
|
argNames
|
@@ -593,7 +593,7 @@ export class ${tsClassName}${bases.length > 0 ? ` extends ${bases.map((base) =>
|
|
593
593
|
${fieldDef.trim()}`;
|
594
594
|
});
|
595
595
|
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)}`;
|
596
|
+
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
597
|
let comments = "";
|
598
598
|
if (method.comment) comments += method.comment;
|
599
599
|
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.10",
|
5
5
|
"main": "dist/core.cjs",
|
6
6
|
"module": "dist/core.mjs",
|
7
7
|
"types": "dist/core.d.ts",
|
@@ -31,6 +31,6 @@
|
|
31
31
|
"typegen": "node -r esbuild-register src/typegen.ts",
|
32
32
|
"parser-test": "node -r esbuild-register src/c-type-parser.ts",
|
33
33
|
"build-types": "tsc -p ./tsconfig.json --emitDeclarationOnly --declaration --outdir dist",
|
34
|
-
"test": "yarn cli -i D:\\breeze-
|
34
|
+
"test": "yarn cli -i D:\\breeze-js\\src\\breeze-js\\binding\\binding_types.h -o test"
|
35
35
|
}
|
36
36
|
}
|