@xrmforge/typegen 0.9.1 → 0.10.1
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/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1859,7 +1859,8 @@ function generateEntityInterface(info, options = {}) {
|
|
|
1859
1859
|
if (jsdocParts.length > 0) {
|
|
1860
1860
|
lines.push(` /** ${jsdocParts.join(" - ")} */`);
|
|
1861
1861
|
}
|
|
1862
|
-
|
|
1862
|
+
const nullable = attr.IsPrimaryId ? "" : " | null";
|
|
1863
|
+
lines.push(` ${propertyName}: ${tsType}${nullable};`);
|
|
1863
1864
|
}
|
|
1864
1865
|
if (partyListAttrs.length > 0) {
|
|
1865
1866
|
const relationship = info.oneToManyRelationships.find(
|
|
@@ -2212,6 +2213,14 @@ function generateFormInterface(form, entityLogicalName, attributeMap, options =
|
|
|
2212
2213
|
}
|
|
2213
2214
|
lines.push("};");
|
|
2214
2215
|
lines.push("");
|
|
2216
|
+
lines.push(`/** Type info for typedForm<${interfaceName}>(). Bundles Fields, AttributeMap, ControlMap. */`);
|
|
2217
|
+
lines.push(`export interface ${interfaceName}TypeInfo {`);
|
|
2218
|
+
lines.push(` fields: ${fieldsTypeName};`);
|
|
2219
|
+
lines.push(` attributes: ${attrMapName};`);
|
|
2220
|
+
lines.push(` controls: ${ctrlMapName};`);
|
|
2221
|
+
lines.push(` form: ${interfaceName};`);
|
|
2222
|
+
lines.push("}");
|
|
2223
|
+
lines.push("");
|
|
2215
2224
|
return lines.join("\n");
|
|
2216
2225
|
}
|
|
2217
2226
|
function generateEntityForms(forms, entityLogicalName, attributes, options = {}) {
|