{"action":"closed","issue":{"url":"https://api.github.com/repos/jacomyal/typology/issues/23","labels_url":"https://api.github.com/repos/jacomyal/typology/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/jacomyal/typology/issues/23/comments","events_url":"https://api.github.com/repos/jacomyal/typology/issues/23/events","html_url":"https://github.com/jacomyal/typology/issues/23","id":79973408,"number":23,"title":"Custom types are not reusable in array ","user":{"login":"legaultpierre","id":9844944,"avatar_url":"https://avatars.githubusercontent.com/u/9844944?v=3","gravatar_id":"","url":"https://api.github.com/users/legaultpierre","html_url":"https://github.com/legaultpierre","followers_url":"https://api.github.com/users/legaultpierre/followers","following_url":"https://api.github.com/users/legaultpierre/following{/other_user}","gists_url":"https://api.github.com/users/legaultpierre/gists{/gist_id}","starred_url":"https://api.github.com/users/legaultpierre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/legaultpierre/subscriptions","organizations_url":"https://api.github.com/users/legaultpierre/orgs","repos_url":"https://api.github.com/users/legaultpierre/repos","events_url":"https://api.github.com/users/legaultpierre/events{/privacy}","received_events_url":"https://api.github.com/users/legaultpierre/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-23T22:36:41Z","updated_at":"2015-05-24T00:27:57Z","closed_at":"2015-05-24T00:27:57Z","body":"Let's say we have defined a custom type `ref`:\r\n``\r\ntypes.add('ref', {\r\n  key1: 'string'\r\n});``  \r\nWe can easily use this custom type in another custom type in the following cases (not exhaustive):\r\n``types.add('custom2', {\r\n  key2: 'ref'\r\n});``\r\n``types.add('custom3', {\r\n  key2: '?ref'\r\n});``\r\n``types.add('custom4', {\r\n  key2: '!ref'\r\n});``\r\n``types.add('custom5', {\r\n  key2: 'ref|string'\r\n});``\r\nBut the following (and all its related) do not work:\r\n``types.add('custom6', {\r\n  key2: '[ref]'\r\n});``"}}