{"action":"created","issue":{"url":"https://api.github.com/repos/gcanti/tcomb/issues/195","repository_url":"https://api.github.com/repos/gcanti/tcomb","labels_url":"https://api.github.com/repos/gcanti/tcomb/issues/195/labels{/name}","comments_url":"https://api.github.com/repos/gcanti/tcomb/issues/195/comments","events_url":"https://api.github.com/repos/gcanti/tcomb/issues/195/events","html_url":"https://github.com/gcanti/tcomb/issues/195","id":151601517,"number":195,"title":"Would you consider an interface type?","user":{"login":"ctrlplusb","id":12164768,"avatar_url":"https://avatars.githubusercontent.com/u/12164768?v=3","gravatar_id":"","url":"https://api.github.com/users/ctrlplusb","html_url":"https://github.com/ctrlplusb","followers_url":"https://api.github.com/users/ctrlplusb/followers","following_url":"https://api.github.com/users/ctrlplusb/following{/other_user}","gists_url":"https://api.github.com/users/ctrlplusb/gists{/gist_id}","starred_url":"https://api.github.com/users/ctrlplusb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctrlplusb/subscriptions","organizations_url":"https://api.github.com/users/ctrlplusb/orgs","repos_url":"https://api.github.com/users/ctrlplusb/repos","events_url":"https://api.github.com/users/ctrlplusb/events{/privacy}","received_events_url":"https://api.github.com/users/ctrlplusb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-04-28T10:19:29Z","updated_at":"2016-04-29T17:26:46Z","closed_at":null,"body":"e.g.\r\n```\r\nconst Foo = t.inter({\r\n  x: t.Number,\r\n  y: t.Number\r\n}, 'Foo');\r\n\r\nconst foo = Foo({ x: 1, y: 2 }); // throws - not a function.\r\nFoo.is({ x: 1, y: 2 }); // true\r\nFoo.is({ x: 1, y: 2, z: 3 }); // true\r\nFoo.is({ x: 1, y: '2' }); // false\r\nFoo.is({ x: 1 }); // false\r\nt.assert(Foo.is({ x: 1 })); // throws - interface requirements not met...\r\n```\r\n\r\nCould be helpful in keeping things DRY."},"comment":{"url":"https://api.github.com/repos/gcanti/tcomb/issues/comments/215822631","html_url":"https://github.com/gcanti/tcomb/issues/195#issuecomment-215822631","issue_url":"https://api.github.com/repos/gcanti/tcomb/issues/195","id":215822631,"user":{"login":"gcanti","id":878912,"avatar_url":"https://avatars.githubusercontent.com/u/878912?v=3","gravatar_id":"","url":"https://api.github.com/users/gcanti","html_url":"https://github.com/gcanti","followers_url":"https://api.github.com/users/gcanti/followers","following_url":"https://api.github.com/users/gcanti/following{/other_user}","gists_url":"https://api.github.com/users/gcanti/gists{/gist_id}","starred_url":"https://api.github.com/users/gcanti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gcanti/subscriptions","organizations_url":"https://api.github.com/users/gcanti/orgs","repos_url":"https://api.github.com/users/gcanti/repos","events_url":"https://api.github.com/users/gcanti/events{/privacy}","received_events_url":"https://api.github.com/users/gcanti/received_events","type":"User","site_admin":false},"created_at":"2016-04-29T17:26:46Z","updated_at":"2016-04-29T17:26:46Z","body":"+1 for `interface` though is a reserved word (I want IE8 compatibility as much as I can). `inter`, `shape`, `duck`?\r\n\r\n> whilst also having type assertions disabled for production...\r\n\r\n(just a clarification: type assertions are already disabled for production, i.e. `process.env.NODE_ENV === 'production'`. 174 just proposes to disentagle this existing behavior from `process.env.NODE_ENV === 'production'`)"}}