{"action":"created","issue":{"url":"https://api.github.com/repos/expo/expo/issues/2164","repository_url":"https://api.github.com/repos/expo/expo","labels_url":"https://api.github.com/repos/expo/expo/issues/2164/labels{/name}","comments_url":"https://api.github.com/repos/expo/expo/issues/2164/comments","events_url":"https://api.github.com/repos/expo/expo/issues/2164/events","html_url":"https://github.com/expo/expo/issues/2164","id":356091942,"node_id":"MDU6SXNzdWUzNTYwOTE5NDI=","number":2164,"title":"[RFC] First-class support for TypeScript in the Expo SDK","user":{"login":"ide","id":379606,"node_id":"MDQ6VXNlcjM3OTYwNg==","avatar_url":"https://avatars0.githubusercontent.com/u/379606?v=4","gravatar_id":"","url":"https://api.github.com/users/ide","html_url":"https://github.com/ide","followers_url":"https://api.github.com/users/ide/followers","following_url":"https://api.github.com/users/ide/following{/other_user}","gists_url":"https://api.github.com/users/ide/gists{/gist_id}","starred_url":"https://api.github.com/users/ide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ide/subscriptions","organizations_url":"https://api.github.com/users/ide/orgs","repos_url":"https://api.github.com/users/ide/repos","events_url":"https://api.github.com/users/ide/events{/privacy}","received_events_url":"https://api.github.com/users/ide/received_events","type":"User","site_admin":false},"labels":[{"id":1041867325,"node_id":"MDU6TGFiZWwxMDQxODY3MzI1","url":"https://api.github.com/repos/expo/expo/labels/rfc","name":"rfc","color":"000000","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-08-31T19:02:11Z","updated_at":"2018-09-18T07:04:51Z","closed_at":null,"author_association":"MEMBER","body":"The Expo team is considering adding first-class support for TypeScript to the Expo SDK. For JS type systems (namely TS and Flow) we see a significant preference for TypeScript and in our own experience we find TypeScript to be stable, sufficiently expressive most of the time, and generally positive. We also find that standard, untyped JS works well and will continue to design APIs that work well without a type system.\r\n\r\n## Why\r\n\r\nThe primary reason for first-class support for TypeScript is that it is stable and works well without drawing too much on our attention for maintenance. The TypeScript team has done very good work creating smooth upgrade plans (e.g. upgrading from TypeScript 2.x to 3.x is quite smooth) and we've found their work to be reliable. We believe that making more parts of Expo -- in this case, TypeScript -- more reliable will make it more reliable to develop and use apps made with Expo.\r\n\r\nAdditionally, the very recently released Babel 7 supports TypeScript, which means we can continue to use Babel-based builds for Expo hopefully without introducing too much thrash or instability.\r\n\r\n## How\r\n\r\nIn practice, this proposal means that the Expo SDK would move to .ts files and the Flow type hints would be replaced by TypeScript type hints. Today, TypeScript type declarations (https://github.com/DefinitelyTyped/DefinitelyTyped) are helpfully maintained by developers in the Expo community and the Expo SDK provides Flow types; this would switch around where the Expo SDK would provide TypeScript types and the community, if someone were to step up, would maintain Flow type declarations in https://github.com/flow-typed/flow-typed. Given the history of solid work from the TypeScript team, the popularity of TypeScript amongst Expo developers, and the stability and reduced maintenance tax we expect from moving the Expo SDK to TypeScript, we believe this is a high-ROI tradeoff.\r\n\r\nSome dependencies of the Expo SDK that aren't maintained by the Expo team, like React Native, Maps, and SVG, may not have complete or accurate type declarations so we expect to start with TypeScript's default non-strict mode, adding stricter options when possible in a forward-looking way (ex: will we be able to keep the strict option when upgrading a dependency in the future?).\r\n\r\nEventually, we may also provide TypeScript support in the new-project templates so it is easy for developers to work with TypeScript from the start. We will continue to design our APIs to work well without TypeScript, which we believe to be responsible, safe, and forward-looking.\r\n\r\n## Request for comments\r\n\r\nWe are looking to see how this proposal resonates with Expo developers, especially professionals building apps for business. Along with this RFC thread, we'll also talk to some developers in interviews and at conferences to gauge feedback before making a decision in the coming weeks.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/expo/expo/issues/comments/422279036","html_url":"https://github.com/expo/expo/issues/2164#issuecomment-422279036","issue_url":"https://api.github.com/repos/expo/expo/issues/2164","id":422279036,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMjI3OTAzNg==","user":{"login":"jhalborg","id":6643672,"node_id":"MDQ6VXNlcjY2NDM2NzI=","avatar_url":"https://avatars2.githubusercontent.com/u/6643672?v=4","gravatar_id":"","url":"https://api.github.com/users/jhalborg","html_url":"https://github.com/jhalborg","followers_url":"https://api.github.com/users/jhalborg/followers","following_url":"https://api.github.com/users/jhalborg/following{/other_user}","gists_url":"https://api.github.com/users/jhalborg/gists{/gist_id}","starred_url":"https://api.github.com/users/jhalborg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhalborg/subscriptions","organizations_url":"https://api.github.com/users/jhalborg/orgs","repos_url":"https://api.github.com/users/jhalborg/repos","events_url":"https://api.github.com/users/jhalborg/events{/privacy}","received_events_url":"https://api.github.com/users/jhalborg/received_events","type":"User","site_admin":false},"created_at":"2018-09-18T07:04:51Z","updated_at":"2018-09-18T07:04:51Z","author_association":"NONE","body":"@ckknight & @Kingles - You can actually use a custom transformer [as examplified here](https://github.com/janaagaard75/expo-and-typescript#setting-up-expo-and-react-native-with-typescript) and `--noEmit` already, but it would sure be nice to have a somewhat opinionated and supported setup from the Expo team, especially for newcomers looking to use Typescript."}}
{"actor":{"display_login":"jhalborg"}}