{"id":19339067,"url":"https://github.com/smooth-code/prop-desc","last_synced_at":"2025-04-23T02:30:26.439Z","repository":{"id":66053158,"uuid":"201606058","full_name":"smooth-code/prop-desc","owner":"smooth-code","description":"React prop-types with metadata inside ✨","archived":false,"fork":false,"pushed_at":"2020-07-27T14:23:22.000Z","size":277,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-02T06:22:18.025Z","etag":null,"topics":["documentation","prop-types","react"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smooth-code.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-08-10T09:03:56.000Z","updated_at":"2022-05-27T15:56:36.000Z","dependencies_parsed_at":"2023-03-10T23:36:07.348Z","dependency_job_id":null,"html_url":"https://github.com/smooth-code/prop-desc","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smooth-code%2Fprop-desc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smooth-code%2Fprop-desc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smooth-code%2Fprop-desc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smooth-code%2Fprop-desc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smooth-code","download_url":"https://codeload.github.com/smooth-code/prop-desc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250357462,"owners_count":21417278,"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":["documentation","prop-types","react"],"created_at":"2024-11-10T03:19:42.461Z","updated_at":"2025-04-23T02:30:26.068Z","avatar_url":"https://github.com/smooth-code.png","language":"JavaScript","readme":"# prop-desc\n\n[![License](https://img.shields.io/npm/l/prop-desc.svg)](https://github.com/smooth-code/prop-desc/blob/master/LICENSE)\n[![npm package](https://img.shields.io/npm/v/prop-desc/latest.svg)](https://www.npmjs.com/package/prop-desc)\n[![Build Status](https://img.shields.io/travis/smooth-code/prop-desc.svg)](https://travis-ci.org/smooth-code/prop-desc)\n[![DevDependencies](https://img.shields.io/david/dev/smooth-code/prop-desc.svg)](https://david-dm.org/smooth-code/prop-desc?type=dev)\n\nReact prop-types with metadata inside ✨\n\nIt is a drop-in replacement for prop-types that includes metadata to generate documentation from prop-types consistently.\n\n```sh\nnpm install prop-desc prop-types\n```\n\n## Example\n\n```js\nimport React from 'react'\nimport PropTypes from 'prop-desc'\n\nfunction MyComponent() {\n  // ... do things with the props\n}\n\nMyComponent.propTypes = {\n  optionalArray: PropTypes.array,\n  optionalBool: PropTypes.bool,\n  optionalFunc: PropTypes.func,\n}\n\nconsole.log(PropTypes.getMetadata(MyComponent.propTypes))\n```\n\n## Why?\n\nGenerating documentation from prop types is useful but not easy. A project call [react-docgen](https://github.com/reactjs/react-docgen) try to introspect code to extract type but it remains static and does not work with complex prop types (in other files). prop-desc solves this and permits to generate consistent documentation from your prop-types.\n\n# License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmooth-code%2Fprop-desc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmooth-code%2Fprop-desc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmooth-code%2Fprop-desc/lists"}