{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular.js/issues/11657","labels_url":"https://api.github.com/repos/angular/angular.js/issues/11657/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular.js/issues/11657/comments","events_url":"https://api.github.com/repos/angular/angular.js/issues/11657/events","html_url":"https://github.com/angular/angular.js/issues/11657","id":69645428,"number":11657,"title":"Directive scopeTypes like react's propTypes","user":{"login":"kentcdodds","id":1500684,"avatar_url":"https://avatars.githubusercontent.com/u/1500684?v=3","gravatar_id":"","url":"https://api.github.com/users/kentcdodds","html_url":"https://github.com/kentcdodds","followers_url":"https://api.github.com/users/kentcdodds/followers","following_url":"https://api.github.com/users/kentcdodds/following{/other_user}","gists_url":"https://api.github.com/users/kentcdodds/gists{/gist_id}","starred_url":"https://api.github.com/users/kentcdodds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kentcdodds/subscriptions","organizations_url":"https://api.github.com/users/kentcdodds/orgs","repos_url":"https://api.github.com/users/kentcdodds/repos","events_url":"https://api.github.com/users/kentcdodds/events{/privacy}","received_events_url":"https://api.github.com/users/kentcdodds/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular/angular.js/labels/1.5-candidate","name":"1.5-candidate","color":"207de5"},{"url":"https://api.github.com/repos/angular/angular.js/labels/component:%20$compile","name":"component: $compile","color":"e102d8"},{"url":"https://api.github.com/repos/angular/angular.js/labels/needs:%20feedback","name":"needs: feedback","color":"bfdadc"},{"url":"https://api.github.com/repos/angular/angular.js/labels/needs:%20public%20api","name":"needs: public api","color":"eb6420"},{"url":"https://api.github.com/repos/angular/angular.js/labels/severity:%20inconvenient","name":"severity: inconvenient","color":"006b75"},{"url":"https://api.github.com/repos/angular/angular.js/labels/type:%20feature","name":"type: feature","color":"00a606"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/angular/angular.js/milestones/35","html_url":"https://github.com/angular/angular.js/milestones/Purgatory","labels_url":"https://api.github.com/repos/angular/angular.js/milestones/35/labels","id":526241,"number":35,"title":"Purgatory","description":"This milestone is for issues and PRs that weren't accepted yet and we are waiting for more info from the submitter.\r\n\r\nFor issues this typically means that we weren't able to reproduce the issue or we haven't decided yet if a feature request is a good idea at all.\r\n\r\nFor PRs this means that the PR still needs a lot of work and we might not even be interested in merging it because it looks like a non-core feature. We are still waiting for more discussion within the team or more info from the contributor before making the final decision.","creator":{"login":"IgorMinar","id":216296,"avatar_url":"https://avatars.githubusercontent.com/u/216296?v=3","gravatar_id":"","url":"https://api.github.com/users/IgorMinar","html_url":"https://github.com/IgorMinar","followers_url":"https://api.github.com/users/IgorMinar/followers","following_url":"https://api.github.com/users/IgorMinar/following{/other_user}","gists_url":"https://api.github.com/users/IgorMinar/gists{/gist_id}","starred_url":"https://api.github.com/users/IgorMinar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IgorMinar/subscriptions","organizations_url":"https://api.github.com/users/IgorMinar/orgs","repos_url":"https://api.github.com/users/IgorMinar/repos","events_url":"https://api.github.com/users/IgorMinar/events{/privacy}","received_events_url":"https://api.github.com/users/IgorMinar/received_events","type":"User","site_admin":false},"open_issues":121,"closed_issues":419,"state":"open","created_at":"2014-01-04T01:20:50Z","updated_at":"2015-07-15T21:57:01Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2015-04-20T18:02:14Z","updated_at":"2015-07-15T22:08:40Z","closed_at":null,"body":"One of my favorite parts of React is PropTypes. I would really really love to be able to utilize this kind of api in Angular.\r\n\r\nFor those not familiar, PropTypes essentially allows you to validate the api to your component so the developer is warned in the console when providing properties that are incorrect, of the wrong type, or are required and not specified.\r\n\r\nI love this so much that I created [apiCheck.js](https://github.com/kentcdodds/apiCheck.js) to bring this to the VanillaJS world. And I even started [a little prototype](http://jsbin.com/vimude/edit?html,js,console,output) (WIP) for adding scopeTypes to Angular 1.x directives.\r\n\r\nI would happily work on adding this functionality to angular if there's enough interest. Even something as simple as a function that would be called to validate the scope properties would be nice... Just keeping validation out of my controller logic is what I'm looking for.\r\n\r\n*Note:* I'm more interested in getting this concept accepted and implemented than I am in actually using apiCheck... I don't care what's used. I just want it to be easy."},"comment":{"url":"https://api.github.com/repos/angular/angular.js/issues/comments/121764222","html_url":"https://github.com/angular/angular.js/issues/11657#issuecomment-121764222","issue_url":"https://api.github.com/repos/angular/angular.js/issues/11657","id":121764222,"user":{"login":"kentcdodds","id":1500684,"avatar_url":"https://avatars.githubusercontent.com/u/1500684?v=3","gravatar_id":"","url":"https://api.github.com/users/kentcdodds","html_url":"https://github.com/kentcdodds","followers_url":"https://api.github.com/users/kentcdodds/followers","following_url":"https://api.github.com/users/kentcdodds/following{/other_user}","gists_url":"https://api.github.com/users/kentcdodds/gists{/gist_id}","starred_url":"https://api.github.com/users/kentcdodds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kentcdodds/subscriptions","organizations_url":"https://api.github.com/users/kentcdodds/orgs","repos_url":"https://api.github.com/users/kentcdodds/repos","events_url":"https://api.github.com/users/kentcdodds/events{/privacy}","received_events_url":"https://api.github.com/users/kentcdodds/received_events","type":"User","site_admin":false},"created_at":"2015-07-15T22:08:40Z","updated_at":"2015-07-15T22:08:40Z","body":"Fantastic! Would love to get something like this supported in core. Do you mind giving me a tip as to a good place to start? As well as where my tests should go?"}}