{"id":19900166,"url":"https://github.com/grncdr/ts-react-loader","last_synced_at":"2025-07-06T21:02:54.417Z","repository":{"id":65998598,"uuid":"112187054","full_name":"grncdr/ts-react-loader","owner":"grncdr","description":"Automatic prop-types from TypeScript types","archived":false,"fork":false,"pushed_at":"2017-11-27T11:40:40.000Z","size":27,"stargazers_count":70,"open_issues_count":6,"forks_count":2,"subscribers_count":6,"default_branch":"develop","last_synced_at":"2025-04-06T11:03:21.854Z","etag":null,"topics":["prop-types","typescript","webpack-loader"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grncdr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-27T11:19:41.000Z","updated_at":"2023-04-28T17:58:53.000Z","dependencies_parsed_at":"2023-03-26T16:02:51.505Z","dependency_job_id":null,"html_url":"https://github.com/grncdr/ts-react-loader","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grncdr%2Fts-react-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grncdr%2Fts-react-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grncdr%2Fts-react-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grncdr%2Fts-react-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grncdr","download_url":"https://codeload.github.com/grncdr/ts-react-loader/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252122147,"owners_count":21698304,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["prop-types","typescript","webpack-loader"],"created_at":"2024-11-12T20:11:31.651Z","updated_at":"2025-05-02T23:30:40.395Z","avatar_url":"https://github.com/grncdr.png","language":"TypeScript","readme":"# ts-react-loader\n\n**Warning** this code is proof-of-concept quality at best! If you find the idea\ncompelling and would like to contribute to making it something reliably\nshippable, [say hi](https://github.com/grncdr/ts-react-loader/issues/1).\n\n## What it does\n\nGiven a file like this:\n\n```typescript\nimport * as React from \"react\";\n\ninterface Props {\n  foo: string;\n}\nclass FooComponent extends React.Component\u003cProps\u003e {\n  context: {\n    store: {\n      dispatch: (action: any) =\u003e any;\n    };\n  };\n\n  render() {\n    return \u003cstrong\u003eYour foo is: {this.props.foo}\u003c/strong\u003e;\n  }\n}\n```\n\nThis loader will emit new TypeScript with prop \u0026 context types added:\n\n```typescript\nimport * as React from \"react\";\nimport * as PropTypes from \"prop-types\";\n\ninterface Props {\n  foo: string;\n}\n\nclass FooComponent extends React.Component\u003cProps\u003e {\n  static propTypes = {\n    foo: PropTypes.string.isRequired\n  };\n\n  static contextTypes = {\n    store: PropTypes.shape({\n      dispatch: PropTypes.func.isRequired\n    }).isRequired\n  };\n\n  context: {\n    store: {\n      dispatch: Function;\n    };\n  };\n\n  render() {\n    return \u003cstrong\u003eYour foo is: {this.props.foo}\u003c/strong\u003e;\n  }\n}\n```\n\nLook ma! no repetition!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrncdr%2Fts-react-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrncdr%2Fts-react-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrncdr%2Fts-react-loader/lists"}