diff --git a/resources/testfields.d.ts b/resources/testfields.d.ts index d24bfaa4..784fa476 100644 --- a/resources/testfields.d.ts +++ b/resources/testfields.d.ts @@ -18,9 +18,9 @@ declare namespace kintone.types { Group_selection: kintone.fieldTypes.GroupSelect; Attachment: kintone.fieldTypes.File; Table: { - type: "SUBTABLE"; + type?: "SUBTABLE"; value: { - id: string; + id?: string; value: { Text_Table: kintone.fieldTypes.SingleLineText; Rich_text_Table: kintone.fieldTypes.RichText; @@ -31,9 +31,9 @@ declare namespace kintone.types { }[]; }; Table_0: { - type: "SUBTABLE"; + type?: "SUBTABLE"; value: { - id: string; + id?: string; value: { Radio_button_Table: kintone.fieldTypes.RadioButton; Drop_down_Table: kintone.fieldTypes.DropDown; diff --git a/src/templates/expressions/fields.test.ts b/src/templates/expressions/fields.test.ts index e881decb..ced94617 100644 --- a/src/templates/expressions/fields.test.ts +++ b/src/templates/expressions/fields.test.ts @@ -102,9 +102,9 @@ describe("SubTableField", () => { ).toEqual( ` "fieldName" : { - type: "SUBTABLE"; + type?: "SUBTABLE"; value: { - id: string; + id?: string; value: { } diff --git a/src/templates/expressions/fields.ts b/src/templates/expressions/fields.ts index f225def4..f9d89917 100644 --- a/src/templates/expressions/fields.ts +++ b/src/templates/expressions/fields.ts @@ -51,9 +51,9 @@ export class SubTableField implements TsExpression { tsExpression(): string { return ` "${this.fieldName}" : { - type: "${this.fieldType}"; + type?: "${this.fieldType}"; value: { - id: string; + id?: string; value: { ${this.fieldGroup.tsExpression()} }