{"action":"created","issue":{"url":"https://api.github.com/repos/tachyons-css/tachyons/issues/596","repository_url":"https://api.github.com/repos/tachyons-css/tachyons","labels_url":"https://api.github.com/repos/tachyons-css/tachyons/issues/596/labels{/name}","comments_url":"https://api.github.com/repos/tachyons-css/tachyons/issues/596/comments","events_url":"https://api.github.com/repos/tachyons-css/tachyons/issues/596/events","html_url":"https://github.com/tachyons-css/tachyons/issues/596","id":369085224,"node_id":"MDU6SXNzdWUzNjkwODUyMjQ=","number":596,"title":"Proposal: typed tachyons","user":{"login":"alexkuz","id":790659,"node_id":"MDQ6VXNlcjc5MDY1OQ==","avatar_url":"https://avatars1.githubusercontent.com/u/790659?v=4","gravatar_id":"","url":"https://api.github.com/users/alexkuz","html_url":"https://github.com/alexkuz","followers_url":"https://api.github.com/users/alexkuz/followers","following_url":"https://api.github.com/users/alexkuz/following{/other_user}","gists_url":"https://api.github.com/users/alexkuz/gists{/gist_id}","starred_url":"https://api.github.com/users/alexkuz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexkuz/subscriptions","organizations_url":"https://api.github.com/users/alexkuz/orgs","repos_url":"https://api.github.com/users/alexkuz/repos","events_url":"https://api.github.com/users/alexkuz/events{/privacy}","received_events_url":"https://api.github.com/users/alexkuz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-11T11:54:54Z","updated_at":"2018-11-12T09:01:22Z","closed_at":null,"author_association":"NONE","body":"I have an idea for Typescript/Flowtype support in Tachyons and I'm wondering what you think about it, is it worth implementing or there's another solution.\r\n\r\nOne of the biggest issues of using Tachyons in React apps (or other kinds of apps, it's not React-specific, of course) for me is that once you choose to use this framework it's hard to opt out without breaking your layouts. Using typed definitions could help that (obviously, it would also help with other benefits of typed language like autocompletion)\r\n\r\nThe definition could look like this (in Typescript):\r\n\r\n```tsx\r\nenum Tachyons {\r\n    aspectRatio = 'aspect-ratio',\r\n    aspectRatio16x9 = 'aspect-ratio--16x9',\r\n\t...\r\n};\r\n\r\n// maybe a classname builder object for convenience\r\n\r\ntype TachyonsBuilder = {\r\n  [k in Fields]: TachyonsBuilder;\r\n} & {\r\n  toString: () => string;\r\n};\r\n\r\nlet tb: TachyonsBuilder;\r\n\r\n\r\n// ...\r\n\r\n\r\n<div className={`${Tachyons.cover} ${Tachyons.br2}`} />\r\n\r\n// or\r\n\r\n<div className={tb.cover.br2.toString()} />\r\n\r\n// or maybe with a getter that returns a string\r\n\r\n<div className={tb.cover.br2.str} />\r\n```\r\n\r\nDoes it make sense for you?"},"comment":{"url":"https://api.github.com/repos/tachyons-css/tachyons/issues/comments/437804842","html_url":"https://github.com/tachyons-css/tachyons/issues/596#issuecomment-437804842","issue_url":"https://api.github.com/repos/tachyons-css/tachyons/issues/596","id":437804842,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNzgwNDg0Mg==","user":{"login":"mrmrs","id":1748143,"node_id":"MDQ6VXNlcjE3NDgxNDM=","avatar_url":"https://avatars1.githubusercontent.com/u/1748143?v=4","gravatar_id":"","url":"https://api.github.com/users/mrmrs","html_url":"https://github.com/mrmrs","followers_url":"https://api.github.com/users/mrmrs/followers","following_url":"https://api.github.com/users/mrmrs/following{/other_user}","gists_url":"https://api.github.com/users/mrmrs/gists{/gist_id}","starred_url":"https://api.github.com/users/mrmrs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrmrs/subscriptions","organizations_url":"https://api.github.com/users/mrmrs/orgs","repos_url":"https://api.github.com/users/mrmrs/repos","events_url":"https://api.github.com/users/mrmrs/events{/privacy}","received_events_url":"https://api.github.com/users/mrmrs/received_events","type":"User","site_admin":false},"created_at":"2018-11-12T09:01:22Z","updated_at":"2018-11-12T09:01:22Z","author_association":"MEMBER","body":"I don't use typescript or flow so not looking to maintain any code around it. Any reason this wouldn't be the best place to keep typescript defs? https://github.com/DefinitelyTyped/DefinitelyTyped"}}
{"actor":{"display_login":"mrmrs"}}