corba.js 0.1.17 → 0.1.18
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/lib/idl/idl.cjs
CHANGED
|
@@ -2270,7 +2270,7 @@ function writeTSSkeletonDefinitions(out, specification, prefix = "", indent = 0)
|
|
|
2270
2270
|
const readonly = _export.child[0]?.type == Type.TKN_READONLY;
|
|
2271
2271
|
const param_type_spec = _export.child[1];
|
|
2272
2272
|
const attr_declarator = _export.child[2];
|
|
2273
|
-
const type = typeIDLtoTS(param_type_spec, FileType.
|
|
2273
|
+
const type = typeIDLtoTS(param_type_spec, FileType.SKELETON);
|
|
2274
2274
|
for (const n of attr_declarator.child) {
|
|
2275
2275
|
const identifier = n.text;
|
|
2276
2276
|
out.write(` abstract ${identifier}(): Promise<${type}>\n`);
|
|
@@ -2403,12 +2403,12 @@ function writeTSStubDefinitions(out, specification, prefix = "", indent = 0) {
|
|
|
2403
2403
|
const attr_declarator = _export.child[2];
|
|
2404
2404
|
for (const n of attr_declarator.child) {
|
|
2405
2405
|
const identifier = n.text;
|
|
2406
|
-
const type = typeIDLtoTS(param_type_spec, FileType.
|
|
2406
|
+
const type = typeIDLtoTS(param_type_spec, FileType.STUB);
|
|
2407
2407
|
if (readonly) {
|
|
2408
2408
|
out.write(` async ${identifier}(): Promise<${type}> {\n`);
|
|
2409
2409
|
out.write(` return this._orb.twowayCall(this, "_get_${identifier}",\n`);
|
|
2410
2410
|
out.write(` (encoder) => { },\n`);
|
|
2411
|
-
out.write(` (decoder) =>
|
|
2411
|
+
out.write(` (decoder) => ${typeIDLtoGIOPTS(param_type_spec)}\n`);
|
|
2412
2412
|
out.write(` )\n`);
|
|
2413
2413
|
out.write(` }\n`);
|
|
2414
2414
|
}
|
|
@@ -2419,11 +2419,11 @@ function writeTSStubDefinitions(out, specification, prefix = "", indent = 0) {
|
|
|
2419
2419
|
out.write(` if (value === undefined) {\n`);
|
|
2420
2420
|
out.write(` return this._orb.twowayCall(this, "_get_${identifier}",\n`);
|
|
2421
2421
|
out.write(` (encoder) => { },\n`);
|
|
2422
|
-
out.write(` (decoder) =>
|
|
2422
|
+
out.write(` (decoder) => ${typeIDLtoGIOPTS(param_type_spec)}\n`);
|
|
2423
2423
|
out.write(` )\n`);
|
|
2424
2424
|
out.write(` } else {\n`);
|
|
2425
2425
|
out.write(` return this._orb.twowayCall(this, "_set_${identifier}",\n`);
|
|
2426
|
-
out.write(` (encoder) => {
|
|
2426
|
+
out.write(` (encoder) => {${typeIDLtoGIOPTS(param_type_spec, "value")} },\n`);
|
|
2427
2427
|
out.write(` (decoder) => { }\n`);
|
|
2428
2428
|
out.write(` )\n`);
|
|
2429
2429
|
out.write(` }\n`);
|