@neocompose/cli 0.1.5 → 0.1.6
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/neo.mjs +16 -0
- package/package.json +1 -1
package/dist/neo.mjs
CHANGED
|
@@ -4171,6 +4171,8 @@ function reconstructTypeFile(parsed, context, out) {
|
|
|
4171
4171
|
);
|
|
4172
4172
|
}
|
|
4173
4173
|
data.allowedStorage = allowedStorage;
|
|
4174
|
+
} else if (isObjectRecord2(baseTypeData) && baseTypeData.allowedStorage === null) {
|
|
4175
|
+
data.allowedStorage = null;
|
|
4174
4176
|
}
|
|
4175
4177
|
const declaredParams = readDeclaredGenericParams(
|
|
4176
4178
|
declaration,
|
|
@@ -5598,6 +5600,7 @@ function reconstructInterfaceFile(parsed, maps, out) {
|
|
|
5598
5600
|
);
|
|
5599
5601
|
}
|
|
5600
5602
|
const memberKey = memberMarker === null ? entry.value.name : namedString(memberMarker, "Key", parsed.file) ?? entry.value.name;
|
|
5603
|
+
preserveInterfaceVoidRequiredFromBase(member, baseData, memberKey);
|
|
5601
5604
|
if (memberKey in members) {
|
|
5602
5605
|
throw new SchemaParseError(
|
|
5603
5606
|
`Duplicate interface member "${memberKey}".`,
|
|
@@ -5627,6 +5630,19 @@ function reconstructInterfaceFile(parsed, maps, out) {
|
|
|
5627
5630
|
line: declaration.line
|
|
5628
5631
|
});
|
|
5629
5632
|
}
|
|
5633
|
+
function preserveInterfaceVoidRequiredFromBase(member, baseData, memberKey) {
|
|
5634
|
+
if (member.kind !== "function") return;
|
|
5635
|
+
if (!isObjectRecord2(member.returnTypeInfo)) return;
|
|
5636
|
+
if (member.returnTypeInfo.type !== "Void") return;
|
|
5637
|
+
if (!isObjectRecord2(baseData)) return;
|
|
5638
|
+
if (!isObjectRecord2(baseData.members)) return;
|
|
5639
|
+
const baseMember = baseData.members[memberKey];
|
|
5640
|
+
if (!isObjectRecord2(baseMember)) return;
|
|
5641
|
+
if (!isObjectRecord2(baseMember.returnTypeInfo)) return;
|
|
5642
|
+
if (baseMember.returnTypeInfo.type !== "Void") return;
|
|
5643
|
+
if (typeof baseMember.returnTypeInfo.required !== "boolean") return;
|
|
5644
|
+
member.returnTypeInfo.required = baseMember.returnTypeInfo.required;
|
|
5645
|
+
}
|
|
5630
5646
|
function isInterfaceSignaturePlaceholder(csType, signatureTypeInfo) {
|
|
5631
5647
|
return csType === "object" && signatureTypeInfo.type !== ATTRIBUTE_TYPE.Null;
|
|
5632
5648
|
}
|
package/package.json
CHANGED