{"_id":"@drymers/ts-to-proptypes","_rev":"7-630b0b428c328b603f68c76686b5fef7","name":"@drymers/ts-to-proptypes","dist-tags":{"latest":"1.0.6"},"versions":{"1.0.0":{"name":"@drymers/ts-to-proptypes","version":"1.0.0","keywords":["react","typescript","proptypes","generator","static-analysis","types","validation"],"author":{"name":"Derek Rymers"},"license":"MIT","_id":"@drymers/ts-to-proptypes@1.0.0","maintainers":[{"name":"drymers","email":"rymersd@gmail.com"}],"homepage":"https://github.com/DRymers7/ts-to-proptypes#readme","bugs":{"url":"https://github.com/DRymers7/ts-to-proptypes/issues"},"bin":{"ts-to-proptypes":"dist/bin/cli.js"},"dist":{"shasum":"ee2ff335500495bbeb3bae436799bcbb66d15c03","tarball":"https://registry.npmjs.org/@drymers/ts-to-proptypes/-/ts-to-proptypes-1.0.0.tgz","fileCount":10,"integrity":"sha512-HBibN6ps5ueV06mWHEjdaAcQLNmKP/pb5WHUQjf/7zSoKKRUrCe3a4BrQcedhra4pNub7+kBOsbBET96GYlvFA==","signatures":[{"sig":"MEUCIAam6xBmC04Ko+AZsooJSlM50d5eG0I9PJKi4kZtb7dKAiEA00kOGfNq6PTHQJqc478mth6NDGdY+zx7xDoIC2PLkRA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":343154},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.esm.js","engines":{"node":">=14.0.0"},"gitHead":"7078803554e96d791053b8813e17404257f276e7","scripts":{"dev":"tsx src/cli/cli.ts","lint":"eslint . --ext .ts,.tsx","test":"vitest","build":"rimraf dist && rollup --bundleConfigAsCjs -c","format":"prettier . --write","test:ui":"vitest --ui","test:watch":"vitest --watch","prepublishOnly":"npm run build","test:integration":"vitest run tests/integration/integration.test.js"},"_npmUser":{"name":"drymers","email":"rymersd@gmail.com"},"repository":{"url":"git+https://github.com/DRymers7/ts-to-proptypes.git","type":"git"},"_npmVersion":"10.7.0","description":"Generate React PropTypes declarations automatically from TypeScript interfaces and types.","directories":{},"_nodeVersion":"22.2.0","dependencies":{"prettier":"^3.5.3","commander":"^13.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vi":"^1.0.0","tsx":"^4.19.3","react":"^19.1.0","tslib":"^2.8.1","rimraf":"^6.0.1","rollup":"^4.40.2","vitest":"^3.1.2","ts-morph":"^25.0.1","@vitest/ui":"^3.1.2","typescript":"^5.8.3","@types/node":"^22.15.3","@types/react":"^19.1.2","@types/prettier":"^3.0.0","@types/commander":"^2.12.5","rollup-plugin-dts":"^6.2.1","@rollup/plugin-commonjs":"^28.0.3","@rollup/plugin-typescript":"^12.1.2","@rollup/plugin-node-resolve":"^16.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ts-to-proptypes_1.0.0_1746593326835_0.27675632116759696","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@drymers/ts-to-proptypes","version":"1.0.1","keywords":["react","typescript","proptypes","generator","static-analysis","types","validation"],"author":{"name":"Derek Rymers"},"license":"MIT","_id":"@drymers/ts-to-proptypes@1.0.1","maintainers":[{"name":"drymers","email":"rymersd@gmail.com"}],"homepage":"https://github.com/DRymers7/ts-to-proptypes#readme","bugs":{"url":"https://github.com/DRymers7/ts-to-proptypes/issues"},"bin":{"ts-to-proptypes":"dist/bin/cli.js"},"dist":{"shasum":"ef2dad7d119b390ab2459f092952c7d03de31a20","tarball":"https://registry.npmjs.org/@drymers/ts-to-proptypes/-/ts-to-proptypes-1.0.1.tgz","fileCount":10,"integrity":"sha512-gNhDhlVb0iRhTfUXhn02tjzhIvlii02M4CvtO/Uza8fwwREDfj4/vy9IgyshJw7CZfcEiypSgBdYEyBxR8se+w==","signatures":[{"sig":"MEUCIQD+iElVACugl/8eUM14YEDJ+AFlExMEnkufunxTNFTrkAIgMQq1M2QJVyH0M9ztVXHE4wHBJNPyy2RkI2wITKWqukU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":343589},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.esm.js","engines":{"node":">=14.0.0"},"gitHead":"c50be0f2f8cd36260290a554138faf07e5bcab2c","scripts":{"dev":"tsx src/cli/cli.ts","lint":"eslint . --ext .ts,.tsx","test":"vitest","build":"rimraf dist && rollup --bundleConfigAsCjs -c","format":"prettier . --write","test:ui":"vitest --ui","test:unit":"vitest run tests/unit","test:watch":"vitest --watch","prepublishOnly":"npm run build","test:integration":"vitest run tests/integration/integration.test.js","generate-proptypes":"ts-to-proptypes -s \"src/components/**/*.tsx\" -o \"src/proptypes\""},"_npmUser":{"name":"drymers","email":"rymersd@gmail.com"},"repository":{"url":"git+https://github.com/DRymers7/ts-to-proptypes.git","type":"git"},"_npmVersion":"10.8.2","description":"Generate React PropTypes declarations automatically from TypeScript interfaces and types.","directories":{},"_nodeVersion":"18.20.8","dependencies":{"prettier":"^3.5.3","commander":"^13.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vi":"^1.0.0","tsx":"^4.19.3","react":"^19.1.0","tslib":"^2.8.1","rimraf":"^6.0.1","rollup":"^4.40.2","vitest":"^3.1.2","ts-morph":"^25.0.1","@vitest/ui":"^3.1.2","typescript":"^5.8.3","@types/node":"^22.15.3","@types/react":"^19.1.2","@types/prettier":"^3.0.0","@types/commander":"^2.12.5","rollup-plugin-dts":"^6.2.1","@rollup/plugin-commonjs":"^28.0.3","@rollup/plugin-typescript":"^12.1.2","@rollup/plugin-node-resolve":"^16.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ts-to-proptypes_1.0.1_1746709132647_0.5005779079942954","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@drymers/ts-to-proptypes","version":"1.0.2","keywords":["react","typescript","proptypes","generator","static-analysis","types","validation"],"author":{"name":"Derek Rymers"},"license":"MIT","_id":"@drymers/ts-to-proptypes@1.0.2","maintainers":[{"name":"drymers","email":"rymersd@gmail.com"}],"homepage":"https://github.com/DRymers7/ts-to-proptypes#readme","bugs":{"url":"https://github.com/DRymers7/ts-to-proptypes/issues"},"bin":{"ts-to-proptypes":"dist/bin/cli.js"},"dist":{"shasum":"5134bbf8a79689e07a7b700b65d28c709cd2d184","tarball":"https://registry.npmjs.org/@drymers/ts-to-proptypes/-/ts-to-proptypes-1.0.2.tgz","fileCount":10,"integrity":"sha512-g0dGxKrLOldu/iM7EPaMpjWn1tHBlhn+8cjGRJpbbfchXWm9+Ijscmw5slNf1tEZoOnBDkC7PbccBTLYb6jV8A==","signatures":[{"sig":"MEUCIQCxEmVvN4+ZwBTOGiJrFqgrD57KD5TMkbifteKEKUL2VAIgK5tpQUeFmbiZMjkCwr5yPeCQ4E39BmihvIZxVNjOVUc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":343408},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.esm.js","engines":{"node":">=14.0.0"},"gitHead":"bd00f7149cbe8ef886266da5010c7ae196c7c65a","scripts":{"dev":"tsx src/cli/cli.ts","lint":"eslint . --ext .ts,.tsx","test":"vitest","build":"rimraf dist && rollup --bundleConfigAsCjs -c","format":"prettier . --write","test:ui":"vitest --ui","test:unit":"vitest run tests/unit","test:watch":"vitest --watch","prepublishOnly":"npm run build","test:integration":"vitest run tests/integration/integration.test.js","generate-proptypes":"ts-to-proptypes -s \"src/components/**/*.tsx\" -o \"src/proptypes\""},"_npmUser":{"name":"drymers","email":"rymersd@gmail.com"},"repository":{"url":"git+https://github.com/DRymers7/ts-to-proptypes.git","type":"git"},"_npmVersion":"10.8.2","description":"Generate React PropTypes declarations automatically from TypeScript interfaces and types.","directories":{},"_nodeVersion":"18.20.8","dependencies":{"prettier":"^3.5.3","commander":"^13.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vi":"^1.0.0","tsx":"^4.19.3","react":"^19.1.0","tslib":"^2.8.1","rimraf":"^6.0.1","rollup":"^4.40.2","vitest":"^3.1.2","ts-morph":"^25.0.1","@vitest/ui":"^3.1.2","typescript":"^5.8.3","@types/node":"^22.15.3","@types/react":"^19.1.2","@types/prettier":"^3.0.0","@types/commander":"^2.12.5","rollup-plugin-dts":"^6.2.1","@rollup/plugin-commonjs":"^28.0.3","@rollup/plugin-typescript":"^12.1.2","@rollup/plugin-node-resolve":"^16.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ts-to-proptypes_1.0.2_1746713558807_0.38222909977793385","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@drymers/ts-to-proptypes","version":"1.0.3","keywords":["react","typescript","proptypes","generator","static-analysis","types","validation"],"author":{"name":"Derek Rymers"},"license":"MIT","_id":"@drymers/ts-to-proptypes@1.0.3","maintainers":[{"name":"drymers","email":"rymersd@gmail.com"}],"homepage":"https://github.com/DRymers7/ts-to-proptypes#readme","bugs":{"url":"https://github.com/DRymers7/ts-to-proptypes/issues"},"bin":{"ts-to-proptypes":"dist/bin/cli.js"},"dist":{"shasum":"967387186d3e5fdecee64a0c768741d2077d0aca","tarball":"https://registry.npmjs.org/@drymers/ts-to-proptypes/-/ts-to-proptypes-1.0.3.tgz","fileCount":10,"integrity":"sha512-hLDrrWNgBQs49IpahOlTkMeZfVFsR2qqsW9jU25/MRGNPPwLm85/6tukPBCNqNcgiGHZptHQPb395hEX4lVfgQ==","signatures":[{"sig":"MEUCIATAZzcVEFGUnhvyLy0GEzZCGbZK9no5n8+26KYjGWs3AiEAg3sqkz8xeXg29mXcBY94raiox/Kk+6GN2VEhRblNNWQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":343516},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.esm.js","engines":{"node":">=14.0.0"},"gitHead":"f73792cb908c9350a31f29ff6bfc82cfff0fb87e","scripts":{"dev":"tsx src/cli/cli.ts","lint":"eslint . --ext .ts,.tsx","test":"vitest","build":"rimraf dist && rollup --bundleConfigAsCjs -c","format":"prettier . --write","test:ui":"vitest --ui","test:unit":"vitest run tests/unit","test:watch":"vitest --watch","prepublishOnly":"npm run build","test:integration":"vitest run tests/integration/integration.test.js","generate-proptypes":"ts-to-proptypes -s \"src/components/**/*.tsx\" -o \"src/proptypes\""},"_npmUser":{"name":"drymers","email":"rymersd@gmail.com"},"repository":{"url":"git+https://github.com/DRymers7/ts-to-proptypes.git","type":"git"},"_npmVersion":"10.8.2","description":"Generate React PropTypes declarations automatically from TypeScript interfaces and types.","directories":{},"_nodeVersion":"18.20.8","dependencies":{"prettier":"^3.5.3","commander":"^13.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vi":"^1.0.0","tsx":"^4.19.3","react":"^19.1.0","tslib":"^2.8.1","rimraf":"^6.0.1","rollup":"^4.40.2","vitest":"^3.1.2","ts-morph":"^25.0.1","@vitest/ui":"^3.1.2","typescript":"^5.8.3","@types/node":"^22.15.3","@types/react":"^19.1.2","@types/prettier":"^3.0.0","@types/commander":"^2.12.5","rollup-plugin-dts":"^6.2.1","@rollup/plugin-commonjs":"^28.0.3","@rollup/plugin-typescript":"^12.1.2","@rollup/plugin-node-resolve":"^16.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ts-to-proptypes_1.0.3_1746716583575_0.36052462309529565","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@drymers/ts-to-proptypes","version":"1.0.4","keywords":["react","typescript","proptypes","generator","static-analysis","types","validation"],"author":{"name":"Derek Rymers"},"license":"MIT","_id":"@drymers/ts-to-proptypes@1.0.4","maintainers":[{"name":"drymers","email":"rymersd@gmail.com"}],"homepage":"https://github.com/DRymers7/ts-to-proptypes#readme","bugs":{"url":"https://github.com/DRymers7/ts-to-proptypes/issues"},"bin":{"ts-to-proptypes":"dist/bin/cli.js"},"dist":{"shasum":"71998da79d39e47b2c5c958ab245ac8513b3f5b6","tarball":"https://registry.npmjs.org/@drymers/ts-to-proptypes/-/ts-to-proptypes-1.0.4.tgz","fileCount":10,"integrity":"sha512-YskvwQsbmz7ucIw+Zzluyn5ncMqGx+sTvV3DV1f4OlCwV1NUvjcOLpnp1JoJUHEoomXjzzNL35KFeojTKVQ/ug==","signatures":[{"sig":"MEUCIQCNyYZf2L/qW7hCdq4p/hqQ6l8Xo7yLy7H+8WDL+sK66QIgD1r92sJ4ZYCHgC+m9VV3h8JOFzrq4e7xmBlMnE7+kWc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":343516},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.esm.js","engines":{"node":">=14.0.0"},"gitHead":"8f0915eb849ebc18e3bae89ba2c01e773ffeb626","scripts":{"dev":"tsx src/cli/cli.ts","lint":"eslint . --ext .ts,.tsx","test":"vitest","build":"rimraf dist && rollup --bundleConfigAsCjs -c","format":"prettier . --write","test:ui":"vitest --ui","test:unit":"vitest run tests/unit","test:watch":"vitest --watch","prepublishOnly":"npm run build","test:integration":"vitest run tests/integration/integration.test.js","generate-proptypes":"ts-to-proptypes -s \"src/components/**/*.tsx\" -o \"src/proptypes\""},"_npmUser":{"name":"drymers","email":"rymersd@gmail.com"},"repository":{"url":"git+https://github.com/DRymers7/ts-to-proptypes.git","type":"git"},"_npmVersion":"10.8.2","description":"Generate React PropTypes declarations automatically from TypeScript interfaces and types.","directories":{},"_nodeVersion":"18.20.8","dependencies":{"prettier":"^3.5.3","commander":"^13.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vi":"^1.0.0","tsx":"^4.19.3","react":"^19.1.0","tslib":"^2.8.1","rimraf":"^6.0.1","rollup":"^4.40.2","vitest":"^3.1.2","ts-morph":"^25.0.1","@vitest/ui":"^3.1.2","typescript":"^5.8.3","@types/node":"^22.15.3","@types/react":"^19.1.2","@types/prettier":"^3.0.0","@types/commander":"^2.12.5","rollup-plugin-dts":"^6.2.1","@rollup/plugin-commonjs":"^28.0.3","@rollup/plugin-typescript":"^12.1.2","@rollup/plugin-node-resolve":"^16.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ts-to-proptypes_1.0.4_1746718910818_0.5391980350640699","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@drymers/ts-to-proptypes","version":"1.0.5","keywords":["react","typescript","proptypes","generator","static-analysis","types","validation"],"author":{"name":"Derek Rymers"},"license":"MIT","_id":"@drymers/ts-to-proptypes@1.0.5","maintainers":[{"name":"drymers","email":"rymersd@gmail.com"}],"homepage":"https://github.com/DRymers7/ts-to-proptypes#readme","bugs":{"url":"https://github.com/DRymers7/ts-to-proptypes/issues"},"bin":{"ts-to-proptypes":"dist/bin/cli.js"},"dist":{"shasum":"eccf4e49350f7d297614500259261ac2aa1e8719","tarball":"https://registry.npmjs.org/@drymers/ts-to-proptypes/-/ts-to-proptypes-1.0.5.tgz","fileCount":10,"integrity":"sha512-hYkJFpjwgiBHCyCUxAS/6XQJeObi/deczfkET1bF6Boz24G0UjR/uFAakt4f3uSEpGpkW6OOR8pJbUHFfArBsg==","signatures":[{"sig":"MEQCIGKt9Euc/Tr2k2sBCzAnEdoydTp1bRxcvi2WeFMlxCRpAiAfWxCc7Siaz+eojoB7+/pnYWXSAlPIWy5vaqG8wBE1Mw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":343516},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.esm.js","engines":{"node":">=14.0.0"},"gitHead":"6706803e999cd4374d308a6fcb89d8dfcdf4aacf","scripts":{"dev":"tsx src/cli/cli.ts","lint":"eslint . --ext .ts,.tsx","test":"vitest","build":"rimraf dist && rollup --bundleConfigAsCjs -c","format":"prettier . --write","test:ui":"vitest --ui","test:unit":"vitest run tests/unit","test:watch":"vitest --watch","prepublishOnly":"npm run build","test:integration":"vitest run tests/integration/integration.test.js","generate-proptypes":"ts-to-proptypes -s \"src/components/**/*.tsx\" -o \"src/proptypes\""},"_npmUser":{"name":"drymers","email":"rymersd@gmail.com"},"repository":{"url":"git+https://github.com/DRymers7/ts-to-proptypes.git","type":"git"},"_npmVersion":"10.8.2","description":"Generate React PropTypes declarations automatically from TypeScript interfaces and types.","directories":{},"_nodeVersion":"18.20.8","dependencies":{"prettier":"^3.5.3","commander":"^13.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vi":"^1.0.0","tsx":"^4.19.3","react":"^19.1.0","tslib":"^2.8.1","rimraf":"^6.0.1","rollup":"^4.40.2","vitest":"^3.1.2","ts-morph":"^25.0.1","@vitest/ui":"^3.1.2","typescript":"^5.8.3","@types/node":"^22.15.3","@types/react":"^19.1.2","@types/prettier":"^3.0.0","@types/commander":"^2.12.5","rollup-plugin-dts":"^6.2.1","@rollup/plugin-commonjs":"^28.0.3","@rollup/plugin-typescript":"^12.1.2","@rollup/plugin-node-resolve":"^16.0.1"},"_npmOperationalInternal":{"tmp":"tmp/ts-to-proptypes_1.0.5_1746719551267_0.8791177514824071","host":"s3://npm-registry-packages-npm-production"}},"1.0.6":{"name":"@drymers/ts-to-proptypes","version":"1.0.6","publishConfig":{"access":"public"},"description":"Generate React PropTypes declarations automatically from TypeScript interfaces and types.","main":"dist/index.js","module":"dist/index.esm.js","types":"dist/index.d.ts","bin":{"ts-to-proptypes":"dist/bin/cli.js"},"scripts":{"dev":"tsx src/cli/cli.ts","build":"rimraf dist && rollup --bundleConfigAsCjs -c","test":"vitest","test:ui":"vitest --ui","test:watch":"vitest --watch","test:unit":"vitest run tests/unit","test:integration":"vitest run tests/integration/integration.test.js","format":"prettier . --write","lint":"eslint . --ext .ts,.tsx","prepublishOnly":"npm run build","generate-proptypes":"ts-to-proptypes -s \"src/components/**/*.tsx\" -o \"src/proptypes\""},"engines":{"node":">=14.0.0"},"repository":{"type":"git","url":"git+https://github.com/DRymers7/ts-to-proptypes.git"},"bugs":{"url":"https://github.com/DRymers7/ts-to-proptypes/issues"},"homepage":"https://github.com/DRymers7/ts-to-proptypes#readme","keywords":["react","typescript","proptypes","generator","static-analysis","types","validation"],"author":{"name":"Derek Rymers"},"license":"MIT","devDependencies":{"@rollup/plugin-commonjs":"^28.0.3","@rollup/plugin-node-resolve":"^16.0.1","@rollup/plugin-typescript":"^12.1.2","@types/commander":"^2.12.5","@types/node":"^22.15.3","@types/prettier":"^3.0.0","@types/react":"^19.1.2","@vitest/ui":"^3.1.2","react":"^19.1.0","rimraf":"^6.0.1","rollup":"^4.40.2","rollup-plugin-dts":"^6.2.1","ts-morph":"^25.0.1","tslib":"^2.8.1","tsx":"^4.19.3","typescript":"^5.8.3","vi":"^1.0.0","vitest":"^3.1.2"},"dependencies":{"commander":"^13.1.0","prettier":"^3.5.3"},"_id":"@drymers/ts-to-proptypes@1.0.6","gitHead":"c20ad4c0653c3b14dbe7a8bbb85a5c212ba41cce","_nodeVersion":"18.20.8","_npmVersion":"10.8.2","dist":{"integrity":"sha512-0BPoWfZ5J/ShX6zgaZiPsnMGNFioWFrezgtyIfpOnWawmFcDAXnQgh4Y4Pm51ISXwuSoQhbDJ0yOeDAk2yf5IA==","shasum":"cab23334c79ab47dab835a5ff31ac24d79f9aee6","tarball":"https://registry.npmjs.org/@drymers/ts-to-proptypes/-/ts-to-proptypes-1.0.6.tgz","fileCount":10,"unpackedSize":343516,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGgNHBsZvFGOAkHpHoN8rbpNsh+2I+PRHntKXEcOg2SqAiEA4DytkzTrosfKkYXolCq3DQCDxJlag5Tu8zMXsJouBEY="}]},"_npmUser":{"name":"drymers","email":"rymersd@gmail.com"},"directories":{},"maintainers":[{"name":"drymers","email":"rymersd@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ts-to-proptypes_1.0.6_1746719848037_0.5161095529121593"},"_hasShrinkwrap":false}},"time":{"created":"2025-05-07T04:48:46.750Z","modified":"2025-05-08T15:57:28.470Z","1.0.0":"2025-05-07T04:48:47.053Z","1.0.1":"2025-05-08T12:58:52.847Z","1.0.2":"2025-05-08T14:12:39.041Z","1.0.3":"2025-05-08T15:03:03.820Z","1.0.4":"2025-05-08T15:41:50.996Z","1.0.5":"2025-05-08T15:52:31.469Z","1.0.6":"2025-05-08T15:57:28.310Z"},"bugs":{"url":"https://github.com/DRymers7/ts-to-proptypes/issues"},"author":{"name":"Derek Rymers"},"license":"MIT","homepage":"https://github.com/DRymers7/ts-to-proptypes#readme","keywords":["react","typescript","proptypes","generator","static-analysis","types","validation"],"repository":{"type":"git","url":"git+https://github.com/DRymers7/ts-to-proptypes.git"},"description":"Generate React PropTypes declarations automatically from TypeScript interfaces and types.","maintainers":[{"name":"drymers","email":"rymersd@gmail.com"}],"readme":"![npm version](https://img.shields.io/npm/v/ts-to-proptypes)\n![build status](https://github.com/DRymers7/ts-to-proptypes/actions/workflows/publish-package.yml/badge.svg)\n![license](https://img.shields.io/github/license/DRymers7/ts-to-proptypes)\n![TypeScript](https://img.shields.io/badge/TypeScript-4.9%2B-blue)\n![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)\n\n# ts-to-proptypes\n\nGenerate React PropTypes declarations automatically from TypeScript interfaces and types.\n\n## Introduction\n\n`ts-to-proptypes` is a developer tool that bridges the gap between TypeScript's static type system and React's runtime PropTypes validation. It analyzes your TypeScript React components and generates corresponding PropTypes definitions, enhancing your components with runtime type checking without the manual effort of maintaining duplicate type definitions.\n\nThis tool is particularly useful for projects that:\n\n- Use TypeScript for static type checking\n- Need runtime validation through PropTypes\n- Want to maintain consistency between TypeScript types and PropTypes\n- Generate documentation from PropTypes (such as with Storybook)\n\n## Installation\n\nInstall the package as a development dependency:\n\n```bash\n# Using npm (public npm)\nnpm install @drymers/ts-to-proptypes --save-dev\n\n# Using yarn\nyarn add @drymers/ts-to-proptypes --save-dev\n\n\n# Using pnpm\npnpm add -D @drymers/ts-to-proptypes --save-dev\n```\n\n#### Installing from GitHub Packages\n(ensure your project .npmrc has @drymers:registry=https://npm.pkg.github.com)\n\n```bash\nnpm install @drymers/ts-to-proptypes --save-dev\n```\n\n## Features\n\n`ts-to-proptypes` provides several key features to enhance your React development workflow:\n\n- **Automatic PropTypes Generation**: Convert TypeScript interfaces and types to PropTypes declarations\n- **Function Component Support**: Works with both standard and arrow function components\n- **Default Export Detection**: Properly handles default exports by identifying the actual component name\n- **Required Props Identification**: Preserves optional/required status from TypeScript definitions\n- **Type Mapping**: Intelligently maps TypeScript types to appropriate PropTypes validators\n- **Inline or Separate Files**: Generate PropTypes in the same file or in separate files\n- **Prettier Integration**: Format the generated code according to your project's Prettier configuration\n\n## Usage\n\n### Quick CLI\n\nRun once with `npx`:\n\n```bash\nnpx ts-to-proptypes \\\n  -s \"src/components/**/*.tsx\" \\\n  -o \"src/proptypes\"\n```\n\n#### Common flags\n\n* `-s, --source <glob>`\n  Glob pattern for input files (default: `src/**/*.tsx`)\n* `-o, --outDir <dir>`\n  Where to write generated files (default: current working dir)\n* `--inline`\n  Append `propTypes` definitions directly into each source file\n* `--prettier`\n  Run Prettier on the generated output\n\n---\n\n### Via npm Script\n\nAdd this to your `package.json`:\n\n```jsonc\n\"scripts\": {\n  \"generate-proptypes\": \"ts-to-proptypes -s \\\"src/components/**/*.tsx\\\" -o \\\"src/proptypes\\\"\"\n}\n```\n\nNow simply run:\n\n```bash\nnpm run generate-proptypes\n```\n\nYou can combine flags as needed:\n\n```bash\nnpm run generate-proptypes -- --inline --prettier\n```\n\n---\n\n### Example\n\nGiven `src/Button.tsx`:\n\n```tsx\nimport React from 'react';\n\ntype ButtonProps = {\n  label: string;\n  onClick: () => void;\n  disabled?: boolean;\n};\n\nexport function Button({ label, onClick, disabled = false }: ButtonProps) {\n  return (\n    <button onClick={onClick} disabled={disabled}>\n      {label}\n    </button>\n  );\n}\n```\n\nRunning:\n\n```bash\nnpx ts-to-proptypes -s \"src/Button.tsx\" -o \"src/proptypes\"\n```\n\nProduces `src/proptypes/Button.propTypes.ts`:\n\n```ts\nimport PropTypes from 'prop-types';\n\nButton.propTypes = {\n  label: PropTypes.string.isRequired,\n  onClick: PropTypes.func.isRequired,\n  disabled: PropTypes.bool,\n};\n```\n\nAnd with inline mode:\n\n```bash\nnpx ts-to-proptypes -s \"src/Button.tsx\" --inline\n```\nThe original src/Button.tsx is updated to include the propTypes block directly below your component.\n\n## Command Line Options\n\n| Option       | Alias | Description                             | Default           |\n| ------------ | ----- | --------------------------------------- | ----------------- |\n| `--source`   | `-s`  | Glob pattern for source files           | `src/**/*.tsx`    |\n| `--outDir`   | `-o`  | Directory to place generated files      | Current directory |\n| `--inline`   | -     | Append PropTypes into the original file | `false`           |\n| `--prettier` | -     | Format generated files using Prettier   | `false`           |\n\n## How It Works\n\n`ts-to-proptypes` operates in several stages:\n\n1. **Component Detection**: Parses the TypeScript AST to identify React components in your codebase\n2. **Props Extraction**: Extracts props interface or type definitions from the components\n3. **Type Analysis**: Analyzes TypeScript types and maps them to PropTypes equivalents\n4. **Code Generation**: Generates PropTypes declarations with proper typing and requirement flags\n5. **Output**: Writes the PropTypes either to separate files or inline with the components\n\nThe tool uses the powerful `ts-morph` library to analyze TypeScript code and maintain type accuracy.\n\n## Type Mapping\n\nTypeScript types are mapped to PropTypes as follows:\n\n| TypeScript Type            | PropTypes Equivalent |\n| -------------------------- | -------------------- |\n| `string`                   | `PropTypes.string`   |\n| `number`                   | `PropTypes.number`   |\n| `boolean`                  | `PropTypes.bool`     |\n| `any`                      | `PropTypes.any`      |\n| `Array<T>` or `T[]`        | `PropTypes.array`    |\n| `Function` or `() => void` | `PropTypes.func`     |\n| `object` or `{}`           | `PropTypes.object`   |\n\nOptional props (marked with `?`) don't include the `.isRequired` validator.\n\n## Supported TypeScript Types\n\n| TypeScript Type       | PropTypes Output                                            | Notes                  |\n| --------------------- | ----------------------------------------------------------- | ---------------------- |\n| `string`              | `PropTypes.string`                                          |                        |\n| `number`              | `PropTypes.number`                                          |                        |\n| `boolean`             | `PropTypes.bool`                                            |                        |\n| `any`                 | `PropTypes.any`                                             |                        |\n| `unknown`             | `PropTypes.any`                                             |                        |\n| `object`              | `PropTypes.object`                                          | Generic object type    |\n| `Record<K, V>`        | `PropTypes.object`                                          |                        |\n| `Array<T>`            | `PropTypes.array`                                           |                        |\n| `T[]`                 | `PropTypes.array`                                           |                        |\n| `Function`            | `PropTypes.func`                                            |                        |\n| `() => void`          | `PropTypes.func`                                            | Any function signature |\n| `'a' \\| 'b' \\| 'c'`   | `PropTypes.oneOf(['a', 'b', 'c'])`                          | String literal unions  |\n| `1 \\| 2 \\| 3`         | `PropTypes.oneOf([1, 2, 3])`                                | Number literal unions  |\n| `string \\| number`    | `PropTypes.oneOfType([PropTypes.string, PropTypes.number])` | Type unions            |\n| `string \\| undefined` | `PropTypes.string`                                          | Optional types         |\n| `string?`             | `PropTypes.string`                                          | Optional properties    |\n\n## Limitations\n\nWhile `ts-to-proptypes` handles many common cases, there are some limitations:\n\n- Generic type parameters are treated as `any`\n- Intersection types (`A & B`) are simplified to their base type\n- Complex mapped types may not be correctly interpreted\n- Recursive types are not fully supported\n\n## Contributing\n\nContributions are welcome! Here's how to get started:\n\n1. Fork the repository\n2. Clone your fork\n3. Install dependencies with `npm install`\n4. Make your changes\n5. Run tests with `npm test`\n6. Add tests for your changes\n7. Submit a pull request\n\nBefore submitting, please ensure your code:\n\n- Passes all tests\n- Follows the existing code style\n- Includes appropriate documentation\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## Acknowledgements\n\nThis tool builds on the excellent work of:\n\n- The TypeScript team and community\n- React PropTypes\n- ts-morph for TypeScript AST manipulation\n\n## Changelog\n\n### 1.0.0\n\n- Initial release with core functionality\n- Support for function and arrow function components\n- CLI with source, output, inline, and prettier options\n- TypeScript to PropTypes mapping for basic types\n\n### 1.0.X\n\n - Improvements to documentation\n - Implementation of automated publishing\n - Small code cleanup","readmeFilename":"readme.md"}