{"action":"created","issue":{"url":"https://api.github.com/repos/bcherny/json-schema-to-typescript/issues/33","repository_url":"https://api.github.com/repos/bcherny/json-schema-to-typescript","labels_url":"https://api.github.com/repos/bcherny/json-schema-to-typescript/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/bcherny/json-schema-to-typescript/issues/33/comments","events_url":"https://api.github.com/repos/bcherny/json-schema-to-typescript/issues/33/events","html_url":"https://github.com/bcherny/json-schema-to-typescript/issues/33","id":178176211,"number":33,"title":"`\"type\": [ \"array\" ]` is outputting invalid interface definition","user":{"login":"darcyparker","id":945058,"avatar_url":"https://avatars.githubusercontent.com/u/945058?v=3","gravatar_id":"","url":"https://api.github.com/users/darcyparker","html_url":"https://github.com/darcyparker","followers_url":"https://api.github.com/users/darcyparker/followers","following_url":"https://api.github.com/users/darcyparker/following{/other_user}","gists_url":"https://api.github.com/users/darcyparker/gists{/gist_id}","starred_url":"https://api.github.com/users/darcyparker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darcyparker/subscriptions","organizations_url":"https://api.github.com/users/darcyparker/orgs","repos_url":"https://api.github.com/users/darcyparker/repos","events_url":"https://api.github.com/users/darcyparker/events{/privacy}","received_events_url":"https://api.github.com/users/darcyparker/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bcherny/json-schema-to-typescript/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-20T20:48:36Z","updated_at":"2016-09-25T02:04:26Z","closed_at":"2016-09-25T02:04:26Z","body":"If you extend https://github.com/bcherny/json-schema-to-typescript/blob/master/test/cases/array-of-type.ts like this:\r\n```\r\nexport var schema = {\r\n  \"title\": \"Array of type\",\r\n  \"type\": \"object\",\r\n  \"properties\": {\r\n    \"foo\": {\r\n      \"items\": {\r\n        \"type\": \"string\"\r\n      },\r\n      \"type\": \"array\"\r\n    },\r\n    \"times\": {\r\n      \"items\": {\r\n        \"type\": \"string\",\r\n        \"format\": \"date-time\"\r\n      },\r\n      \"type\": [ \"array\" ]\r\n    }\r\n  }\r\n}\r\n```\r\nThen the output is this:\r\n```typescript\r\nexport interface ArrayOfType {\r\n  foo?: string[];\r\n  times?: array;\r\n  [k: string]: any;\r\n}\r\n```\r\n\r\n`times?: array` should be `times?: Array<string>` or alternatively `times?: string[]`\r\n\r\nI think this is connected to `disjoint types` test case."},"comment":{"url":"https://api.github.com/repos/bcherny/json-schema-to-typescript/issues/comments/249398081","html_url":"https://github.com/bcherny/json-schema-to-typescript/issues/33#issuecomment-249398081","issue_url":"https://api.github.com/repos/bcherny/json-schema-to-typescript/issues/33","id":249398081,"user":{"login":"bcherny","id":1761758,"avatar_url":"https://avatars.githubusercontent.com/u/1761758?v=3","gravatar_id":"","url":"https://api.github.com/users/bcherny","html_url":"https://github.com/bcherny","followers_url":"https://api.github.com/users/bcherny/followers","following_url":"https://api.github.com/users/bcherny/following{/other_user}","gists_url":"https://api.github.com/users/bcherny/gists{/gist_id}","starred_url":"https://api.github.com/users/bcherny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcherny/subscriptions","organizations_url":"https://api.github.com/users/bcherny/orgs","repos_url":"https://api.github.com/users/bcherny/repos","events_url":"https://api.github.com/users/bcherny/events{/privacy}","received_events_url":"https://api.github.com/users/bcherny/received_events","type":"User","site_admin":false},"created_at":"2016-09-25T02:04:26Z","updated_at":"2016-09-25T02:04:26Z","body":"Fixed in 68f18a8e1ed91f00e7ba9d124986b970cc146967"}}
{"actor":{"display_login":"bcherny"}}