From e679ba4455ffe42c8c34a9ddf927a6eb1be33e02 Mon Sep 17 00:00:00 2001 From: Nic Wilson Date: Thu, 7 Nov 2019 12:21:47 -0600 Subject: [PATCH] fix(types): fix Field.properties.fields type Current type of field.properties.fields is `any[][]` -- I believe it should instead be `any[]` per the example in the API docs: ``` { "ref": "a_group_field_ref", "title": "group field", "type": "group", "properties": { "description": "Question group description", "show_button": true, "button_text": "Some text", "fields": [ { "ref": "nice_readable_website_reference", "title": "website", "type": "website", "properties": { "description": "Cool description for the website" } } ] }, ``` https://developer.typeform.com/create/reference/create-form/ Note, that the actual docs above the example specify the type of `Field.properties.fields` as `array of arrays` but I believe this is an error -- the shape of object above is what I see when in the actual JSON of my form when exported from Typeform. --- src/typeform-types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/typeform-types.ts b/src/typeform-types.ts index 5253e8d..0a5bc04 100644 --- a/src/typeform-types.ts +++ b/src/typeform-types.ts @@ -691,7 +691,7 @@ export namespace Typeform { * Contains the fields that belong in a question group. Only `payment` and `group` blocks are not allowed inside a question group. * Available for the `group` type. */ - fields?: any[][] + fields?: any[] /** * true to allow respondents to select more than one answer choice. false to allow respondents to select only one answer choice. * Available for `multiple_choice` and `picture_choice` types.