{"action":"opened","issue":{"url":"https://api.github.com/repos/vega/vega-lite/issues/703","labels_url":"https://api.github.com/repos/vega/vega-lite/issues/703/labels{/name}","comments_url":"https://api.github.com/repos/vega/vega-lite/issues/703/comments","events_url":"https://api.github.com/repos/vega/vega-lite/issues/703/events","html_url":"https://github.com/vega/vega-lite/issues/703","id":115190664,"number":703,"title":"Split Schema.js","user":{"login":"kanitw","id":111269,"avatar_url":"https://avatars.githubusercontent.com/u/111269?v=3","gravatar_id":"","url":"https://api.github.com/users/kanitw","html_url":"https://github.com/kanitw","followers_url":"https://api.github.com/users/kanitw/followers","following_url":"https://api.github.com/users/kanitw/following{/other_user}","gists_url":"https://api.github.com/users/kanitw/gists{/gist_id}","starred_url":"https://api.github.com/users/kanitw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kanitw/subscriptions","organizations_url":"https://api.github.com/users/kanitw/orgs","repos_url":"https://api.github.com/users/kanitw/repos","events_url":"https://api.github.com/users/kanitw/events{/privacy}","received_events_url":"https://api.github.com/users/kanitw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-05T01:41:00Z","updated_at":"2015-11-05T01:41:00Z","closed_at":null,"body":"Right now schema.js is almost 1000 lines, we should \r\n- [ ] at least split them off into multiple files\r\n- [ ] consider if we would like to migrate to TypeScript.   Basically, the schema is describing the Vega-Lite object and if we’re doing that anyway, why don’t we declare these using Typescript’s interface and leverage it to prevent type error in the whole code base?   \r\n  - There is a tool for generating JSON schema from TypeScript interface. However, we need to handle\r\n    - `default`: Currently we generate default values by augmenting json schema with `default` property and used in our instantiate method.  \r\n    - `role`: Currently we add `role` property to guide how UI can be automatically generated in Polestar. \r\n\r\n\r\n"}}