Skip to content
This repository has been archived by the owner on Oct 21, 2020. It is now read-only.

Fix Issue#264 Make id and type optional properties #285

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions resources/testfields.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/templates/expressions/fields.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ describe("SubTableField", () => {
).toEqual(
`
"fieldName" : {
type: "SUBTABLE";
type?: "SUBTABLE";
value: {
id: string;
id?: string;
value: {

}
Expand Down
4 changes: 2 additions & 2 deletions src/templates/expressions/fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()}
}
Expand Down