{"_id":"type-route","_rev":"295-2dc88fa1ab1738fc3fb0ca0499e4bce7","name":"type-route","dist-tags":{"latest":"1.1.0","master":"0.0.0-85a92d5ca8f51f993af8c2ed6a462d7af84cdfcb","9a7855ae14c64268ee43a74bacb68e948f6fd27e":"0.1.21","next":"0.0.0-e4a0c9bdf45223503cf715320009baa5fd2a9797","34/merge":"0.0.0-65c9c671ed0ac2bb0bb2b02f612613d63549e0c2","dependabot/npm_and_yarn/acorn-5.7.4":"0.0.0-7e46cb1fdea9a63f51d101ca0d9aafb0522527f8","35/merge":"0.0.0-b8759b2199d709686561eae1f8f4eb0fe275c900","react":"0.0.0-da9207cb2a91830ad8b869627116d1d1476ebf33","suspense":"0.0.0-ecc99d7a215d697c2db2dd508d2f69f91ea1ff0c","dependabot/npm_and_yarn/lodash-4.17.19":"0.0.0-33606ffd334c0318086e99fed5c64bd726ecc300","dependabot/npm_and_yarn/website/lodash-4.17.19":"0.0.0-65eefce1121db6946ffe2cb4ab9fc22e0e55600b","dependabot/npm_and_yarn/elliptic-6.5.3":"0.0.0-333ff35318bc2cfabe053505ddd442f43289c0dc","dependabot/npm_and_yarn/website/elliptic-6.5.3":"0.0.0-e51e6594f98004ba64c49f6c115afbcc1914543e","dependabot/npm_and_yarn/website/prismjs-1.21.0":"0.0.0-49dfbabdf8abd4d764e0469b91db51818f7f0962","dependabot/npm_and_yarn/website/lodash.merge-4.6.2":"0.0.0-d78a8151f76e06e1eaf236ae729c3ac7dd9ddcb3","dependabot/npm_and_yarn/website/decompress-4.2.1":"0.0.0-c30b42439edf7c07daf8945f0373130b880a79e1","dependabot/npm_and_yarn/dot-github/actions/pr-environment/node-fetch-2.6.1":"0.0.0-43ee0eb577dcf4869fe65f68d0fea7079b308a43","dependabot/npm_and_yarn/dot-github/actions/release-info/node-fetch-2.6.1":"0.0.0-6476e9dd2d9a86e980b93b21cfe78aff0a63dba2","dependabot/npm_and_yarn/dot-github/actions/pr-environment/actions/core-1.2.6":"0.0.0-a27178963d5acf9f38f03ea6bc611761e29482b7","dependabot/npm_and_yarn/dot-github/actions/release-info/actions/core-1.2.6":"0.0.0-68917961128e1c2faa8093c1ce84b6c3d8c9d4ae","dependabot/npm_and_yarn/website/highlight.js-9.18.5":"0.0.0-ba3b233956d98a9e1ae72cbe784b102751d01e46","dependabot/npm_and_yarn/website/dot-prop-4.2.1":"0.0.0-abd9991f57aa8525d06b56f0cee8440aa60e9957","dependabot/npm_and_yarn/website/bl-1.2.3":"0.0.0-95497f1ceff5b9a40009caf9f09afbbcea508ea8","dependabot/npm_and_yarn/website/ini-1.3.7":"0.0.0-43017f0c09b859703f0a54f843f650cde07f1e4c","dependabot/npm_and_yarn/website/prismjs-1.23.0":"0.0.0-73d44b192984afdb788f6c3437dcb2d7dd3f7bbe","react-18":"0.0.0-00bc9a83f886fbc32cf48bd2e91ad439589d9b64","main":"0.0.0-fbd54461938914b148d892ab4ed8c037b9735fc9"},"versions":{"0.1.0":{"name":"type-route","version":"0.1.0","main":"./lib/index","dependencies":{"@types/history":"^4.7.2","@types/querystringify":"^2.0.0","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/react":"16.8.8","@types/react-dom":"16.8.2","cypress":"^3.2.0","jest":"^24.5.0","parcel-bundler":"^1.12.3","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.3.4000"},"scripts":{"start":"parcel ./src/tests/testPage.html","build":"rm -rf ./lib && tsc","test":"jest"},"gitHead":"d75baf68b29470d1edd19d0a479a29f1c0acb637","description":"<br/> <br/> <p align=\"center\">   <a href=\"https://type-route.js.org\">     <img src=\"./artwork/type-route.svg\" width=\"550\" alt=\"type-route\"/>   </a> </p> <br/> <br/>","_id":"type-route@0.1.0","_npmVersion":"6.5.0","_nodeVersion":"10.15.0","_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"dist":{"integrity":"sha512-WH3AHzntr6Cip3k7ET1O3G/i0zOud6nxQTqlHS3VWtDB25dUVjWEiodWJDOIPL1muMkNsCG1VDtALZEJZnRiTw==","shasum":"43727ee4e236cb4d2f4e15eadee53838cc7fe6c8","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.1.0.tgz","fileCount":44,"unpackedSize":86715,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcoiglCRA9TVsSAnZWagAAr6cQAI018M0qCRDfMps4FQF9\nBBQ3mh94cJ+7igQY9E4H/Fgy+T6pO2y6PMIQAEPNrJE5HgTihlaqaGo5Zds2\n9g/DO+H+pk7fjPeoy9Kg0PukG4m1uFLjNowNnq3KaajPkuxUavahAZKUwHSN\nG5T/WG/Pbv9kp6A8WkuFPYNZkELQOqbDgsB8OxHy0iiNYqXdTwTj/bC1QUVc\nQoiZqyz57kC3PYzoiupjZJE28EENnUB7pFIj2e90Sj+B/yYNSsz9nfIP8lKK\nidBDtxE1MNJUeCKVvnYdPyCZ/PzYC0TJ+Py+4sCezY+CijZjF9o4bonNd2NO\nU/irsvrJn4oXwFtXt8N8lBtEVxMSVwHDFmHY4hYflpACH71k/w0RxPpjmE3W\niaIu+fq9+l1zA/y6zYeY5/TeuPTO7z8VTSaauh8SHAUktBV9rNaR31ZykCxd\nl00OH/PY7GstuzYGQ8gNj3OEtyGqsJH9vFC0/4xfC9j4Xc4TbU9bflHfe39o\nB8zNjSg0MQSQOQA5FQXSx00k5vB7S6V4oswwyobW9knrvolftz/8yq5nyouD\n8hpugAdOd5lpK/68RZ1X5s6/fkh9sNiQIZgUiLW2dsiQhvsUsCLAWJ6Sf9M1\n1Cm4FAjVkygrsC1JOnBtXs6bf674C4M0jQSnM7NtearVWByP877E/RQq0yCd\nmUiY\r\n=fo0s\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDP5O0awWLvgUugyb1n7KMWNeDlCU7YePrsXHSi19S00AiEAyeHzEbQOXfwZ/hCvQQrW3ksDTMgCHR5TBzXalkr+djE="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.1.0_1554130980880_0.6154552463458012"},"_hasShrinkwrap":false},"0.1.1":{"name":"type-route","version":"0.1.1","main":"./lib/index","description":"The developer happiness routing solution","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://github.com/type-route/type-route","dependencies":{"@types/history":"^4.7.2","@types/querystringify":"^2.0.0","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/react":"16.8.8","@types/react-dom":"16.8.2","cypress":"^3.2.0","jest":"^24.5.0","parcel-bundler":"^1.12.3","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.3.4000"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/tests/testPage.html","build":"rm -rf ./lib && tsc","test":"jest"},"gitHead":"a2969e48beed288bc278818c639b06e2b2919fd4","_id":"type-route@0.1.1","_npmVersion":"6.5.0","_nodeVersion":"10.15.0","_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"dist":{"integrity":"sha512-dyBPdxk0ty7EQoJGwwgNIFagmc+ocC+PbcbfuuBInVMEtSQRIrxe/QtEJSKVImF9x7JFnqrEyjb1FpeZlY3iaA==","shasum":"4afa041fdbdabc7b2d1a8b2fa41390be068bd1bd","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.1.1.tgz","fileCount":44,"unpackedSize":87307,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcoiqVCRA9TVsSAnZWagAAjakP+wYGqs/cL2DecteHgcVZ\nCtVqYQf/wDKyyFwjeSHgGaLPkp/BpoUp1QLNNcWPLbhnYsD9VIYvglHK2fZy\niXSOptRoH60B0RnLVSTye7izyadms/0eywGGjkK9gVi9o2oqnIROhokx/nqV\nErvyLKKNa4u8fr9mdSkZM//fkLqOs1uIYyiRgSCyOJKtCs+5RMhpJzga+E0G\nscPawUjex4lCDRskib44LEe+6YSkOotesypuFk5MxCzY555qMWRBb/VsMGkG\nJ+bgVeueKP7uNPl5FTS+QJw55pVQ1cv7wZso3nxR8JLQaRamtgPy6ebvtIwB\nvnsFhy8m2c/0VgWYuYr4XfDsgHQ1Cn6jYTDzYPe8g/WHyIsCG40Kaap8Z6bT\n6EBZyPn/XxzsaeHqCwk1WewDhJCHo/rictdLmLaJMRoKOHb1RI8+u0iWyQ9X\ngtxIh+L7PykBycDPenJsxnSgAdnUK9K1SNOtlFoDU4gNuMSWW8ME14op5v+0\nKINS2AkiH/a63dC7/EF9guLDeKllzDLKAIFflbGoXcHv4GlRhXse0pkp9jIP\nPtCax82qJw/ukITzPLJVVRHKUSLy6vFyztiLb32wr+acnaLBSOaRYi2zHzyF\nkfxFWs/HWLJudUEpVesqJBKh4scwkdOXhw/gmF3gygykQyLKbHxX8/ClCTlq\nIqjc\r\n=PkSD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDUq8El8mYwv9h19+g7In3b9eQJ0gli5F5wRvi/XHSb8AIgFBX9tMmgo8mfhaDWarDdxHl2T4wVRLTwsHWXnudWWFc="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.1.1_1554131605293_0.025130885758819943"},"_hasShrinkwrap":false},"0.1.2":{"name":"type-route","version":"0.1.2","main":"./lib/index","description":"Flexible Routing + Seamless DX = 🚀","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://github.com/type-route/type-route","dependencies":{"@types/history":"^4.7.2","@types/querystringify":"^2.0.0","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/react":"16.8.8","@types/react-dom":"16.8.2","cypress":"^3.2.0","jest":"^24.5.0","parcel-bundler":"^1.12.3","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.3.4000"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/tests/testPage.html","build":"rm -rf ./lib && tsc","test":"jest"},"gitHead":"9df5db5da65076ec086233fb18415e96d279c4bf","_id":"type-route@0.1.2","_npmVersion":"6.5.0","_nodeVersion":"10.15.0","_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"dist":{"integrity":"sha512-wjH0/FU+FUEoehaHIYkRLMekn5jAPTSRcwKhAvgPU5i+/ekECHL7EkPxAiN96pxwEpN2EqBfrIkHgs9M/larxA==","shasum":"3cb45b895d6e3d6366b9123eed8460e27cf0a2a9","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.1.2.tgz","fileCount":44,"unpackedSize":87304,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcoi91CRA9TVsSAnZWagAABGYP/0Aqag9bTIi7VcKDamUt\nIW1+/TKNcbKRw6+br1WGC2Ao2skYmAjurtdwc0/C7C6mVF3KFSDtYjYQuKa4\nIlaMjukulleVjUmYy6od2Aw4yv0bGXxcz/t7a55AbAu3dCcQBV2AP1SEobLC\nfMHRawcwIdJS+G0dMacfTxZ4yUS6MYRzNclWAzQ3gK/LCLQOL4K0ms7gr/h0\nPQ2zhrkXSwWcEtKoVtAuiLfY2Wp2CEn0XwpvvLqhriWI+XeLyvHsOc6yZYUH\nVAeDud7NzLorvxE1nerlACj2CL0kIoYmPkm3SGEUcPMhrbT4PIDY0BtvH9yl\nhknUemaUsc7LhjMGSk3BaXEVw+YZs039mT3Sli5D9BM3x1KGTeoBBXHdbegR\nlLriO3KNHJbmL7Dun/jodLG8MO+TFaB09cv6g/csfxgmsnlsqYi9vBwlrrHd\n9hmP2Rw+9KCOtEkFzu/nlU3LS4Fi3awRQyflOzPh8lHTHE27ruTEUGBYI1jq\na/lp9BZcF1jSJf5H7DleoEribMoaOm/sfyEoVadAL/44pvJbvc3qGEsEpHYt\nSYPgsXm/bhdk37mh62eSFcsa9OR3eSgds3W6e0BzTAkPGOJFP4dVPdNL6rxl\n3nSIiU/2NGY1eJIzZBMCpXOqUHSIKsrSUkU5Y5iyIxx47juSlOkEsRLxsl4i\n+0dH\r\n=6Fux\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBY4+6YT58GtqHPgbL484xicfpRF3q9mtv7TmbUKVHqgAiEA7xnz+nIg9k1rgjmQep28pjFmB9fd7jx7czXxNfya2VI="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.1.2_1554132852758_0.937508245473418"},"_hasShrinkwrap":false},"0.1.3":{"name":"type-route","version":"0.1.3","main":"./lib/index","description":"Flexible Routing + Seamless DX = 🚀","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://github.com/type-route/type-route","dependencies":{"@types/history":"^4.7.2","@types/querystringify":"^2.0.0","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/react":"16.8.8","@types/react-dom":"16.8.2","cypress":"^3.2.0","jest":"^24.5.0","parcel-bundler":"^1.12.3","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.3.4000"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/tests/testPage.html","build":"rm -rf ./lib && tsc","test":"jest"},"gitHead":"7610538b1a4abc4d8a91d76f3101a17beb25b29f","_id":"type-route@0.1.3","_npmVersion":"6.5.0","_nodeVersion":"10.15.0","_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"dist":{"integrity":"sha512-TeBBSCtQPOfnBe/QsShUTCXt5c1+nusFe3jidtvm+n8h0Rl5mI2e+32MLDVJ2JuTzWP1irahG3Qy6BPWvAHsHQ==","shasum":"d90debb112a994af6358e2064710b73151876d4d","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.1.3.tgz","fileCount":45,"unpackedSize":89174,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJconO8CRA9TVsSAnZWagAA/jAP/2ixjxIrcCQFgH6a5cwS\njCh/n9bD/Vadb+42aufyazDO/DQkX/Ev8CiujXsD9zBRMzzL2eIC+td7vx+J\nfr1xF2Zly8ACBUmwKJTnW94+d4xq8ZO3GQ/PTv1SH3t8fSnPL/tODF5s+shT\nNvWeYT548A8kLtSEr+8Y5G/GQQNNjMKp70ZnevFs6ZBK6WpYP+skBuN2f9Mj\nn9ZEGrQNlVTWGICR6Uu5Z4YAyrwVGfk2U6RUWPQZ+2kcfwgwNYUJHDr7jMft\nU08JxxppLFYTy3A5e4K7ZmYFwoUfZv1CxX8xPNqRU+tpkb6kWXZx813mSK+t\nk9AxGb172MSAw4Al7ADMeNotYsR1Rbfe+F9wJQnxqZttOF614lzkt7ggonQO\nBGa0PEb4r+HluR9L+8G5w98tlVlo5nE9O9z0ojZ+Gx5ixolKwayX97QldyE0\n2a5o5Jh3z1iZA+4TRlRjdWsOigrrEcqImcnWLP1J+jx5aCIZi/voiMCBAVy/\nQA0EBTOPE0OQfTuWvUn1gYtSqxYC0ja/A/EodTdejKK01LiY//1moepROZ2D\nSJ8AfV0323ZMguxOSF58mapcGrXE7Ay+jwtQy01/OgjfVGla/6mgS73tbUwP\nvzafpMZXc1OOkslKwGRld+npWS3PxETl4DJ2RLMBkPe5exnTMzNlRoHPeKrn\n4g7q\r\n=TCLu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAs/Bh3TuycZvHee6uUAIwBGaX+5Fn9IXNVTC8P5zLmaAiEAti7U+xcAA5ndsuQ4mrua5qdvwjiz0xI3/ktLhBHzlCo="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.1.3_1554150331969_0.3096891006244453"},"_hasShrinkwrap":false},"0.1.4":{"name":"type-route","version":"0.1.4","main":"./lib/index","description":"Flexible Routing + Seamless DX = 🚀","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://github.com/type-route/type-route","dependencies":{"@types/history":"^4.7.2","@types/querystringify":"^2.0.0","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/react":"16.8.8","@types/react-dom":"16.8.2","cypress":"^3.2.0","jest":"^24.5.0","parcel-bundler":"^1.12.3","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.3.4000"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/tests/testPage.html","build":"rm -rf ./lib && tsc","test":"jest"},"gitHead":"7e490099ff2db709e964a04ac762e663713f7808","_id":"type-route@0.1.4","_npmVersion":"6.5.0","_nodeVersion":"10.15.0","_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"dist":{"integrity":"sha512-EI8ogzoDS3OSr0i6xN+Whz694/pCqRDPoHNBnk3Ku2xfw4uuO30p8Prp62x08Ab/sZNlaxYX6N7+H+84Xvsr7A==","shasum":"39bd96f6ac9f0ac5b89a5908c3c959d4c16a6bfa","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.1.4.tgz","fileCount":31,"unpackedSize":58653,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJconXACRA9TVsSAnZWagAAE+UP/jzjY+5DTSRpe+mrM50X\nHXyzcn1HU1w7B7hxdXxRlx7QoqSd5mZSaz/CpPi5Ph0jUmGA59EX+lJh4Gvk\npNcUhNHaXxl951XFga1jF2YzGa9cJC/LwOwkjzxl+ygV1e4bnbLYIDhKi+KI\nCK0iAfSN6NnTnZeocg07Mh1uhxbKKon4Tel3JIfEhkGOowzoiDZOQl+wKY30\nvBHFyW8bsJdOKmqqXYO45f+4nXy8T8dyrFiIeWGSP+xqAdfo+jdb6p/jnlFO\nWR20C40bSDlED3O9kf9wxtL3rf1czc4wlgBVa7+fbZvybiDrs/x52b1npk4k\nzx/y5nD8crNZ1pByCdklM0JFwuFOFFwEVmwR00rx/x6C7AmgCRYnh6LvVAKE\nacvE5hlvaAfgLxEy65XW1sXTMn4M8ILIMwjcgMZzQsUg42CDg8qRrQX2LsNS\n6fmtxuClmqFeSgeLQsvcIE4GrKum//rLYtneTG3TvpOM3G7CYfv+fppkCiFb\nScaJO//NGmI/E5oJZDSxwSyYvbCplR6rAl6xLGqVqQkMm79Q/30hsUehDDC7\nh5Ul8ls5BWne5hJllvFEFU+B1yTgUrJ89o6aisxCTIzIsMjYBZvo6fcdDGpe\nK8iQg0jxA/G/nNrENCCx0yytm0/ThbzMWbz+Q8QOvgoipExN55lgguLrV0zW\nZ2wu\r\n=gHfb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDwa4Cr53EFyJgRE/imu4oIPlMrvlHxBzqrKoate2cVgAiBMfb1A47Yw3G2keTFaZPJSu62n/ejyNpOvXja5EsaScQ=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.1.4_1554150847891_0.919604762894296"},"_hasShrinkwrap":false},"0.1.5":{"name":"type-route","version":"0.1.5","main":"./lib/index","description":"Flexible Routing + Seamless DX = 🚀","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://github.com/type-route/type-route","dependencies":{"@types/history":"^4.7.2","@types/querystringify":"^2.0.0","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/react":"16.8.8","@types/react-dom":"16.8.2","cypress":"^3.2.0","jest":"^24.5.0","parcel-bundler":"^1.12.3","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.3.4000"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/tests/testPage.html","build":"rm -rf ./lib && tsc","test":"jest"},"gitHead":"2a8cf49b1d416dd194eb9e919d20f1aecf1f96ac","_id":"type-route@0.1.5","_nodeVersion":"9.5.0","_npmVersion":"6.8.0","dist":{"integrity":"sha512-bBHMMDz35CoH5auwMeZYmY+E4J6NYFC6kVYDFRxGHvYSN/ttF0zFAXwT3XiNsU9AJlSPbpC16MJWk2JkE3uFKQ==","shasum":"ffdd4226876f2028ec0c16c8465836ef23bccfe8","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.1.5.tgz","fileCount":31,"unpackedSize":68881,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcpWy0CRA9TVsSAnZWagAASQ8P/2rOV0GY4UC6Eeytr/4y\nzuCq20FdXijiaIjfLf94dFacY+p+01ysDfM9TI6OZ9OvbPWZcIec4UcFMPMd\n/DC04RM2zEyxrXaw/wraq3Ek0vZwgSIIjbiyXM99XzfvSDho7TlEVud//Xfj\nRTgB/i9krvKBT7w0WmVffsWdwPy2YUrvC+kLgggaYYjRhkSLfb29nO1ldDRr\nOR0T22fMTDOdaWZxfKH2NEKVJiDzuVAnGuk4tHvcF61yGkn2iBU0snFDjqur\no1jCZLTKt3JTjic11d+gYmW2rVN8uBonfdeL8hYuOkoDQkbrDqMPMIn+LJMh\nt/WP8JUUs5X7PXS9iKcucJ8bmbMZ5TFYlB7BjFUEmJ9CVv9U/hmeuetpEudG\nPK1C7Kx9SLtMarcnEq0x88dY5TiZVdupVxtprDxLRE2QDsNIL7ODovwxWcqd\nqfn7z6NwT4LTItG8uKW37ZYYnnDRn/4sJOvXfF1VJeeWaxclil0o3woxnRQr\nb9TbEpd6CdQpJYqHXrzGNVL0c0/kjZ8rq1P2zdlYYDdNZanzHd75nGRZv8HH\nxhflplUPN/IEYUU0yBTsINgGXG09V8s1B/YmVYlG6WXXl8Grda0tZs7xLpwL\nwsdHHGm2QA80rOck46rBD1aBfDOXN5YP9/BWZjC/9UROhOrA7NShdabt/I7d\nhyZv\r\n=9tfZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC42UNF81DB0io8hFIl0Fnsie78TBAyCLfEK6BH2smojwIgZ3PQtfJyR8GkIfy3XM8S+yXZ7ZBmMuP7ZUqz5ibhm/U="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.1.5_1554345139995_0.9612577133594735"},"_hasShrinkwrap":false},"0.1.6":{"name":"type-route","version":"0.1.6","main":"./lib/index","description":"Flexible Routing + Seamless DX = 🚀","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://github.com/type-route/type-route","dependencies":{"@types/history":"^4.7.2","@types/querystringify":"^2.0.0","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/react":"16.8.8","@types/react-dom":"16.8.2","cypress":"^3.2.0","jest":"^24.5.0","parcel-bundler":"^1.12.3","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.3.4000"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/tests/testPage.html","build":"rm -rf ./lib && tsc","test":"jest"},"gitHead":"06c53dca8bb39a01585d4c80c1e240270e3816fe","_id":"type-route@0.1.6","_nodeVersion":"9.5.0","_npmVersion":"6.8.0","dist":{"integrity":"sha512-4WLb8Ty+rOvjYdBEm6P0Zr3w8S+Jo5Sw0400jKZP8BfH1svvyra79/Se8c3fVbQMA6TKWKnDIq/kP8g7Lauj4A==","shasum":"a66428a1f13d95472dcec95d1b3af02cc092a122","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.1.6.tgz","fileCount":31,"unpackedSize":69056,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcphcvCRA9TVsSAnZWagAANLQP/0ibwD9bwjfAH+kTKsKU\nIVaGTDBQA2It5CKSWcMiSj//Jd3iUZciDDF9zmceI4rSZvu9y+mzqsIPPzUl\n4Xiu20NPnmiJo7cOjJpIWefVV6hN3QrpPAFVlDPkJ0j8msBRoe5h3IQ3oDWn\nVgNKHj4khl2pDreGvorSm3dQt3VWsZRHIxk1lllW4U92NENi5mE7ACt+itfw\nedoFVzGFhQYcVlZSAm+v2CSOe/YDHPmLySQLLwqCHMbW3rjhbdNd/5Oix49h\nLLmzhfvEdEGIVtcuc0m/C5rM9uCpDi87/x00Ogz3zyngsXvX9uWCJLh6tHCL\nM0pe97+x7B/8j1YTSw9zwiPokY8QCBigbuxrI7fIdvb/MSNA74cyDlrbrlnz\n3/htHoKf+h6O/3DfVdLsMLFM3PVncnQYovObto7nVOQsuaN1+nhwdS22QBEe\nxjetEFF1+uDkU3Q4hFRaSJ9HPLXnErBgFhykKAhKNRjeecyg3611YpQHylTg\naiavN4ZUWsRei5D1QG8RZ92XoW4Iymd1W0QWXoNgK+qWeVRezKkNLc2t/kPG\nObfs1Ut1p6rhBMGerXbYgW4JOVZha94Kp4TNkYNP0zF7WNKQEtX5cMiG24wv\niTpdg5cfA1qG3zqMv5NIqoEbL04+GTvIK8+3t5P6JcZpaFVlRtvqzn48TJxe\ncY8B\r\n=21VY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDoPS6OXhgrfwcA2hTVtt1mR+JUF67BU6/+C4JxyP8xyAiAeVVEJVeq4Iu/9bcrn3atH9R2dAtJTbLsvilwbDYBDvA=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.1.6_1554388782605_0.10204229946942855"},"_hasShrinkwrap":false},"0.1.7":{"name":"type-route","version":"0.1.7","main":"./lib/index","description":"Flexible Routing + Seamless DX = 🚀","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://github.com/type-route/type-route","dependencies":{"@types/history":"^4.7.2","@types/querystringify":"^2.0.0","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/react":"16.8.8","@types/react-dom":"16.8.2","cypress":"^3.2.0","jest":"^24.5.0","parcel-bundler":"^1.12.3","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.3.4000"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/tests/testPage.html","build":"rm -rf ./lib && tsc","test":"jest"},"gitHead":"e79eb5874d2d098efe8ada6e97deeca822c62b47","_id":"type-route@0.1.7","_nodeVersion":"9.5.0","_npmVersion":"6.8.0","dist":{"integrity":"sha512-jmrDNg/V29Hd4/Tl2DKNa1zyAvLBhD8JnhTlKMBD9e5A4of+bcLw+58hdW4q9A0ZEtRkBNYTeNhiB0rScE9RxQ==","shasum":"f6d6b4c9cad8396a48f5ac02cd249bacd5fc2e98","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.1.7.tgz","fileCount":31,"unpackedSize":69466,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcpiezCRA9TVsSAnZWagAASnIP/3woBFKL4ZnM00MGTupB\nLslpcAYUpS95ZY2hnR4Dz9beInDonwAwbnGRtDYtdkq7uQBC+f2SI/kL/2x/\nkZG5tnpnRLoglaJzk72niiJgRGmykQ36lPZCfwcWX6x/cwGLsrYlSffnwqRa\nPq9T7+HaxzylHT2/11oxMQOa55IfJ/4WJMd9+VsVcZS3adsl5o9iQxTj8dLo\n78mv+EhaoPCm+9s29ESfLxXG7rhN65fSjZLVg4XKT7BQVdm0Jz9RgUFm7bKi\nDosuQNZO6poIcC7Fl3ho3eEaWe05N/YmsVlXL7O0pmdXbb788DHhy9DHlHtj\n+Ep4BFnkn96y41EwnMb4oeWB/JhqWEgQV65OeMDaYTxCmOwIcld2QRcVvYwd\nJoqn8NVI6pxsCaNDJE8au7tThPX0LeXF2pVoxWZU2s3v0yuLi4zRSR+ozcgm\nTbM9N9Hc/oV/VFA9rGfT+LKEFg3y/fVNrqCKZqS/bn5vHg0DibcekxD7cTN/\nTJaRPKikC4UmjnhQfrvPoyQegl7VtYAxz9l+9gchbQRJ5BXuS4TRrB50AYzd\ngBMCc6Wnu21XoqmdscppZTlbsWniPl0TbSoGWJjYvqiKaSEdiRJvvsjATCp8\nLuSydAzHHrZn82rlqwxyr9oVMKnOlMGHAhokaNxK5c/XJRyHPXZiCc2kRoZ6\nC1DJ\r\n=ytuS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCaGCQ7MxDzFvmF2mIJQbHSS/rYF9dMtvJ40h8l8PoaPQIhAJFxoMYgXySDlrUdf+ieeRdLr3lOn8bsdNixqYC5HvzG"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.1.7_1554393010303_0.2768644118198462"},"_hasShrinkwrap":false},"0.1.8":{"name":"type-route","version":"0.1.8","main":"./lib/index","description":"Flexible Routing + Seamless DX = 🚀","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://github.com/type-route/type-route","dependencies":{"@types/history":"^4.7.2","@types/querystringify":"^2.0.0","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/react":"16.8.8","@types/react-dom":"16.8.2","cypress":"^3.2.0","jest":"^24.5.0","parcel-bundler":"^1.12.3","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.3.4000"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/tests/testPage.html","build":"rm -rf ./lib && tsc","test":"jest"},"gitHead":"682fc3b37bd8f7b4070bd84d5d9ffbb0612ce6c2","_id":"type-route@0.1.8","_nodeVersion":"9.5.0","_npmVersion":"6.8.0","dist":{"integrity":"sha512-5qE5ljfggNKkqfdpIQ6ZUsqwkQ3CdGjF+TL907/7KYl7UzRe2238sigDdnM8D05XHg0xvJy7U6RCzk04Dquyhg==","shasum":"086560fa5267990e157ec1e70282c977fd22307e","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.1.8.tgz","fileCount":31,"unpackedSize":70042,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcpioqCRA9TVsSAnZWagAAhxcP/iCUXSsHexqALZgUvKSv\nJGE2DhqhEk+MXHEarEPaf+/eZgwu5+VPmGuuBqOipAIEj6Nj+c4WhbaNVshU\nUQ1G2GfFwlfkPqCHEvYEg0hHyFdyllP36sZ2OqC52cuPi/eaQ5SdFrh2tRtv\nxHXPrAbWv6wb8ckZs6vFVKECXfvUYJMJ5n91CxoOr+XlcS5eH9GyLoO+cji2\nBqQxOSs/0EGYVvSBbWu/yYsHeE4ihkc6h+2rYCAMCANS7My5YV5nookB1TKe\nYxnCN4UoA+zivVfcatJGjp1dbMxxlTuOiujq86ArG6Zq5HkNr7CgaKyeZs7W\nYiCsg5BRpYqHClL2MNHw9zHRwoR5H+4hBwJnns3L+gHoj/CWOW7giiZzVwxM\n+T83ZeUz6Ii3gYbsEpR9/2xzsHY2STAnlp0HPpejkcvMYjLeSNVeVRFkY5Z8\nFadUTRdmFj/X4OxFpIFQ9ga8b3sDb2CxoPgpWdC421WnV2k5rW4IvoYmyPuh\nLy2Mlx9avwL+Rw5mC5G0uedZr02Yx+IogFcPSy8spi7Uq/pQ9OS89YXqEHg1\nnWCY4TERc7tcYlGd17TrNOiFavMO8+5lpOWtJoFzvDKCeMtAHItgAuxt1wH5\nbGXNvOC1nHKTSbK2KR/ULTHaW2P0C00olE2piUHLloTygMDSPDkHhpH7NU6Z\n+DH3\r\n=/3rA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAEBYAJtBV6A2glMdfDcZmrgd/AFuyGA21qtkVkxrj+cAiEArFapMt1rcKg/n+u6L0142nfo0zTEIE8GHNQZsVS7ACc="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.1.8_1554393641622_0.263714884043472"},"_hasShrinkwrap":false},"0.1.9":{"name":"type-route","version":"0.1.9","main":"./lib/index","description":"Flexible Routing + Seamless DX = 🚀","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://github.com/type-route/type-route","dependencies":{"@types/history":"^4.7.2","@types/querystringify":"^2.0.0","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/react":"16.8.8","@types/react-dom":"16.8.2","cypress":"^3.2.0","jest":"^24.5.0","parcel-bundler":"^1.12.3","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.3.4000"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/tests/testPage.html","build":"rm -rf ./lib && tsc","test":"jest"},"gitHead":"602e627d4c8f78e43285de4d7d40ed9e5be4e850","_id":"type-route@0.1.9","_nodeVersion":"9.5.0","_npmVersion":"6.8.0","dist":{"integrity":"sha512-qydk30BPcts20dqjvbu+6zwAQWeez4OV86ltWQMfhwYqoArcr/FMs+pe6+eZ8kXyCALcruVgTUfCAA2I7O1vKw==","shasum":"14556ad237ec8fc57a04ba45f8fe341b45d94edb","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.1.9.tgz","fileCount":31,"unpackedSize":70039,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcqJBXCRA9TVsSAnZWagAAOgIP/RHkeZ8eHnCuXIferBa8\n77Fm3evf/K1StHmZB2mLqkuwn266IkBzU9WV5za6dMR4iVi599N+AUga7M+A\nkFJsgr+WrdsfOpDFtbW4sQOp73sCeBGD3Ycn5R0q/NTGI5Kqq/rU9xdqF45B\nFLTRB5WcS4qBgVlzB9wLRQwtRBNXWTWml683l2wQ3DbOM2AmCH4B7XSIQbHB\n8mn4IG4c90ttpouAEJuxpugjjozwB3EXQyLvHLbt88OYFMQmQnFGyIF5GwCR\nTVl2SzZArBKQFX+pZt6pk4TEi7Nf8RDtb7uo4gBR1/rVL+tBDz9ODdu8Isq/\nESuUwQyKJBWl7+UXoVLC2ByiZ23kPrPbFMCuvLWZ7K10qcNiwFoHNj9wmbWf\nABYCqQ8WLQxNp24/+j9xiOOnbbLd9iVUUF8njCcWVxDpKP9shiW0Dc21yvYZ\nNGiUQ8NsfPVNpk9veFIKYLk3KuX9J8fBs9udnWhWVLDRUufYAShmMkNLOQmG\nhvkQcDeGGqzOjqIJd4zXcItIOSYcprEvksoLCWyjgonIIHbrhn4MP5KrHYUv\npBFvuyoFChfVDuZD0LkPaL+8DX8jWf6X0I2P83F7zo1h11U+xiyMLcIO5EuT\n5pG543mOoE86JWEyvSaUk3o9yOsXR7967s7k+gIFiVwqvU+vpgCoChzRA/wA\nqlzc\r\n=ELkN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID9VOraO5H0QeuEJdZnsI0f5avFCDtM7k43M5zNI+tASAiEAii+7cKLGD4ZIyBmUKyTN6LmR/KBJsHgEp9A7tEWz5no="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.1.9_1554550867058_0.29386083001707397"},"_hasShrinkwrap":false},"0.1.10":{"name":"type-route","version":"0.1.10","main":"./lib/index","description":"Flexible Routing + Seamless DX = 🚀","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://github.com/type-route/type-route","dependencies":{"@types/history":"^4.7.2","@types/querystringify":"^2.0.0","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/react":"16.8.8","@types/react-dom":"16.8.2","cypress":"^3.2.0","jest":"^24.5.0","parcel-bundler":"^1.12.3","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.3.4000"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/tests/testPage.html","build":"rm -rf ./lib && tsc","test":"jest"},"gitHead":"eafa43cfc6fe70de0ca01197f6acbee5494fbcce","_id":"type-route@0.1.10","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-zX0XT20hVzAmseli49vXJ0fbv2taR4/0NBPdQOZYbnvpO11N/2RGT5KWH+72s6E3gTv+qn/qTQLr0MZZ87Yqeg==","shasum":"4ef65f08dfbc040df82faa4a818f608d2eca3880","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.1.10.tgz","fileCount":31,"unpackedSize":70125,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcrPpICRA9TVsSAnZWagAAxLQQAJmqvY2DIbyJgePk4DOO\n5Ewx7qtV5YRSuHh0t4a+lKyqUCwCpLNhoiY9fkSJNaHtlsGm7VnPJB1BuMlc\nWyePHdyqqSMRaC4J7os2o6iT2LaXeaHPUe746iLAVHI9IjJaHm8oN62LUEHd\n0VFrhM6wgWGbQsb6ya1Wyo8m0dTY0fpRaTUeMRFLojUzp/Rd4QmHjMmXgg8f\n7hLA3mM3QtTM2XB6xsP099hB2Qjh7E/7k56q0tkz3+zoTleBAz953KTOsnj5\nKyfyW3vdsq3YUlRrTgnvJFNebXnc6qvgx5z3CjycTHqtRcDBIBBh8FGIyi2j\neMr20ktO/gqEBaesARhAHIgB8X3eADX+QggLrM3FFn88Po2YaXGrDtGKnftZ\nH1W8Q62t07W9/bvzU5JODJLYuZrb87jIPbP5bsb7SOQt8nbELzOt+nWZxnEw\nEo9gutEj8JP/MRJmvHsKCUb5TkHjTb81Z9CGHZrReXsTC7gpxvFQB/n2ZgGM\nGSsGNfAvEwESX6K5ZJHThrADh7+Rlgtk2EV4jO//+2Ww5/ER/6TsNnU83Vkk\nO+63ctJQioUTMrHO+ueaq6IjtWLxrZ54eIj8Zi2v0ehAIRYLcJZ3P9gemT81\nsu3PecfefGj+ra4eSjxco3gx1TIZ0FzDbc++wc5VpWgJBFfA6GVzr8XH9ccG\npm4i\r\n=xbtw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEL0pmJzVJ3+Lms48PVQfr4vd9e+iXcevyTl2XaL3jkPAiAGjlwnMq93BoKnSf6WDjD5j2RQ0gJko5Ft4X7PBjlKLQ=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.1.10_1554840135307_0.9152716547460111"},"_hasShrinkwrap":false},"0.1.11":{"name":"type-route","version":"0.1.11","main":"./lib/index","description":"Flexible Routing + Seamless DX = 🚀","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://github.com/type-route/type-route","dependencies":{"@types/history":"^4.7.2","@types/querystringify":"^2.0.0","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/react":"16.8.8","@types/react-dom":"16.8.2","cypress":"^3.2.0","jest":"^24.5.0","parcel-bundler":"^1.12.3","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.3.4000"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/tests/testPage.html","build":"rm -rf ./lib && tsc","test":"jest"},"gitHead":"0d4c160e37dfaaa40be199eb68e726708ce65e15","_id":"type-route@0.1.11","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-IKEng/AJumSAyCVhOY1G7HbsZxugnGJREay3qJ+HQ21NgxtjAmXTtHUBDHUTFqIDdWDDQ6YwJndz8s9zVU676A==","shasum":"310ef3b0292353966c640a003237d140231a517d","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.1.11.tgz","fileCount":33,"unpackedSize":85663,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcsIf9CRA9TVsSAnZWagAAzu0P/j1gzXTuATztG23bBvkV\ndIFyYKhbUSbxKzjrkUMzKQ45sk8aDAZRKo2fELHrMlgGWdajUfNqga3t+ovC\nlvtQngWhda+AhhRDj8GvSOfcioayP9C/8gc3hPRMYmGbSbbg8BIoNXGUFCj7\nbSZGDMAc5krQUW7yyaUfANDhGY5hbQOS3jrfCWHgkOcG6UMXHP0QH+6AqzzR\nHa6gwvYlIUeQLH7l765M038javNd+6E1pCAFPYRxJV+Lz8CuytgmfFGlHU+S\nsphTMnegS+1To71UAi5PGih42Z8A9Ecqy3hlQFIy3BNuukIaQxZhCdXWpSY/\nM/rDejqc70VRzlj779H0eVTsU5QZPpNi2tNtJvRJ/kw8GJ/DBtMvd/pNbJ2i\nn0xytADLZtvMo7QahG2CWdYLxMCVaVW0U7tusJkilgdYDd9d0DaB8iWK5OFw\nN/ZlgKulhcehrY+t3vP+xgLxX+y0CruS8Q9o1//F5I+Pzp1La2bRo+zm6MTd\nczLUCcZa6dwedTm10WkLxBegswia9mkUmgUv7+wZ8C91oN8AqsBa8+DpxT82\nsxfJkjKbJ3JzY7R1yuICC/AE83oD9oR1ehxsxxpsu0CLHwWOXZrO+JQ1RJBr\nriHZk6grYswQMml9hnK0JendilSf8jofKvbjcCnTX+0HAvQP79dj+ruDZcqb\n349A\r\n=1WGy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDkO41vvYII+YzAJzMbDQBVksUpVtGTaKh0GNhDorBqhwIgBEhuLNMN0Q7Bk9vaiTpj1wVi8n2SjGhXMbgpwL02hXc="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.1.11_1555073020813_0.04486767805164926"},"_hasShrinkwrap":false},"0.1.12":{"name":"type-route","version":"0.1.12","main":"./lib/index","description":"Flexible Routing + Seamless DX = 🚀","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://github.com/type-route/type-route","dependencies":{"@types/history":"^4.7.2","@types/querystringify":"^2.0.0","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/react":"16.8.8","@types/react-dom":"16.8.2","cypress":"^3.2.0","jest":"^24.5.0","parcel-bundler":"^1.12.3","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.3.4000"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/tests/testPage.html","build":"rm -rf ./lib && tsc","test":"jest"},"gitHead":"301ef52ccad9afe3ec385367117e8af874a40221","_id":"type-route@0.1.12","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-+N145Tce1WvCiFfRU/XWcGcm5Kop5iZ9JPKx6hV4ehT33/LFbvhDue6a7bAyQFhkdidaFP/gTiM4Vi2D+htwGw==","shasum":"e550872d060eda9dd1e147925256851c39fce991","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.1.12.tgz","fileCount":33,"unpackedSize":85888,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcsSWqCRA9TVsSAnZWagAAbokP/16nwBxM6VZeSpRcW5x8\noveeJsCgwolRPTemPNDwT/FWA3yAWuflgFvp2uSe/+qUBI7dFtqB8StAqyWL\n0elN7/ANRBI49rpqLk+fLxDmmYX6Sss8Xi0YbizysQdyj/Wyj+PeWp+H7NCD\neVEwMhLK5o5t0DTm1JxG57yrAJtks5A+qbjGDfkcOH018NB2sw9PrPG3eRBy\n9PiTUxvn59PKpKBARE7ESMq3HYLdaKsUcbW67P8vzcifK2Ewatky4WgcleNj\nKCJ5duVxfS2iC92OSwTM91rHCLEPQchfj6ugIoyaACtSPRHYKMpJWqebjvhV\n+dTOJrpJaKezWwj5Nps3sexUwGSWtwxUh/Szh/G3GC5IsFTPc+axMAkge8FJ\nvEEvaGBCAsTjBi+c6vWJhMqcW8dbbmOKB9QsI2rUxeJXZYNRwIW17OMaB7YR\n7EBxKPQ/F774yQgSprGfOjWqIHY4OUQzj9r4PBAFXcLOXu1Li93wqMHCU8Tq\nlhfNWrBE6LfyAG7VwGdOuQAvCrbyNP6NmpBA5f8e/PYyptrHqVYhu18IQpLO\nH0dLt2UFkhuRC2weQohKZY+b5crSyKkFRE7ENyugPqW2H9xMd7zRj3aqUB/i\npNE911E4nX4I7iwAsQHHOaiYk5NdvxH3MHndkN6Jv0huhBz3FK2IsvB2Spge\nHKou\r\n=fMtZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB5A5JYQHJ8oZAu9mzdKJttyfTfhZNA+6zlaYQNeOYHiAiB4vO9MDiQiH3S3aJYE07ve5qN1NJBCGq0gD9pH37/neQ=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.1.12_1555113384860_0.21507964890512699"},"_hasShrinkwrap":false},"0.1.13":{"name":"type-route","version":"0.1.13","main":"./lib/index","description":"Flexible Routing + Seamless DX = 🚀","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://github.com/type-route/type-route","dependencies":{"@types/history":"^4.7.2","@types/querystringify":"^2.0.0","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/react":"16.8.8","@types/react-dom":"16.8.2","cypress":"^3.2.0","jest":"^24.5.0","parcel-bundler":"^1.12.3","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.3.4000"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/tests/testPage.html","build":"rm -rf ./lib && tsc","test":"jest"},"gitHead":"301ef52ccad9afe3ec385367117e8af874a40221","_id":"type-route@0.1.13","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-ErsaOKOpiqQMNSsKo3wxwZf8JKITsll36NUJcmWF6pYHYwylWnNW/2CBk2XiMZAJJ9jr6GPXZkQLmvDLqE9ECw==","shasum":"c0ee2c17932a7701cd1188f3edebc6cc9f876c47","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.1.13.tgz","fileCount":33,"unpackedSize":85833,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcsSjjCRA9TVsSAnZWagAAlu0P/j02rcZo4qtDtJR/S67J\nQ1A/BiozEJq0t8D6yFZnU8d+sx2jqXzdRMzvq21wVmTVWFpjM+zBjTFaiMe8\nnAr6EOXhRjcjs+4QK322F6sIA53oC9PuFzV4eVVQ1KOIUe8rOnBvMg53273l\nDa1Zec2xxY40bvujPUCbxY7qzXtrhJc5kbRUweHM6ZJ0G0HAg0T7kJKHtxlK\nEUMVtMC6pg48kMFqytj9t9TuP4622/QQqQAumGR+DWFAQ2bPzSaDvmj8vMh5\nqCHgSlAswZiyQvQ4qRCzsS2V6zhR6+MrhwJoRXURgoV+0tqGDX9s3N4ZFRIC\nhSqEjEzpvTgOYkFLAQ1BqCBKKhLzrU5CwX+ND0Za7rppWlYLgMtwPAcCRtqE\noJop9r8Ka5XR9GM2Duu7zpjb4R7tmF1o/tRZ8EEkeatxHg8420FcUBajJjI8\ntbBaNWb0iDl/tgmUKAPrBOV//nXCGB9KKroa6yetSzjjGi/1J0P6hFrJzG3M\nhyn4od5mZp7jI5p7Yec5ZJ0JHYrAuJLLh/bhRx16EkkhMgMI//TUikbV88XL\nTZidE3CuzptQDW94EanDF+ygAjtJEWy/+QlKT9TW28U/sENI43wYDgwA1Kei\nliqAZgLKOmOTniNn0iv2pUSn4DuSxkCudHBPMXt4CgpVXecebGNkou2LDi4C\nw2F9\r\n=QpQf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCeJn7/a7MiVYM95aAbZbpKc5xG/dRJGJcB0X+u/d08JQIgQWLLchAHK2KHMsG81SdtCjmgAecTy5jN16IbEDiOWk0="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.1.13_1555114210354_0.12355568678863404"},"_hasShrinkwrap":false},"0.1.14":{"name":"type-route","version":"0.1.14","main":"./lib/index","description":"Flexible Routing + Seamless DX = 🚀","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://github.com/type-route/type-route","dependencies":{"@types/history":"^4.7.2","@types/querystringify":"^2.0.0","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/react":"16.8.8","@types/react-dom":"16.8.2","cypress":"^3.2.0","jest":"^24.5.0","parcel-bundler":"^1.12.3","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.3.4000"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/tests/testPage.html","build":"rm -rf ./lib && tsc","test":"jest"},"gitHead":"bef7a7f3a25c1bd95e80ea79af129dff8bfb9b57","_id":"type-route@0.1.14","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-K3L2B51Lfw7DBbPRCLORuMCoulvrB8pKmDUzEEcoOxZO091vev4uILhkTdJqrEwxOV7MwALpyL2UNQL5jXnM7w==","shasum":"9f2cb5717cb071a26367448d1172d2c5a18ca12e","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.1.14.tgz","fileCount":33,"unpackedSize":85838,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcsSvYCRA9TVsSAnZWagAAqw0P/2FWQ8lZF5YnKYFuagwV\nHrt6ai5VIuVsYPgXtxtAxP/1S3UwHdAH2phEtc9gsHbTflSVk3UYV9cYY7Yn\nbmfShCxkGLRAhNIoZuOJtRNgT6nb+/pNBNx2Koj1ufysgGylQmZXXRs0bLJl\nzayYywsAKgFmUHVKaLvm+5FgmfrxwziH59sNkoMbLROe4jkuTFT0h/K4I2AV\nAx2ybYCmS9994L+jhiFPK08kQVdimnrvUdODEwNwshWitAeJV0Ur12WSvM8m\nX/pbnxLdL5+NjQ7y9LKVVQ7U0N4kDG89lsMiq7m0RxpK+oXgpK82sNiUWaow\nWamKPouSccpQKxLhXBcUBmrqLwzzneM/NLIt4xWfXLWyKQTg361tx9brWazl\nU72wsknsBlZud6EjuLDOMI3myPiFUcefThUvtRMFIOJj84yVISiUEJVTlUiU\n7Mr5oZr711yzVhyUPWO231Mgq3Ezg+UAqvqkeVdL018m+IUrD0LsAj99wZjQ\njqtZO0hEeoqao7M4n5CWwmIjEXz3ADnp0+kVd+h6/QkeUdnYmGEsCrCAvFh3\nA4VS4qfGGoRfdw79kokHZyD8khMBHEBO9uhBfHiKh4DoMj9L5t7FKtasUkPF\nW3vPJ1cGbGvevvExazluHp4UMVKBxGrFcJaDKG/955Lb4orZeYXeYyK/5QMv\nlWjr\r\n=jrDN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFBi9Iybdhb1LTTgt83ZcmjuRje9TPjm4AnJE6eaL4yzAiEAiPhS/Hkh4Oo5p93qoRsllRvO8nF/JA7C5h9spirhaLc="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.1.14_1555114966957_0.9180458726493892"},"_hasShrinkwrap":false},"0.1.15":{"name":"type-route","version":"0.1.15","main":"./lib/index","description":"Flexible Routing + Seamless DX = 🚀","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://github.com/type-route/type-route","dependencies":{"@types/history":"^4.7.2","@types/querystringify":"^2.0.0","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/react":"16.8.8","@types/react-dom":"16.8.2","cypress":"^3.2.0","jest":"^24.5.0","parcel-bundler":"^1.12.3","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.3.4000"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/tests/testPage.html","build":"rm -rf ./lib && tsc","test":"jest"},"gitHead":"98be0bcd674b3b0467da3804803e9eda1db9278e","_id":"type-route@0.1.15","_nodeVersion":"11.13.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-Dxp3H3NceGGfwp4VNvJZTHkxQ5yZyGFykZTlbJVa4gjnx/eWbG267cJ34b7zFqU93Yi2TASNEcR7QLJF63orTQ==","shasum":"491615c7cc416c6682c3893a7e728fc794d05679","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.1.15.tgz","fileCount":33,"unpackedSize":86320,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJctkrACRA9TVsSAnZWagAAF+kP/3zZ0ZiqjmxdV7rl8pMo\niwYt/qm3idkF4H4zYDSAMTTThl7pkvqb35TwAvhuXZ7oPxN2uanuy2Rtusyi\n/SohglWKaIwCXULdzRdTbDt9xSSf2bR/ZPifspBC10V8bey0q7Yszi40SFdB\n/ni4nCVD2fuaKyV1QIHS5f1lxHi/zJhQ5G0BUJVXU+8cB6cw/QsDPJu3lwEM\nxsxzPpy3xr8gF0WJMVFgWT7iQeNWaNJ/csFJLmPYLt6M8CNb39j6XDMQ6pcO\nZEZ4liNmklvrHDTqoZOp29SrPSkEhDEbT2gHW2t8vrU6fqxZSRRBQdwb8JFH\nQMSIKjD22UsLxB341BsA8ZFd4IxeInSGNBisAT4jOJQl8bEo2FkTOwRMiS0I\nvt5QqOZVuFrzGGn4pXN2w/v3XSBVKZpWQljhDgsytJj6h4riEEXFbjlNDOEK\nnqmsNXc/OI37rYSXWxQPFFApaR/A8zkbBHIcl6gP92MZdmEM2C75HXFNdDD7\nx92rl6ACufoFVacVDZAeBfY4izkioRXfVwRjLncLkLNJJVupWmH2fYW5imaO\n/8bhNBeNH0BOhghctwSdfgEzi0cmTsO5aJ8p/0BxLTITZfuwjF7+6lthbt4L\nysLGSn1foIGy6bzr4CVI9zP6HXIQAOEWxJAuCoZ733iLlH0b7oyKZoHi8MSq\nYCn3\r\n=zwom\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDyE+MgJpHSL+ESe+NE2+Ru+3Zs3PZe3RYlHojqzq8h7AIgLLzUhuVXwSI/6jKlls8AOZrs5ThTF6FsgDxpO15L5vA="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.1.15_1555450559589_0.6030502616675626"},"_hasShrinkwrap":false},"0.1.16":{"name":"type-route","version":"0.1.16","main":"./lib/index","description":"Flexible Routing + Seamless DX = 🚀","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://github.com/type-route/type-route","dependencies":{"@types/history":"^4.7.2","@types/querystringify":"^2.0.0","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/react":"16.8.8","@types/react-dom":"16.8.2","cypress":"^3.2.0","jest":"^24.5.0","parcel-bundler":"^1.12.3","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.3.4000"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/tests/testPage.html","build":"rm -rf ./lib && tsc","test":"jest"},"gitHead":"98be0bcd674b3b0467da3804803e9eda1db9278e","_id":"type-route@0.1.16","_nodeVersion":"11.13.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-X7vaB3mxvoJR3+QMd2SAt/VFXswlbxun/HAgWmoPV81oepgw+47PArqwmJecKy+spkRnCFm8Au9d/HQBE1GnFQ==","shasum":"399e6083485d3696b2720661abc85d7a399040b6","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.1.16.tgz","fileCount":33,"unpackedSize":85234,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcvyeSCRA9TVsSAnZWagAAApkQAJTeUPJ9vOPuC6bHcAVK\nAHwO1FMhb7MWc1EdvkLUzmQDxEhgCU5gsr4Mn20MJkb/Lz84GsWPYhhqWxGj\nz02khxYdGTpqADunq6F5ZJnGVI5E+WJJiIaDthj8YfA409yC3wcA9LTIkPVD\nNtFX4J+LQ4SvJwUBmlKLc+HzfAfq54y/ugD7ZZs+psits5Qp0YpoDzaMEp3W\neygIBCzs056FVg04Jp+FwR+djjVpv6jv5+zCT4XLxFDYIwCQqszpCe09O/uD\nxg0rPmK7U8WLNTAwi99V0w6iCw4HOXWm+POuNUOSLqjIbnMWdfLXbj6SGHrD\nVJOsDzj2Z2x1IB2/6KOxMrMWyu4prOpb6Edxab1QrjgOjod64IUgG5BQl0HN\nUHPo9MNAvr+JxSc+I2LUS9AWIIySWCAaz7KLK/YChVunrkQtbQ2zZhDtej3C\njSUdC1ZAS0SR4Gf6XPPYFId7Nu5zYuW6nWtbdcmmegvQSlXBMEO8u0DXXwF4\nZu9w789tmaW9gybA8VazK7frD99sqlC6h2F4eE348DqrtGbWuWhb9iHI2wJS\ng9vF/23yguQeze9zORE5ePZ8j6+ULGdMcxev33tVkWoL6Hq1cKrbBEAoQ0Ln\n9vjLRo/ZY4b7UJBjM+fx44Pub5+P9YJcvNr0X60KgiRwdWkGLpaSkbXeU6DF\nbsD6\r\n=PpvX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCnQ8uCEZCbM0wTeudP6bpDWkCC6HlirG04iF1ObfOSigIhAPdKtfT7iG7rt32KXRLZdcQj1LB6doTjntwQrxFWivrb"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.1.16_1556031377038_0.12467941921893333"},"_hasShrinkwrap":false},"0.1.17":{"name":"type-route","version":"0.1.17","main":"./lib/index","description":"Flexible Routing + Seamless DX = 🚀","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://github.com/type-route/type-route","dependencies":{"@types/history":"^4.7.2","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/querystringify":"^2.0.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","jest":"^24.5.0","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.3.4000"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/tests/testPage.html","docs":"parcel ./docs/index.html","build":"rm -rf ./lib && tsc","test":"jest"},"gitHead":"0f363b54e9ba93d5d82314bf7a243c7f3fc0db2d","_id":"type-route@0.1.17","_nodeVersion":"11.13.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-Xb/T1Lgp4nM0dysGfl2TKhvPdXQ7Sce521a9nyzkdU5bbIP7qw8d+RNAmiEnoDVyesA1pld3mMwMnrMUufmLBw==","shasum":"cce4c5041aa8b3ea51c27285c760fd49a0bc76cc","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.1.17.tgz","fileCount":33,"unpackedSize":85437,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcx1o+CRA9TVsSAnZWagAAkWMQAIHuXxUvowAh3oE+T67B\nbnMy0MGnLsOnm00xCv+ix9GPhmrNLHHIdY1M1CNb6CcpeU7zmZ8BJXn70Bmr\neodhjvNYVttHjqLdlYAzwdlLW//unj5Qkzw2f84/aaxQHSnblJoybqc/qAn/\nWKxwC2Go5Qa71W8H9Ye8YyxEkVsdrZTcNW2xhKHRrTU9kIxw4jk6PoabPsNT\nCImUcQTBDHr9J0Du/NXAI3EtXbLIOxIl64Ll8aCQbrfvrWMJkVWicU4RZcLm\nmcY0vcU2AUqS8gJ/xEZ7RrWQ3cZhgxSz0uja9iCOYxEc6IDnbtxoTF5+DdaP\nAyzrJzLjEHzLVgcpv90Z8GcSQEwNk6ZhX/+YhpYBly8AEqqQaKMn3vaOSvjj\ny+MkOzJj4DcqcLWls+5CFfnb396/PyGEXDYpgJq2Qvw5Tnx5LWBy5+Fu7JB+\n/eA0znuNn38m52dbi4oE+qjzReQQyVmioGm2UEwqQS8AgOI9KmKqZCiKgFWt\nYHf/LpMAS8kBKHE70baFNHtqCgyZe9EOc4TU/hHx+0inX3+AU9qEDs9dUhjb\nzVBRO8ahrpyf4KVfj62bFeX9YR0MIQ7REZuHqWxtiwCs7MGIf2O2GbbnqYhA\nKckk/9fZc9MwstEP6esgnOhvHZYafDAkH3vn/89WFWnDL6p4v9k61geusKKx\nU4Gp\r\n=EQF2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHncqmVC1F3stYe7zbkgQKx42o49EEC2+lY+VotHdCyfAiAO2Y9r7XjGoyBGJEprPifBjjl7ctAACw6rF66ECVb5GQ=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.1.17_1556568637374_0.17134182187122793"},"_hasShrinkwrap":false},"0.1.18":{"name":"type-route","version":"0.1.18","main":"./lib/index","description":"Flexible Routing + Seamless DX = 🚀","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://github.com/type-route/type-route","dependencies":{"@types/history":"^4.7.2","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/querystringify":"^2.0.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","jest":"^24.5.0","parcel-bundler":"^1.12.3","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.3.4000"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/tests/testPage.html","docs":"parcel ./docs/index.html","build":"rm -rf ./lib && tsc","test":"jest"},"gitHead":"784b663e838232826977e9ad06653b10908f28d5","_id":"type-route@0.1.18","_nodeVersion":"11.13.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-PnSXWdONibGcxlPpQBT1Y1G/o/mHi6x+JvmTrZol8xNdlM77/sxYoxt0dQ+uZEM3gBikqqaRGeFm/zFGw1KkuQ==","shasum":"39a92fb9d80f9137db2d8a52c3bc923cacc0248e","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.1.18.tgz","fileCount":33,"unpackedSize":85611,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcybBpCRA9TVsSAnZWagAAr4sP/iD0HR/YQsLn3Vs/BwPO\n3FYuI+HSYvhjNa/FNHGa1DK1FlaJtDH5Nikt0Vy1sC7uwzvwVaJBPgI3FUNx\nINKs5M8vIo1xR7AQ3U4ZGcibWkmHER817HBgQJU06SJvFBgInTecL3q/wj+h\nsEQ7H5Khph9c7w3RUTAAq0a7C17ZSk2Ca87VjZTMRxVZzN8qMOEXgxQ5oPz7\noIu4r3Qts+8XlrKuBXNmvYjezaedc4U1g+YHs/ifOhpmi8XRHOiD3XZdJmdn\n0UhJuhZqkHDjNQR8nqFF858Q9S6qQPAIqnZqwHY+wVdPcahPsTmvlXh4MGoB\ni2KvweooQ8wTV4K5HiSMJFE0hBD/kiP59rHbUtpM5lP2zM0cLPNvmOixsE8a\ntZ8J5kenlbj/n5IzPNFBri84HC8rjwCNy/m92qyY2R6HwZeIk0UGgSRvWw9E\n08KT0n8FLmYdFvRnev37Pb+ux2AxijkDYJbCQ508u5O9v+mZ1T6RWXOQNJdp\nsaRpmoQ2B7SzWhRsqxL2CRbG3t3KrQPGGpOLKaqOHkN6KohUIrgPb3nMbd9y\nC0vUjytFliUJNUvoh9OdyFvT9Uuq7GnpyfcUBPO3Dejrk3csRO1bY9WTJ3XP\nqn93Scz6BtiZyMNsipF//HUrPrA3z61wJwFTLKeesP6yrvkzAuRv1KLSrhc8\nyvlL\r\n=lBo6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDPRBkAjp3qTX3pqkkjDLt3IXrcPG5B1bIrv6LU2dLBygIgFyXRDi2GUhaHXpWBR/ixAIj7JngR0+Rs3ck4FXCKMKU="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.1.18_1556721768337_0.5677673148193174"},"_hasShrinkwrap":false},"0.1.19":{"name":"type-route","version":"0.1.19","main":"./lib/index.js","types":"./lib/index.d.ts","description":"Flexible Routing + Seamless DX = 🚀","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://github.com/type-route/type-route","dependencies":{"@types/history":"^4.7.2","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/querystringify":"^2.0.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","jest":"^24.5.0","parcel-bundler":"^1.12.3","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.3.4000"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/tests/testPage.html","docs":"parcel ./docs/index.html","build":"rm -rf ./lib && tsc","test":"jest"},"gitHead":"b355a0f0c5b4b562e77931f0a803afaceee2d566","_id":"type-route@0.1.19","_nodeVersion":"9.5.0","_npmVersion":"6.8.0","dist":{"integrity":"sha512-s0wzPYmzwfQrR28KITUBuVXv3fD9tNVyMTEBOC0gNSmFdBBLq2HEC1m2mPYBjBPNEaBWXWkg2tmDJdXG5KcH1A==","shasum":"d8b9c47131e57322da3e2e2b1399e476c4942255","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.1.19.tgz","fileCount":33,"unpackedSize":85763,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJczjt0CRA9TVsSAnZWagAAs8IP/1mwKO8S4XETtEvbOC6a\n+I/lUK7cEYuU804EwT1FsQtuvO4VCNHacXI80xHyQjDfbfaWT8GI00LbUNsb\nk7oddg5OZ8Rvokj6g/4xAr+ELmb+XgT6RkS5vj/0nwzHz+nzr1uEMLw0aSZk\nxhWfuhkHpj80T9isqLQFDEKaP60AqrKswnpi0iDXT+5m3AyMKBN9KMusI5Z1\nDYLAxY4H3fHna+QqCAt8V+yApUokgSBbHVxwpKG6X7PifQErNe3eyy2rYWjb\nZ0e0hjnHcwMJjLGvpWUUaYJLCEQ9UKqG13FaG2sd84qsq33oAvy2jZqsSx9c\nZIG4WoVXXWGqGPy3QoRxAtQdaB2S7P4MrIcqcGFSDdRxYrAhHOcS1xRu7MkM\nNmCu/BvhczBZc9r/1sLSCMoQADEjjE6Gvq+lw256TVk2cWjow729yIpeW2NH\nqV9tRkTpVa64MPHgdAir7lLsIPJhJqqN1bSbkiGksaR0dqa40/jbCTtV4Iou\nxXaWSGlzHGNbOxQqnRKwbEGtsErYaVtb9kHGyS8iyYPYcbLMorFaLZy57vV9\ntU906eez8TjxxYBKkeFYJMdHkH6TAd8+FGAvF+chJ8v+mFLuroAoL+0KCM2/\neo12ODWHsr8emcgwxgXaVzjpr29ouP4Xv200+x2rdPGEjCZLdE1LqqHOsseD\nvoEO\r\n=zJXM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDuGpOMgpyPuxoFC9YMilMQ3F5mA8lR/ehlGPlzbtkmzQIhAPOdmnfI4kqUsEGiLxlEnvlN4aKiVadL32+E9J9RaXdz"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.1.19_1557019507453_0.266389296827952"},"_hasShrinkwrap":false},"0.1.20":{"name":"type-route","version":"0.1.20","main":"./lib/index.js","types":"./lib/index.d.ts","description":"Flexible Routing + Seamless DX = 🚀","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://github.com/type-route/type-route","dependencies":{"@types/history":"^4.7.2","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/querystringify":"^2.0.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","jest":"^24.5.0","parcel-bundler":"^1.12.3","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.3.4000"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/tests/testPage.html","docs":"parcel ./docs/index.html","build":"rm -rf ./lib && tsc","test":"jest"},"gitHead":"4bf6f0abb3fc29942b2d85a383c3bffa5d672b19","_id":"type-route@0.1.20","_nodeVersion":"12.1.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-DBDDoFk8f11n+H+muUEtwGDg1Wb2MDbPYp65wA4SEmTOoZFsfF+PPRZAsgWtTHl87zD4aAjmAewv5KtG6L/x8w==","shasum":"a502f28b4937551ad130cf532c9feae6b204f7a9","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.1.20.tgz","fileCount":33,"unpackedSize":85577,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7BLtCRA9TVsSAnZWagAAM10P/iWuMIdlq9l6TjlY/pVG\nmU8T27CBeaJjsUT5Q4fKSF6hC2Obe2yLULBiwc0UlUGvSR4FZ7FaU1vY7PEs\nArWiLTOpbe+RWsb+3e2BDnVJh2RLNv5Tkn0v7IvQqRQDn178LI+L+DKyu3G2\n7N+wSLFCJQOQ5ccjPT/Fe/MgKIxZ38WPzYq229NJuv2k8tB0rMshmJfuhlvV\nczr/TMejtVvDiX9u3XDI6aRvONd3BrA5ugxOBZ2oe1HsszPUz05dQ2cVSrrz\nu1gKW+n/q6kC89mCfIL0byowWnSFceb352E/4WqNys6qCXz3lwJlLaDMsNhU\nJnW7/GSlwR4LFvRz4sTBWZLxWfFASRlP0wA2L8lkbdAcll6xkaKAolZmzAnJ\n9uLtDap/aq0BqJ9ZpKoSk+p/TzySA3TxrSrKcktNKgXQyIXaKL4XwwKwb6zz\nojOvpYLDBgR8RZYL3EGmGz60nTpv/n93LznqnTiL8HwvIcDtErbPM8UYOY7j\nDKRhvJgRDbSLYHEjOaJf9/lwnBv8u0UdEbGe30ckjDL9e2yvl4VBekR5aM9a\nNl/4vU6fSDKoDHKl05apWttVqtm8Ec0bZYFIwmgJfOU7kqhEx7PEauWBvAuz\nocoy8zAsQKPWg5bbuFtSwEkXFRjsjtU1ODbwIwU1VHYO80IFUZ+FGNZBAg/l\nClvk\r\n=Qb54\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDVhsNSpft3WlNmm1Cf1FDGtqEkKlrkMCrne6EM3NCzkgIhAMWgOO7vwp7vWF1hm7fFz89s+GpDSnaN1lpCFyYg4bDK"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.1.20_1558975212754_0.8335136161677523"},"_hasShrinkwrap":false},"0.2.1":{"name":"type-route","version":"0.2.1","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"@types/history":"^4.7.2","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/querystringify":"^2.0.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","jest":"^24.5.0","parcel-bundler":"^1.12.3","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.3.4000"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/tests/testPage.html","docs":"parcel ./docs/index.html","build":"rm -rf ./lib && tsc","test":"jest"},"gitHead":"a4d63a77b5e90c8d03e15427e9f4d869d6503a91","_id":"type-route@0.2.1","_nodeVersion":"12.1.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-DfYTZYaQ0TK00DhrNrLYC7egFUvmmUtSMQdlJ+Vux0KaeXAZFXSmlBE6smk9EpTqENDxmi4yS3IX5XrdryGeaA==","shasum":"9213b5bf95e05b1115b924d94c598a1651367709","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.2.1.tgz","fileCount":33,"unpackedSize":66323,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc8vk6CRA9TVsSAnZWagAABoMP/i+7Ep1w2wq4NxowprXb\nePag/CxXkcR29fPWudQ4mZDcnoVfLDS8/AGVkoFrSw8myXQqlMaUb2iUV1IF\nSJNOY/y6kULBQAdGDXDWv97LPO5y37+WHfx7l9VIzL44Y2AuugZJzfMktubC\ncO7kCtq5MXWDXbI6kw4SG/BS25XwF4Ahjtk6cq7Wv5BeAWF/xxWvMXdERysL\nV/j25Fcrs2ZFA7wllAjDvD8mvn/goM65EQ+zux2cMpq3CXBWg3lrNqNb3eR8\nyWDLLZvbEBNIiTJ/DmD9yOZvNbbqTK8apL0Bu+SSSose2qZ2Ku/Je8Js5Zvo\nzDBvofi4pVksgl6kN6gqex3gZsE2j0XYG73KYnTTrhKpMPHHUCQKIyWsd+HI\nK8vEwxKZXg7MHCvDbLFWuFyQzayL7jstwrPOPK4+0RGMKvhb6XCVlR9VlulK\ncB3CyxldH2/fcZAZFi4ny+zv9LHStMr9HYkImh0+oJ8II3+HklHdnhiQuLAY\n5Xpl7uJtJC+nv3pE07/aahDsfG1tktuyiMx8jz1jnLl4lGlepArLnCX+Wohr\n9lFleCF5ARnHCQXkK7puM78Ee6I7fmVs/CDXeQbLyyVfKLye2j33EnFigIE5\ns1JSK5jqRjj8m7FOA+Tp53o3tzzwbKdJ+oGS7kefTLZlPV0YzpOH0N+ODuED\nYpcN\r\n=7j65\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHhUGwwQBt2j/yjAUX6h9mNS+1TOSQY2QsusPco4GheSAiEA8spVhcNg9sRgUdPhuI6ayG/6xab3GbCj+V/QqtCz8bo="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.2.1_1559427386172_0.46726068685426525"},"_hasShrinkwrap":false},"0.2.2":{"name":"type-route","version":"0.2.2","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"@types/history":"^4.7.2","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/querystringify":"^2.0.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","jest":"^24.5.0","parcel-bundler":"^1.12.3","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.3.4000"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/tests/testPage.html","docs":"parcel ./docs/index.html","build":"rm -rf ./lib && tsc","test":"jest"},"gitHead":"42f05a604a7ded95f92dfb07bda3d71ac560830f","_id":"type-route@0.2.2","_nodeVersion":"12.1.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-tTpZguRsznZvPkra80OcMO8LI3UMRR56XoZUbq6vfpEZN/j4hwDLEdKrxgbjnflFgiBZb7lSXDNNYrNZamAwgg==","shasum":"c9ed5e81b5c9e71b6da598a3e7be65be491bdbae","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.2.2.tgz","fileCount":33,"unpackedSize":66331,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc8vmYCRA9TVsSAnZWagAAQGgP+QG4hcorDUTrfLUW17lB\nJdMSOfj9/Dpl0sw44fWhtmqdMHXvANL/yX/kdiaXLJ9eUEKe3uALBx9mnW/W\nrz0PLqeTV9JJ6YNyws8eNHzzKrsywyUgT17TJSyx+9Gsf5I/8CHGvIhtJQq4\ntZt0u6VQGcif5gjsoLEMkuI668o3jY1l82k36S4u8XJnRNJSIpB66g9PooUq\nSbRXOhygoyLO9VJqfLbQCEb0Tjw/oEOnM7D5oR1wPSWEYTlHBv7DIe9DrdOJ\nhFv1iBzoGQW9Q910EF9F+wir5C7HphreZ5tt4+UJQTZ+9Rr6TLADVU3OOck3\noprSXomeWeW7QELgQuyz6zTDBUZfljb/iyRTxwkyxXFNcKfnznkRpJ9e3+aM\nW1DT+qceYteWJIC46Hcr+wQMYMvBYCuufj4/UBnlzFphNXjEYl/WBZlymWR+\nAfd4hss8HcRB7AcE0E4z7q5Hj2Xx1OAixuxtD2K1vYMHGNwda3hdn0crMC8p\nHAIdS5L1pOsDvuljgx+l+MeSAC58A9H+YuTO2TPnfmpbLkKJsSn4Gc+3xkp9\noYXun2qULi+3g3hbflNnB76AoXTd6ygv1uHlrfzRaPwLFx9OxSKJp6jt8tzN\n22gqzUPM8YksCoENAXi+VPFE2d/9z3WXLABfEOC5EY70aoGXnKUr5xkqsn0+\nLtoX\r\n=O2pZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEZ8LVMqEjNOSFLKmgqTbNuo4UzEQcDFjLGO+mO5F9rEAiB0gKvAFDkNHBdcyGqbveKfMEJ9AzmZy0Xp0AdP3/zhtw=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.2.2_1559427479520_0.6122731727966102"},"_hasShrinkwrap":false},"0.2.3":{"name":"type-route","version":"0.2.3","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"@types/history":"^4.7.2","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/querystringify":"^2.0.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","jest":"^24.5.0","parcel-bundler":"^1.12.3","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.3.4000"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/tests/testPage.html","docs":"parcel ./docs/index.html","build":"rm -rf ./lib && tsc","test":"jest"},"gitHead":"a9175f0345ce23962998bf5a6d55770e8b3bef36","_id":"type-route@0.2.3","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-BGdLdiv7/TiwFjVDtJa7PJ4Fs1xL9CztAYVKsmkZx8w51NoMBiXqZ8YpCem9ur5bZMCSVyRjAjVFk++Hc6Lw9g==","shasum":"9b84b2632fffc87acceb32c88ad4c1c5585764ad","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.2.3.tgz","fileCount":33,"unpackedSize":66278,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdC81xCRA9TVsSAnZWagAAw60P/iOMJRCTmKJubub8hG7z\nEMRrixgw4dFaFUsUx/fIuS/RbEyZwlduDdLhXWKk8eJ76RmPGogN0sYWafF4\nqQyTtVMnbKplR2A7VI4YyxLpJnq+P/EduvdTr6TMbRT3Rxw/hD3/lCYVokT3\n2lz0KzWdywE313PNytxqhKa3LWclPh4duG9mpTieGuF8MN067mDOoXijDf5K\nOcoqe54tKwTueBD01zy6gsYzH2Yf/PLvNVYBdXd4c4GPDAphhy8xEO3VUzY/\n+Zj8MmvHiPYgWQwBuGGC1BZm4JAOBKCbuyBGcwYKIaCMhLpQ1qzZrrWWCxmx\noQvwuTssffOjbr71wEXGyC0xvXdy3WD2jEe9CQGMjPYI7lNSkKlfUsW45WbD\nYYR+b3k634/qJ+sXj46W1HDciLlTic6/Y90TiQizefiNJ1J4Xh5P4hubFc27\nwPHz7sbJa4SNqCHgWrt3I59MWusm1zOFSosb2uWd3UqTqvcQ26eZ2chU3zF7\ns1tnYDKY6Hxp83ffI+vGIVeF4vrCytqUJzd7EXOWF2lF+LL2V7VUB+CuBebs\nPgtyCEMfMsF0C8eRps3Sb0MzKU3ItR6IAqkybrtl1ubChbqqWZRRK+bFYcOc\n+wHORDedpBxaI4SkqlXh5xwaTpa8jQFMs4PK3Qu0gWeh7T/yh73rXnE+82aW\nR22P\r\n=kpG9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDLRNKzWR6pHAReQuLdZQnfM2o2qXd2Mcne0/jUb57ipAiEAnOEAPJaSZ9Bota+CajVA15aTeuDVfqh3ui6+OK95PbY="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.2.3_1561054576265_0.4699873573956488"},"_hasShrinkwrap":false},"0.2.4":{"name":"type-route","version":"0.2.4","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"@types/history":"^4.7.2","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/querystringify":"^2.0.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","jest":"^24.5.0","parcel-bundler":"^1.12.3","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.3.4000"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/tests/testPage.html","docs":"parcel ./docs/index.html","build":"rm -rf ./lib && tsc","test":"jest"},"gitHead":"9fda65c8cf6e94caa10083d05aff65bf8bf65ece","_id":"type-route@0.2.4","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-ggeG6ktwmRtBZMAP+b2ev+Ce6TEBKtS6G5fJcLjKdsBucE7exVQWKqnXbPd3pjJ/Zh1F6/6jmj1lXHDO32jvbA==","shasum":"b23f66ae6da180dbae1b266453f55ef820404c7e","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.2.4.tgz","fileCount":33,"unpackedSize":67036,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlfVsCRA9TVsSAnZWagAAbb4P/16KNk4EHs8/QbefUNDd\nUfn8vF4XwdOlid0GEmYAFdc8pS7yicOpgt8GWD4Eryz1s6w2MLyRY2Xm71UW\nOzbt+JpnF/d7rADdHfn+/lky4porQHzdRDvz+TNVAW47+UEayXKiiPRH89TM\nEb48EzOm36mamP2kDNamgGSgTPzaoQIVjrGtjcSbTOkIsKz8BmzZVHFIMEmA\nfy6IKiT1Umcj/LWk8l6TFWXIbMScNiJNHH1eVhZOUVM74pFgq4wIyQ7kT6cr\nwAeZ2Gj5voJiaSkeWDIxcPX0I2hFAS8G/awnv1zm5gSLF4Oiqk53SGt/xKUt\npy6k2v1gEy6pN6nFMKdYHwQryCX+GEGq1JTanJCGL5r6mPJxT4VRTq9YlUR9\nFC3cMr9txg05yIqfSLBS5D3xXx2rq28A2vQW2oMLtOEM7Vk8BfKEcZe97Wze\nJVGNUPByZhRjDeVbbDUyf21HCoyyJgVRtuWbwU+pbZJNndJrdKQiosJRkIdF\n1IKfv8zkVH9OeXpW9aUFIKWYKNIqRmjO1klpnq96fCVyobjYyTT7Tlqo5BFk\nxc2MKSseZ9dzwOkHj9RBuIycPmxVEDBdXrweb9P+pRyXWMTxCKyMneu5dpAG\nDYIUKDeh5c0sYtTm5LeMXIyYe8TAm4/6gko5D2j1jVrAZKUVIXcFEADzHsbV\nTHQG\r\n=SUz0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDHd/bBjIsX7gn/bUz7Zh4ceeufjv7b8HBZAyWXxtASnAiAZl1mHkf1KS+feYiJz9kO9Tjq9sBdl6mVGxxhxBk5Xeg=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.2.4_1570108780113_0.41901146617228613"},"_hasShrinkwrap":false},"0.2.5":{"name":"type-route","version":"0.2.5","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"@types/history":"^4.7.2","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/querystringify":"^2.0.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","jest":"^24.5.0","parcel-bundler":"^1.12.3","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.3.4000"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/tests/testPage.html","docs":"parcel ./docs/index.html","build":"rm -rf ./lib && tsc","test":"jest"},"gitHead":"238e3f5449a0ab4bfb3b18d779a9cba447226c90","_id":"type-route@0.2.5","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-O5V0OBEHCd1b6IQQ8IVAf/cB1PQdnNCGhF65dJn5Sgwh54abnZ2+9nSwjh/hItkNpaSisp8IRc8hDgSdkk72rw==","shasum":"31053b3b56c3842b72ac435eab9d769f5a4c3bf9","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.2.5.tgz","fileCount":33,"unpackedSize":67323,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlft1CRA9TVsSAnZWagAAJk4P/2JjikfEYhhB4JjY4OAu\nqN4H1K98zuQ9Lh0kt+EQ9B7UmejqezEwusV0W8/hAMOuHMDmXHYVuEYg/i0+\nPWg8i49Wicp8uU4fj9i7HpxSMgAAT2VBRIsH0HH805oHVO96iaAVOF9TpTQb\n5ATTjvQvOICgrLGx7TJUEbMmKp9w3trBZXJxE4OOrfL68h4rZKVrp+JlRaZQ\nNZIN/1SHSVhstnILrwzsWl2UstXJzv/KkrVBjNQkkPDhFDzTvIk8L9GERjUk\nekah+x949rLLJT+tvUfQuzzNA9pcM7JRvEMBmmkjk0GPiW4Tu4nTAyUyCFus\negPrcDAkf/NI8bZR4Qj+ToczGOIU9hgUfbj6gMszo5AA2HT0eRDhCd2N2iKb\nXh8amQhFh1xpG2NtoiVPR6HUaD3U1dMz1SsQhA52s2PdxzP9Nln3+hmy3tpH\ni2+UgWGkFfJbLsTrKf26UFmPEZP5b4W4iDyMUqOUB7lSnK1gNYKJpXROR5hB\nZfPwPcyFgr39c0ZMie9KDOjz+z2VQsXwInEK6irwNd0fL61AeeYWrN918Er2\ntYSNKjAU6+jySHVQtui+OJ1Dy+/MhheLsdot1id9tERe53bhzsGxxeqw52Eo\nTm6LK5XrUWmjDFagBwvJeFvpBP/odgyrIZ9zFDAeOns0RbWcYrQJ2Ijn5iqK\n2i1y\r\n=BGCj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD5IC+u4OyXqjNA0ad1tTW/GG1cmBDRE5H+oi4StrfLDwIhAMQ9tJ07VhQp923FlEwnJva8M+Q5fS41Ih0bM6ITGZn7"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.2.5_1570110325013_0.9979103540552003"},"_hasShrinkwrap":false},"0.3.0":{"name":"type-route","version":"0.3.0","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"@types/history":"^4.7.2","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/querystringify":"^2.0.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","jest":"^24.5.0","parcel-bundler":"^1.12.3","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.3.4000"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/tests/testPage.html","build":"rm -rf ./lib && tsc","test":"jest"},"gitHead":"22d48f48e8e16bc2256bb823889094ff8ba37503","_id":"type-route@0.3.0","_nodeVersion":"9.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-c1P4jRabuJeQZBNfOxb27SF31acVEx8q2/Px/pqPPVM+No/NfMXf0twBS/5WGNqSKy8BSYvxb1oEGTCiKYLM6Q==","shasum":"3d08d3b18ab41f1a902167271ee4c2e9e93b6948","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.3.0.tgz","fileCount":33,"unpackedSize":70910,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdq0GgCRA9TVsSAnZWagAA1WkP/Ro8z/617LlIjZ42fjqs\nprwQZRFIkoBvpHG/tOY7Sv2xindNSFHyiMWK22+hQo5UBKTaxZqfJI/CFWDb\n1cEC/oIv7Gc19wn4LDLsuT0iMIfoIz6v3KvMfvg7NruEpnq1uQ/7qn061EIW\n/m0OfuCP1GYyQ60v5Rqti/AC9qCxsOAXQmSrSiU0gT4L7TvyAjGwBBQCaL5V\njDy+TSXSi76wICvi2TUvRi5+Q0HaK42qe8jo49Bu64Xgu6DrdWxfyLHeKe+h\npoJ84BuWuHA4NwaxADpGZ5k8H5ulln6PBsghto5FRMHxvCJxyzZwAzzGxieq\n6Lyafv9YRXwhefFSGl8cEfwVQizvHTRYfL7YxWt/aU8fPT9s/AR5rhcmEuoB\ntRqoqlsesi1baYGRqhbFQbkM9Op7SXHwdOz147+A9+o+dT7vsSe1LPvQiHZq\nWWtFEWwvz40/xfx3/zQE+3RdkD7WCEKTYEnzDCkKwcBz1/MX4oJR2ToZEclp\ni3ISKHVwZiMGbUyGwtlVwod4FXZV4nsKtAsbzsF8DX1fQv0oYtAZauhG4FOn\nzVAPeii6TJ6UeXF24Gq8beT3cxAxeSUBudOFO9bwlOaZrn7IjaIOXMt8xBSn\nKlrOcMkEDL3gPdTvMG09s9sjjhxT0edy+fmhkdotPh+QSzP4fELTf27hMCaD\nQZ0f\r\n=3eJJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC1DqBJfFBtCZTZH8h5Z7rhCk4dqfCD4D1m9wNd6RRjjwIhAMrqWdcAYn2AlS3TwAxayfNj5TQzIm6UV/PnSV7eijzK"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.3.0_1571504543353_0.04591070638937045"},"_hasShrinkwrap":false},"0.3.1":{"name":"type-route","version":"0.3.1","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"@types/history":"^4.7.2","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/querystringify":"^2.0.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","jest":"^24.5.0","parcel-bundler":"^1.12.3","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.3.4000"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/tests/testPage.html","build":"rm -rf ./lib && tsc","test":"jest"},"gitHead":"27fe466ec02f908f8e0c20484b7d5e027f1f3d0b","_id":"type-route@0.3.1","_nodeVersion":"9.5.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-llOyWpEmtvfbyZbECo+UNOMuuzN0GrCL4sNNTtDC4yg4pAbgG7AJSiaVxpMPYrfgTYQQtn6YqgHtjH8W78/JVg==","shasum":"6fb5d41f00ab243a49b380d61b6fd13d29d82561","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.3.1.tgz","fileCount":33,"unpackedSize":70807,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdq0MfCRA9TVsSAnZWagAAFGAP/0uAFV6YsduJujQx3AMx\nrF7NdWIboLDjd2ulPHHJDYroF3SjjAmdQXN5k0dg1UmjSIlxj55nqcT2x6vh\nISWj1aQD9wCw9c16/x7q4k7U2/SIf/s8LUHbsfzHo7jS+697VSCdrris0IWS\nBGA9PvQKA7uGqLdoBXXJ+qXt1jrE8dyMsJVg/piEaCm9D75kolkAzuyskSXy\nH3jpWgw/65VcTKtwBofT792NZM57bVT6pIfLV7/uItNyvJPhuNGg5MZIcHzN\nebukSZwxAIDzbGuYHu32inzKkLLnQIXGXEGSAFMIMsxrBze/j/y990tPM7yv\nEk+LYR6AjklwxfkeHE46WD1WG0PvfYFQrxr9grK9gv8jhZCeV9aBMIc2uOjt\nm8FXTOF4ekffnv0Vr03TWLT5TyBmfA1S3ZPf0PzbfjyU+S2Y2x0jwRneKeEv\nuzeBaSwX9Jdh1pXs8KNbZDbDye3NLQHXw+0+OaZazUWFZ40DXEyzAQlvnrmN\n7EpV5iv1QijjbbN9VQkToVAB5AeHwajGl8DXford1imHXR7/PH1wYNW3TF7C\nypft4SAGwdM9s/A75XTeJG+zMXaKXgieZcP+t0Nmqa+qky7r5yX/y49AFstb\nVmJMpDXbK/7zV3hhrXXrMt0rPAlnKeqRzK7+RPhuSnKBXdl1gcGpvz9bdKUj\n6zHg\r\n=zAlF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAQVBdzuYCEVNrTj0q/JNUNP24CLMjIK6zlZJrg3LXEZAiEAyLkwlhdA/Q/OqVeXdaEJz7CMZdFvZz2TMUm7gSrcGbs="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.3.1_1571504927144_0.1501253488339973"},"_hasShrinkwrap":false},"0.3.2":{"name":"type-route","version":"0.3.2","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"@types/history":"^4.7.2","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/querystringify":"^2.0.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","jest":"^24.5.0","parcel-bundler":"^1.12.3","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.3.4000"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/tests/testPage.html","build":"rm -rf ./lib && tsc","test":"jest"},"gitHead":"61c1b590c7d1031a8b06fb1996eb7b642edd02fe","_id":"type-route@0.3.2","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-MdKnVOugKY4FkptBjfWhTUOtJq1nuwSY/OmXUP6QxxjhUYOGfVl4oXuth/P2qKLqJptCaMUjDIVYfdSy5jyIvA==","shasum":"b2f2040d0145c1976d4d5e21e8cdaab0913382fc","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.3.2.tgz","fileCount":33,"unpackedSize":71183,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwEQRCRA9TVsSAnZWagAAs9gP/29GIf2LWpGbdU7Ku2dn\n+eigO+lNQhpWakptG/esWjHNIXq37B0CLhBLWlRMmSX9wjOW6EjASPsZGV/K\ntXS5QlsBgIBmBSLThUteauirb9K9lXqwNbuf52pkP2iI9KQwhS8jNR0cjtAm\nb3DNGG0AAq6nodeZqCEPkrTNr8sWRIfBGu+ShkqsQjZFuaGdyvpgWgGe2VKX\nOTYW1MoJNQWabznZmLXf2G1F3TvgOSoYJFV0vsGPco9m+ueRE9xKwEUEwq8y\n50pSF2y+HurWMTmr8va9WvS4qJNDHC2haeVnC2kd2pt6hu+FhaCNbAb31KJq\naiYDtelwL+Tze1hNRJvWOo3E4F6Jg9MkaChL3hXaKmG7LkW54CG8IAxfEIzw\nthJPqQvuvzARLfAceDVYjSA9L3j1eBQ8gbLAWp8AYuSZKFEkOaPXey7ve2EW\npecW50b49HHwVDnPlSEJNra2pY8sdgHVxvqsZ79uuCwJ5B8jSwbiBi07vvMc\nWM5YKBoKRTBKZmyL6KKKz9HgIsdtJR4u/rpwVBBbPTMoBtADwy/pPLaAptxn\nGk1UuTe74Ci0ywyF3bmeEeXhLoKLI7gkeVvtdlo/knpzjL8C501ri7Qqcr6s\n45DbAFaje9powPi8HCtV3G99nv6X7zjFZNc18zAiuVv8yW/IKbUUrrex2bvQ\nTUMl\r\n=omt/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCa1yWDKJL6/pKq/wRfxD6ChcLgr5MhkZ7Z3zrz6u4fkAIgfTlhRbE/4KoGMNQ0GhfQdJxHBup3oDMXEg9qaA+73wE="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.3.2_1572881425598_0.6294565726247254"},"_hasShrinkwrap":false},"0.3.3":{"name":"type-route","version":"0.3.3","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"@types/history":"^4.7.2","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/querystringify":"^2.0.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","jest":"^24.5.0","parcel-bundler":"^1.12.3","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.3.4000"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/tests/testPage.html","build":"rm -rf ./lib && tsc","test":"jest"},"gitHead":"a916cfccb55e0174494b5d41768a959ff691eaca","_id":"type-route@0.3.3","_nodeVersion":"10.17.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-9Hs7mX7c8bC5kZ2gukhqzfX1N7/C73rzCecKaa3ZYYDoFHJ079JDxJBZ1IJ++eiUdR+b6zJn/WqI1Giq4z6eHQ==","shasum":"85204ab153e7539e4e087eb0494615ba27bd6e7a","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.3.3.tgz","fileCount":33,"unpackedSize":73989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd4VdnCRA9TVsSAnZWagAANSsP+wXYdnX0Wb8KIIPS7mSh\n+eXmIxWZpLEBKMLIQqtBCH4iaJDOvkzdrlcyl6roI6Benc7UkrZgfp4RntOu\n5MUkdCylt8WTQhlPtyRPq0pofzfFZzjlHjG49xbK+hmkjWADJZwJOeyWknXQ\ntAUGfamrBrEwpMOFjibRIhieH5LFtXvl1AMPIoUrPXPqEFkP7tlbfoC+c4NR\ndv72FcogDmWtes8hiFLbmrwhjCAvhHtjKPORyep1D2PHCrtEN6Mw+imEQUg/\nN3TIy14/5b6DkbhTe4ABcPyFAg21BtKOkZ0oKGOb5EXVkrGbduDDAzINNZB8\nk09YfiELxQBzPqDCp7fE9lZQnpMooyxaUmcd83mZ6GaR+NQgMBjUPfewLvL6\n5bAGGuDDC6B6U4UjVbeYCEgd/ptwK+LUWwS10UOjur2yBCub1hKd3uPKAEnw\nDFrVNITziCwbG8erL+LmL3EdSbzv06MSgCmXjoYidYjj2YgJR8bYKdfQ1IXJ\nWqSkrNfT69+nafmgBT27pjpUKkyny2cXGtfMuem3gRLc6+OKTd1ub/DC4jq+\n60AKsV1l9QciOJ7Hc4OJ/hy+xbJoGG/otIpGBS6yHbodMfR6dVDH4H8c4HiQ\n0XHZe6W5OEDrhMR+fAvPhLgqCzBVLSXfzEJfNMwDrHWh2YAxmJaImUNNhW2J\nzbic\r\n=BzdR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF7mKevPK/24Uc8KpjqQN/XsllZnMmrV9Fgcw11jqvxkAiEAilVaqXQh581VNFoWCK87/2GDK0HVdB/7zR25gVpTEH4="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.3.3_1575049062984_0.6751646554551023"},"_hasShrinkwrap":false},"0.3.4":{"name":"type-route","version":"0.3.4","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"@types/history":"^4.7.2","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/querystringify":"^2.0.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","jest":"^24.5.0","parcel-bundler":"^1.12.3","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.3.4000"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/tests/testPage.html","build":"rm -rf ./lib && tsc","test":"jest"},"gitHead":"0b7295607f90d385b50420620c441e4f21220f5a","_id":"type-route@0.3.4","_nodeVersion":"10.17.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-v8sKfnkhj/v6HpdQknzhgWePjOS3U7KpNeXHSCXQCTITvBNo6kgfix/s+fYlIyM4qs1pyERv35djHWprLv/V4Q==","shasum":"e9024232f10dfbf76744e8eb249ab79b273e6e2e","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.3.4.tgz","fileCount":33,"unpackedSize":73989,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd4VkRCRA9TVsSAnZWagAA8LoP/01dsFwYrrWLbxm83ycr\nK6ooYLz9gnb1unCROALaaGjmLHRXqncqdwr2kEWTGXULp8Vt2UOPGtQoMSWI\n0zanv1cpbGbPTzNvtIat0epX22x+PF5iohbj/KOFuvBNCWC31bw62ZdHHEBg\ncP1Ou5ouI3aeiPYIkXT3wBpiNmOtTty/3aHwKg2UO/XIq7F5BvPwTX/hO+I9\nGFW6pIaRprN965ihsSSiCWsdbrNvKx+6lKNZYaDQuSvjiEMs+q5KMFd836g0\neRgLzy3F8YTAON0bOenb0Tv/G1M7F/d7q1sTLiUg2kqqzsvf+VSSbkgpOm+x\njpLvOVm8hK67M0OXQuZMlosMCsFXe38nM7TzWyACwMhwWUmesD51au2Cwz/m\nHs6sMEKGCctHbGW5Ldw+7+JtTZR1VyyyPA8SYXrEluqkywmnJlTQ9s5KbPhW\nvGA9a0coR1/ke0yZwVQUmhTbkgNaTY+kju0QPmyOX2R5tysCzwMpgylAFhqG\nSHCzvKOY0lFhFShtGd6mINNtWb/vSt8XoNVAk3Pjcbj0mZmCZ7neznhPZTJB\n6MSiAVh1huwPZTmdxqk4JszXySA5sDHuShCh0lUnC/JB2mmQE7J/2QM7ArxG\ncZtZR9yGTbHRLmryJsy2NCedUrXePTCbpquvmcPkWulotHK6hnqF59aDkmRS\n6nrI\r\n=k0LG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCMQJ+yMwt8jhwXmYrtvI36Tv07F/wjU5a4noACdvK4xgIgarAzqaK1Rkb9AnRbb/3VHgV1fWkUgHKGs/RVWpaIovc="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.3.4_1575049489601_0.7601591367942822"},"_hasShrinkwrap":false},"0.3.5":{"name":"type-route","version":"0.3.5","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"@types/history":"^4.7.2","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/querystringify":"^2.0.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","jest":"^24.5.0","parcel-bundler":"^1.12.4","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.3.4000"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/tests/testPage.html","build":"rm -rf ./lib && tsc","test":"jest"},"gitHead":"1436520d1638595a02f9dea1cebb5b607f3565e0","_id":"type-route@0.3.5","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-6uKCo8d3vmLk7FZ6k+jjikx3z7vyQjeDD8QBhnhCPA+xW64FqiYgigPq7XIPLjkKnpJgP3wVz/DIWvFK+TD59w==","shasum":"df2e0f097899623ae26def6b127512abf83715a7","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.3.5.tgz","fileCount":33,"unpackedSize":74189,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeMHsyCRA9TVsSAnZWagAAUtYP/32utCwq+UnY9zfRCABt\nDfWg19XIluO6AIZI1jIgiWXETSqbCW2T/aKvlgzLA9/RuTmONmwfj+zQRRdI\nOoLq2nEnVpl7mxw31KQn1OqtmzZB6pmdZEQvBirF21yKb5+rYoVHK7IVN3t7\nfwOu1tw0lXzU+E4OWcZbZiiPiYQSqlh7QFWIKjrFusQfYTGh/rdso+RPb6QH\nsnlCEPCNXczYvJ4aLg5McMvbQVI53NPMDrMxt0MaRSm92wGCyiXtupA5JJsU\nOqpgbsOO7Fp3x4HWtqrhbMEcAU2tEz7tA3c6nHfhDX76e4fLjXK0TICKCLaC\nqQVlotUjLJFUsjBM+o0P/5JUIJ9Jj1BwkS72sewmbpC1etu6LjnM9HwmFGpP\nIXZn8lzjFTFT8e8YrxUDDwocgCEp64aCo0mrEpwgwfExehomXXEQqWXL7IgG\n7W7J4ZeyF+9VbgpEjkZjtpGAN0LXnwpxWFjIbmm6wzv/12C5Jat7Cv26jvHB\nBK+uy2Ydd76RDbx5mqOY58fl6v9APPgEN2n3EeKNqIDuDc33DANxGMRJkcqq\nXz50CEAiUinFa7MmOOoJl0hgKdBU063GqxngDDIpdSJ8uuw/7zPey+Qe3hAe\nrUDtZWEBiHoLRSzxzkZbSvj54MNoOzos786MB0uUGcI2c9zM2RrC2vFtbGKp\nuCHc\r\n=hsFx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDEKm+oxvfWyfkrSza+VD8eBX7cOZ/3Dkloup+ti0ATpQIhAMOZEI6FdQcyhJsOk4K3ZeFa5aJSbnEnUfuI06D1aw+J"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.3.5_1580235570053_0.24666401744557387"},"_hasShrinkwrap":false},"0.0.0-60947433b94a742934135019a379aa3fc5170747":{"name":"type-route","version":"0.0.0-60947433b94a742934135019a379aa3fc5170747","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"@types/history":"^4.7.2","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/querystringify":"^2.0.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","jest":"^24.5.0","parcel-bundler":"^1.12.4","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.7.4"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"rm -rf ./lib && tsc","lint":"echo \"TODO\"","unit-test":"jest","integration-test":"echo \"TODO\""},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"60947433b94a742934135019a379aa3fc5170747","_id":"type-route@0.0.0-60947433b94a742934135019a379aa3fc5170747","_nodeVersion":"12.16.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-6DTr/L0x0ImjULMrxAKISvJs61ccU3qjGP6AIoEcO0u3Rmli17b2utflIHHx9AfWq2J/mXDKchwVV2RxUf4T/Q==","shasum":"63c0c7b1df8997ba49edb7133941b3e33b356dbb","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-60947433b94a742934135019a379aa3fc5170747.tgz","fileCount":34,"unpackedSize":69856,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeQ5lPCRA9TVsSAnZWagAA6m4QAIObFgr6f0NXD+LeC8zL\n8s7HGtVmEOB/WvgkRS9EjrsDNpcEbI2/W45bXNtycKErtbWKZ2vpv8SqPH6S\n1I/P+guhSmZ5go4nxKzO+lF229d4tPMoIy2GDll9oYgMwroyFgsbsA9cA71/\nI3yQTbsxD8cc+wMUPZT3uKhhc8UXRVpSKLfQs7iFs5u5aRdWcnFBKe2Tb6+E\n7wNh8JRvPv2Bvtp4kI809qsH6gNcaqmQpZZRIr5TpJdfXCP0TW34mkfQariq\nTHQusfcNmeqaktPW0kAXW/D+J3IMO3dUK1y7A6lf+QdDRi7kZoOS2O8GQka3\nml21O+wxLt16T070UBIHkDOK+WOnd5iXohKEApDrmVFPOjeCGOYf2tU6JsJI\nk6jVcs6/wIxz5jA+WbkknSPrvaZwhLp1MxAdE31Y5IYCrfMLrtHKi7mbE6Js\nzx5cSHCy+9nfMszf6RSE0VjpU6GKKa6AZi4LaZxwb9ykvm01FAsjTxkDDXkp\n8cZqVdtFGj+/QJryBLN0+oVW6LETChkSIPlIw02oYKrWI2sHBaXpa/PA6hU+\nku+3QORzd4cbPb+Tnmz/+r69KhiT/O0M+GDMQIKZjavZNs0EOxWcecqfdpzR\nia5lr24C6uFoenNZxjivKClBRTg9fCze7pEcjli4+UV+KLIGnmb/hAIt2PNS\nzE02\r\n=aJVq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFnvspMq90ljOoEEt9rvYZtPgWq4H1upZpLWKZ0+7HrBAiAVYmR0nrbuv3XtqNHhR0yexqOqqJywY9/CmC1nbQ0Bkw=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-60947433b94a742934135019a379aa3fc5170747_1581488462623_0.9070336475370604"},"_hasShrinkwrap":false},"0.0.0-3df98845dd54cfa4ab911991fe414e5a79c661fb":{"name":"type-route","version":"0.0.0-3df98845dd54cfa4ab911991fe414e5a79c661fb","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"@types/history":"^4.7.2","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/querystringify":"^2.0.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","jest":"^24.5.0","parcel-bundler":"^1.12.4","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.7.4"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"rm -rf ./lib && tsc","lint":"echo \"TODO\"","unit-test":"jest","integration-test":"echo \"TODO\""},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"3df98845dd54cfa4ab911991fe414e5a79c661fb","_id":"type-route@0.0.0-3df98845dd54cfa4ab911991fe414e5a79c661fb","_nodeVersion":"12.16.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-kxzaxcUUe0g6ZIH8dl9p+tv1xVimZ435b7T63TuBZEwl2OlpiVsNh6Tf+h4nLfVIz+JeLJ87afarEByrLyeFFQ==","shasum":"d63c4b823d73141721a69b7e796287fe36a04510","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-3df98845dd54cfa4ab911991fe414e5a79c661fb.tgz","fileCount":34,"unpackedSize":69856,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeQ5/wCRA9TVsSAnZWagAA5fIP/1BZTBgqMTZZNSeFx/QI\n5uSJe/+wIoBG6wKx+sOwYEe01ZTsv/SHpjv7nQXRkpnUghIvr0YspnvoagQy\nJJc3KiL4lcfqoQ3Ugzdvymi28PODZLkCRmGlgX7+MLI83od5eBs2AeywXk/G\nzwQZYhuwSEdIdky7/Spr0F4o/e+GO4qznpwvo8aXNs9AdFW6yz4GjtdhJxCF\n8uhvp5kvtmj/dAy3RyzIhP5cqUCrtXbatZHKPwadqu3qRpIe3ssBLbz6JU/T\nCkumXIen4z9ViYU5HYF9bsxaaOriYYar1ypTyqU6J46tPVGosS9fG3ZmfNDR\nf5DEG77EAsuR0R/mi4AYickvDdeT2urCRo4t0H6stFFuTyweD1VAtsgyoNaz\n/1BJLTETX94qWMoNw9O5pZb8vQVZs9n7SANvvbGTTclqVeMWXOInke+Qjdzb\nvqkYX/cPhwhBkefUVGMe/H2B5JLW8cRX8dxjZ1Cl4LvwND2njed08e2OVijm\nxXWa2w37SGBqA3lxc7BEMNHMYPP/PxpOVNUeMMhtfW4J4QGXq7lIwibYCh/x\nMJ5vj7OjFNl3akvha8+Zo1y9ohPXOfVNcoT6Y+nFM/Sq1ZjArRMkq5ABjXtY\nYb3FzlSIzwCxkv6GjrPHJtMJ3vSxJg4aoy/S9yjdp3FdL4aF7J2Ye1afEita\n/OvZ\r\n=BdCC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICGlZXIRBlF9M0mgo5oriBodTp3dSetTssbVy/YxembHAiEAkfhFHFRVVRjrMIXs1KWvlbnv/IIR6duv5+OzvRZb90M="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-3df98845dd54cfa4ab911991fe414e5a79c661fb_1581490159609_0.9353782055488697"},"_hasShrinkwrap":false},"0.3.6":{"name":"type-route","version":"0.3.6","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"@types/history":"^4.7.2","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/querystringify":"^2.0.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","jest":"^24.5.0","parcel-bundler":"^1.12.4","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.7.4"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"rm -rf ./lib && tsc","lint":"echo \"TODO\"","unit-test":"jest","integration-test":"echo \"TODO\""},"gitHead":"3df98845dd54cfa4ab911991fe414e5a79c661fb","_id":"type-route@0.3.6","_nodeVersion":"12.16.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-RyAxlYYN8Slj1avJ/K5eg0ht53ygli0mKVgEtYYsatgG7Ki60RdNYwu6Nd7oQXhiXxgNOR9EqgGiWsIDXBniiQ==","shasum":"43d50cd7a5082e50fb85caa0871bd0d84621b2a5","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.3.6.tgz","fileCount":34,"unpackedSize":69815,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeQ6ClCRA9TVsSAnZWagAApNQP/1v0OZUG3Lgp2gJoVWV4\nF77EHvTpasz2p1g9VXO8gDJiB2dtt4gpLxMnFMynubJriE1oAAOYc6n0wEyb\nLyAookko14jwWBs1zPsCzK/Ekov0COBxfqD0bOi8Btv7xPM6mHufxIIs6dNC\nmw56pUuoj5hDmSXGx/DiaMHRKBV2WESIcQC7OMMpir9t9BpxnQaGnZO6pdxC\nnPwLjVxLEB0tZjcQPmsYC4mPQXoKf1TyKWosWGYY4uvzoI3MwdioUKfF87l1\nX1kYObYpIA2AYomE/+ip4EC4oprZAuEzw9q2kx8oYhi8P3xvUFuhpRil/qbI\nctcfZs0xXR6RyOdLbSOlokM5zNkgvJmp05Ay5gLEpUSuakA9XeQQysI9kNtV\nMJXgVHD3JRbYCPtBfMvqMH/kSiw5NqcC6AaY9SGtr7SaDp6cHxd/bbzQRQge\n5MVb+m4o7/p1A4Ze6X4ie6Je/oP2/muQfEvZs3oDIMAwjvTCUQ3yUYa7OpeG\nOYM3Y6Zh62Q7hq8nyJIT4s9ExRgy4lXtESPTsBQNi+HJNKPoLU2CDRJnoz1k\nXvwufGV/jteQ2cg6suw/hIBRM1zUtAY9BT+yoKSpPyFzJkGLZ9guMfC7kbeS\nTTTVCxBO3fSeoLoOjGqzY6obwH9Y82cWadkH6QuWeLHFIRNWkdfM+hn3tWaJ\nelsl\r\n=J4ZA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE4a6NL0sQuHBSjJQumBHSUL+Sxj/bgfGhz1epG+P5UcAiAI6k4UUHJPR+AdUoLu7J7vGITvzWs9JfcZbbnfbVHvsQ=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.3.6_1581490340976_0.4788025453335105"},"_hasShrinkwrap":false},"0.0.0-8898b35432ba05f11f5c0d311dea45d643b22392":{"name":"type-route","version":"0.0.0-8898b35432ba05f11f5c0d311dea45d643b22392","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"@types/history":"^4.7.2","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/querystringify":"^2.0.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","jest":"^24.5.0","parcel-bundler":"^1.12.4","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.7.4"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"rm -rf ./lib && tsc","lint":"echo \"TODO\"","unit-test":"jest","integration-test":"echo \"TODO\""},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"8898b35432ba05f11f5c0d311dea45d643b22392","_id":"type-route@0.0.0-8898b35432ba05f11f5c0d311dea45d643b22392","_nodeVersion":"12.16.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-TaX5YYoODf0lHeph5tUrr1g6bjQXEqhqhyuV3u0uuHaq7n1JwN5OuZXn8IO6GNJGp1BP2y1IA+olPqHGqZOBKA==","shasum":"44a788819cf691d47d0fe34fcc1f30583fc747a7","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-8898b35432ba05f11f5c0d311dea45d643b22392.tgz","fileCount":34,"unpackedSize":69856,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeQ6TsCRA9TVsSAnZWagAAQvsQAKJ9ZYt2RWLH2aBSLEoJ\nB3CJ5mvAWknaf1Kh15bExT8JrIbtvK/CokqLNZPlzKdnXTJazDsTVCIl7E3Z\nMqt8I66/KeOKCGlbnEZccKKoY7iD++ucJgkYwRKezmukYv1aefRr60UAOT5T\n7CIp7ODKwJMx8+1f+Swbqrj+i8qXvb6yIib1u//FmuyAXADWn3UTHmoQc+U5\nSX6hVDMSb/ZOTxPt8Uw5Y5cLrKuNIfWDsN+ACRkJN+j1bOyU3izafI7Hi7yI\nbTMzLouxeRKKHn6H2zW0qYTU+t6Wkg7QUZOCrXtHUxnwTjwh0D/iDy6B2lIs\nNJxuJFmoYAnSKJeED4/wgwVxPVDWgYBZmsBbtZD8z740luMx7PoOd827CFlu\nTaFM1LmZl3mGrTxX61087i5+8DTeSoZbXWXpRCU2qk6arUQyeCAfDpR9p0J9\n54BUoi+06EUjwKpKyWYOpLrJmt2SOweMiY2VZ32os60P2SK/y9fNnAZ76PFD\nw1MlJ29+6EuH1hXIGMZQR7rFYRsR1D6tZ1IXuOVvNKY59pVDEbLouE+knMNa\nKtk8igmZnIQii6UqTGzmKtbS4uU+NE5kEHT/TIULLLmOgf+71dLoqsrbXUji\nkO2HhGyaQfOeMulijGM+tty7wH1YqvC9iQMs5qQQB7sOINqWsYkZnJZ1GLzp\n50Gd\r\n=NGWb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC2e5baJDFl+npAefl5FPOGJJ7MXwjrJ8x8XZldLmsaVgIhAK3tIs4uB7tzUDjdu0TwTPCAx6bXAirdeynAM1ryEMmc"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-8898b35432ba05f11f5c0d311dea45d643b22392_1581491436459_0.276213859462592"},"_hasShrinkwrap":false},"0.0.0-9a7855ae14c64268ee43a74bacb68e948f6fd27e":{"name":"type-route","version":"0.0.0-9a7855ae14c64268ee43a74bacb68e948f6fd27e","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"@types/history":"^4.7.2","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/querystringify":"^2.0.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","jest":"^24.5.0","parcel-bundler":"^1.12.4","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.7.4"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"rm -rf ./lib && tsc","lint":"echo \"TODO\"","unit-test":"jest","integration-test":"echo \"TODO\""},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"9a7855ae14c64268ee43a74bacb68e948f6fd27e","_id":"type-route@0.0.0-9a7855ae14c64268ee43a74bacb68e948f6fd27e","_nodeVersion":"12.16.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-K5o9fNz00lN8E7rHPuP/WCoCk90TejWulQGkjeuDWGbksQKSn4fUVVvyR/EfG1nT/SA2kVXSyoKilKzU1UxqRA==","shasum":"1c71b9fab2856a4ab2d9a3f5fcdb5e4538e93600","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-9a7855ae14c64268ee43a74bacb68e948f6fd27e.tgz","fileCount":34,"unpackedSize":69856,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeR3c2CRA9TVsSAnZWagAAHZgP/jbZY198C9y6daauCnwp\nJSCR5w1aB7yvFSRmuF6dGdcOoL5NnUf3J4rmo9li9zUW9xDNbYTi1ECDNCpX\nf1SE8ztcMLOlULmFzRStkLbZu0rDSWIzhusWemMfyjn2T1LJr8PDl0PewvkL\nG6Mhe1dpqkaaQ+fb6D01JmuYjyRXDllUSGewA8EASth8L75QO32kCiptU3NM\nxXPNZedWoPM9pxQdwmIiuVCU+2UUGr+emnXdEnkn8kBpwuDKa7hTPF9aFn0L\nYlufJTYG0oDVyH0yj2C2unLR5SQQhOrDTbGOppofDK388paEWtXdTGQW1ugI\np+lBtMF7KqkxubXJ7Xu3MG/pUi98Lanw/b0BApioifISl0rgtdBIPnJOzF7i\nRFtQ7o39TwMMyuPYh0mJ4L6Iv+nRx663v/p8rYht43yvGE59iNozXX+eU2FN\nUJLT8KR//koXPxcxERjRxhIcZICbdWP4jfJ94H+q8a5BEykzt6NJk2nbp9pH\nrNfO/QLDP4MS2IUstvGgHR8uWvhv61khMUYOgfkFy98aqaYNNP4ZbJCRbNHS\nMBkwy4LaR76Rd5Kwf27/69AoN4KnvxfFG44Ql7VsZA+ZD0++vjuUTnHWmOEL\n1mOkq6aVVEGBMHsu1SnrMZTiU4dcT9Le963gOLW/VsU7XT1QyxFvgQFTXXE1\ny+0B\r\n=NA9/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC9kVfW+7CcUtc40Pt6hBfzi02Z86abFwIlzrVu707xrQIhAI1lXie6124wZ0uBV0kGyBuWuxMPF36SfNcT/MW569cf"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-9a7855ae14c64268ee43a74bacb68e948f6fd27e_1581741878111_0.7226597000374761"},"_hasShrinkwrap":false},"0.1.21":{"name":"type-route","version":"0.1.21","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"@types/history":"^4.7.2","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/querystringify":"^2.0.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","jest":"^24.5.0","parcel-bundler":"^1.12.4","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.7.4"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"rm -rf ./lib && tsc","lint":"echo \"TODO\"","unit-test":"jest","integration-test":"echo \"TODO\""},"gitHead":"9a7855ae14c64268ee43a74bacb68e948f6fd27e","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","_id":"type-route@0.1.21","_nodeVersion":"12.16.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-FNcJgjgm2RW8/t9ogY1H/XigWKQB+a5De+znAPwAxseSIyrttdX5REdXHbJaW6FDr629YW7EBqfC1TKPnFGurA==","shasum":"66e99f99d28d9fad8236c507ee0af8375c995546","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.1.21.tgz","fileCount":34,"unpackedSize":69816,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeR3gfCRA9TVsSAnZWagAAJMIP/0u8mkFpeEboaLvsJPCk\nxGHoKRKYWOcpq5pKBaPdoo2g/KRZZrVEDioZEmPaLP0XNMeMD84s8wTgyvt+\nWSlZd1c3vIGcu4satcUciA0P4Io+eEAAT8d+C+xjMyzt77u8ysRG4+8w3tYO\n8R1upcCfOl9y1lzM0mid43McWq837CG0ji2B8vhypQ/n9rpBX2KJMJCryYNj\noZsDNu4Ghv5QQBmhPjwjubOZ2srhjkKGrouJhwm72kXvxfYRZeF0qyO7ynMZ\n4fGYXJy1Rtg50UPATk3CGTn+FVuPHiJnuL/lm0tC+YwCRZjhbILfNYke1sPp\nKZCyHwX8DwNwgbZzWfQVeHfnSAy88E3vP2+k2sWu7Z0IteG30oL727ntGOY7\ndV/rxdj9ArL0JJ1FwRyaeivT72lJJOMYknBieroJyHlnZ01cIGczZidV7h/A\nMUiX0vYsQK+g5GHAAU5kWK9jqwrzbuVgBK7VrxV8WNhpL1bHGM8HH5ZSU4Az\nfQ2XOMDWaDKCGbKvEpIJ/6om2mJ0RThe3Rf6dIYSuCdF66JMXiEa2CJrUtSm\nNBcAj7sH6fSmBGPSkamZnnj4VWt0ztfrNoERHwgiYMxlztci/ECPTSbZaWoO\nMUN80JlrYE6r6TgnRJ6Q/2AOGK1jmFHP7F0H3Q2hZtNhZTayVHJnQMDIuXUu\np0UR\r\n=BWjw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCcdhfjc2jRUGd+MuWyhTpaoe0M/EJmvp3uxvS5GcejlQIgWkl3abbdTlWVjuy/rZj3X3/n6efwLhZ6cn2diFpaihk="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.1.21_1581742111474_0.30334655679389066"},"_hasShrinkwrap":false},"0.0.0-ae33b4d9b23125885be9c14f4d5005236fdf75ab":{"name":"type-route","version":"0.0.0-ae33b4d9b23125885be9c14f4d5005236fdf75ab","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"@types/history":"^4.7.2","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^25.1.4","@types/querystringify":"^2.0.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","jest":"^25.2.3","parcel-bundler":"^1.12.4","prettier":"^2.0.2","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^25.2.1","typescript":"^3.8.3"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"rm -rf ./lib && tsc","lint":"echo \"TODO\"","unit-test":"jest","integration-test":"echo \"TODO\""},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"ae33b4d9b23125885be9c14f4d5005236fdf75ab","_id":"type-route@0.0.0-ae33b4d9b23125885be9c14f4d5005236fdf75ab","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-1Q4AOiCULLh3hJYRh2Wsz3JNgChsbeYTYjSNiU8Udv5mFbHTR4p2EaizTjJmXAW7BbkJscnQ2qVMPXppZIJR7w==","shasum":"75b7afe7479ffd279dc2678507b44692c74eab79","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-ae33b4d9b23125885be9c14f4d5005236fdf75ab.tgz","fileCount":52,"unpackedSize":98081,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehjSMCRA9TVsSAnZWagAAl5EP/R+GyfEDWENfTbCfxVRg\nuFtdkvnSeT2NyJy2uBoisutGOa2i6Cz+n7MH5SnomSwAi+ZepEwV6rTH9Ziu\nmzbhL7EqywBp3Lic5L6dYB4QZGXjdpnCppj1ioyz478TMMxpLNFKG2FBoDk4\niF3xr7LGpNzNYO+79ej3O8cTgYoSLHBSpxHQz8ytoY5h21323WJS9OynlbYw\nvI7ArUNClDca5H1Mgm3VusIoeIws52sTT5QgvU7iyVTlIFgyOTmUsPRhgb3h\negp25iFL/WFzY0nGYqQhomM1+8xJN3kv3H4je6hvMqsvbTg7cyA+wP7G3Kss\n94pozD1GVKY1bPHW1HC4dhyFniEGEed7K/b1UvKMXDmmXO9ZjlnOniPSIuCT\nHHg3CnLQPWPDzY+m3fcY5fnkHYtFMS2jY+ZOVYWpLO47zWvY2FI9OZxqdAXA\ndRqM71TwHQbDADA1rRzW05/qaC6Pk8vHCDuu1tNHNRQDEe4AcOPpP6AlI3uA\nvLM5WhQadZe4SJ94X1KOwmga1OZrD7QSFqaKnXWNqaBJ21YTIo0xNKedO0Y3\nQFlH/8Q0Fw2yf2B9uaqYoAF5g03sbd6JmdYpz1s192bZJL6C3FxK6iHx8ouA\nSvin6ITqGqEyJxsg68rfoc6otEx0N8ytwqQvSY9vm29vFA3P0OL/u0I0DAZx\nXosb\r\n=omI0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCpQWIhFY+/bWh5OXoxD//GUG+o+PABfRYmhh2bhRdZfQIgDU0rp8yeQMY1xOTemCyvjBQIfwFF+9rZvQwEkWDIoNA="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-ae33b4d9b23125885be9c14f4d5005236fdf75ab_1585853580208_0.48716857612721265"},"_hasShrinkwrap":false},"0.0.0-a0a631e0fb2e8ca6df0bd4619854ee1ccd2189ed":{"name":"type-route","version":"0.0.0-a0a631e0fb2e8ca6df0bd4619854ee1ccd2189ed","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.1.4","@types/react":"16.8.8","@types/react-dom":"16.8.2","jest":"^25.2.3","parcel-bundler":"^1.12.4","prettier":"^2.0.2","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^25.2.1","ts-toolbelt":"^6.3.11","typescript":"^3.8.3"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"rm -rf ./lib && tsc","lint":"echo \"TODO\"","unit-test":"jest","integration-test":"echo \"TODO\""},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"a0a631e0fb2e8ca6df0bd4619854ee1ccd2189ed","_id":"type-route@0.0.0-a0a631e0fb2e8ca6df0bd4619854ee1ccd2189ed","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-t3WqAjixw035BOTn5TS2Js3L6M31bncLmhGDMI7X0q8TVSZAFaTIYvvdnAGDfSMYaTjA3pzI8SF5JN2PWF3yBw==","shasum":"69b8df7f68ba0acc481b11c16268b9a9d5d7bf8d","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-a0a631e0fb2e8ca6df0bd4619854ee1ccd2189ed.tgz","fileCount":54,"unpackedSize":99538,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehooOCRA9TVsSAnZWagAA4tsP/1qNBZEJP30ZqsqKGMTW\nJttfT+8b/ABkWVE4zsL6qh50sbjoBefsft619YdRxncnb4WofMyKgoWkM8W+\nBlh2DXt+l8H84qyY9F0vy0TEovzvu3xn5tNuSBS9QMFOWDqo+hnHRsck7aU9\nAFkYfZxk7Rr0abbcuf0H4CKZ9VL7m3ktJJxXOZHiiS1WNFgdCwKZ5Q/FxfRh\nOay/6eHovGMVFCzYnlSaV6dPEiJJNQpctS9Xhx1/njl86tiJlvf/jvZUl1Zt\n43ykHiSMPHm6uMpkivBf4rG1aQkskTZ0vAnGnawE17FCHGgGYOgt3MGzX4gj\nIcDj9EMGDeSEKN6oPSAnzNtuOyRvQELsVN94Zf7suwd50LpkC+v4L8TCRkBK\nBiGo1AldDnSw8T1XIpqIqkfBMlM86SNLulciH4Fn1cwbzxii4v1hKsjFEQBi\n0hTJBpkaiauHCJcFuzcJPDkKwaXHcJJHVYERZRnDXc0kN51p+i4eBQlDX1Gm\nHOUV7z46MLcJeiFTi3yP0UNjkG7CQO+Ysi3w1vu2GRIQ1UqeHtULVWlMZCBC\nMVTMarkLasND6h2aZdRdbXoNp9yddr7d5o3tIsuU23f2N5qtiUXNL20AnDMt\nf0KhEwcfW+ZiXGaSacLwASm4mpkQLPPbdQedIB8J4505ZpiTfQNUvN+ecl6S\nbbdi\r\n=nDPA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHGt+yhJU9BdsQbR8JJNakYk3u+E8UEAhxKC8t3qCBrUAiBXB1XcFQrcjtCxJ7P2jZwX1/4GgzvOvKxGqmkVQE8A9w=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-a0a631e0fb2e8ca6df0bd4619854ee1ccd2189ed_1585875470460_0.1294048678683033"},"_hasShrinkwrap":false},"0.0.0-2cf32c9d62b46e95816b7f02ab6ba23f08caaec4":{"name":"type-route","version":"0.0.0-2cf32c9d62b46e95816b7f02ab6ba23f08caaec4","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.1.4","@types/react":"16.8.8","@types/react-dom":"16.8.2","@zeit/ncc":"^0.22.0","jest":"^25.2.3","parcel-bundler":"^1.12.4","prettier":"^2.0.2","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^25.2.1","ts-toolbelt":"^6.3.11","typescript":"^3.8.3"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"./build.sh","lint":"echo \"TODO\"","unit-test":"jest","integration-test":"echo \"TODO\""},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"2cf32c9d62b46e95816b7f02ab6ba23f08caaec4","_id":"type-route@0.0.0-2cf32c9d62b46e95816b7f02ab6ba23f08caaec4","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-JKBc4FG83FrYtGpg75tUNK8I39Yrs1LMRbkhkF0w2U8KCuyRyNCf2y9cI6TVLhScjTYkDBd1XW2iq5JZ6L2f5A==","shasum":"33c90e0db88060d29c7f40eeff6576d563a87e8e","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-2cf32c9d62b46e95816b7f02ab6ba23f08caaec4.tgz","fileCount":6,"unpackedSize":84525,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehpagCRA9TVsSAnZWagAApcAP/icnTB96V4ptyqZm9pca\ngPsV8EqNYZicyN2ngqMLIfeceWoT+wB+UY7ixgrdjpie6tq1wzkogga2siwi\nkq1krLMoQNWEAF/EPDkwBxm4ReCJXnr6kJwmRAs8pvF3YolykfB5OXM7ZiGl\nemNYx57nCDm8WzwTSjlamB7c/n4b0oi9TCcV8bx1a2S1irC6BDd/epzDA8NT\n+CPLrl6G7wf6PQaDY/9FpzHxkfTQzShosYBGzgKYAEb+yVONZVm/gQHYaUUO\nyV3Lt5PvW+N2TnraQT6orjsbyeUqb77VTcXtHVjZxs9rypS7rr7N1OlsvG01\n6jvzYGaLTcX+FJGIMfzE26R0J7YakTAxrz4nZGAQFTo4rkPnG7WHvgXfNmQW\nClfdvFVtaBEJOI9XwUjphmY+NbA81eU06XfXJvLQ51OOj1KZ/IVzzcWtXCk/\nyS/R6wPkmz9leJDP7DEAJdL18chAauAjbFlo4Gm3EbeDOKIoGqxiVXynaFbx\nKZM3tomKw1zdapDfBtxrtjUJDYDArhnbBjxvH4eev7JwqMaTthT4lCGduLh2\nNXZtI9FnzLbUMC78p1JAwb4GGoSLYLlvdJyBlq/teUtHqPmipPYd9WJ/x9LE\nVSjkrYfx3EBfrWbJIEo0XYqNwWPNkRvrSpvA4u92bt1cfG9yQNoZRIjmxJ0P\nPI8j\r\n=jNqe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC5lAhiixsABVfH82JDPBHgGxne03aDVTxrnljJz2s3TAiAv/cxH8A0qjvYp3bqCaXkr5+qCpmNy7TWEWx37qbStYw=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-2cf32c9d62b46e95816b7f02ab6ba23f08caaec4_1585878687781_0.3688117456944193"},"_hasShrinkwrap":false},"0.0.0-56c8471820f5f5e024258e1ce9b9edb473714834":{"name":"type-route","version":"0.0.0-56c8471820f5f5e024258e1ce9b9edb473714834","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.1.4","@types/react":"16.8.8","@types/react-dom":"16.8.2","@zeit/ncc":"^0.22.0","jest":"^25.2.3","parcel-bundler":"^1.12.4","prettier":"^2.0.2","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^25.2.1","ts-toolbelt":"^6.3.11","typescript":"^3.8.3"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"./build.sh","lint":"echo \"TODO\"","unit-test":"jest","integration-test":"echo \"TODO\""},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"56c8471820f5f5e024258e1ce9b9edb473714834","_id":"type-route@0.0.0-56c8471820f5f5e024258e1ce9b9edb473714834","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-Cxu58h2TnoBe83HIccE5yAs+5YzcdDxen0Mknt6A/z6hzo9KLJvG7KXcn86SX2Z8rUTol3agaxduF14ksVu1qg==","shasum":"f60160a8f4a20fb0631e4a4f0c3046c199b23a87","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-56c8471820f5f5e024258e1ce9b9edb473714834.tgz","fileCount":6,"unpackedSize":84182,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJehpzTCRA9TVsSAnZWagAAas8P/15e2mAtrw7wN4tAxt7k\n4RfloDutD/i+dv/1L10G5jaUXtVtPx/lFDUfUUI4IuB6UnpvR4ohzhIUo6oY\nXg/rZKOnx85qDLPGC1EKmOHsPvR53xUiZNUECQpLpALHZ6p68mphMVY0CF0a\nb7wkCHtSy1lHykjsVj+Cg7MAQvX9CE6pnu1M03aeZstUjZGlPwLgoylEJ41u\nlhXGfwyd+XEJpNTYhps7hI/c0omHxfxV8mQu5eR66vKdcLmg14zJ3wah7BLt\ntDdiksjhk/Jv8cj5lDIx301TksPyfQJUsrBYgn4/UGUYY78/r11i3BIbA9g6\n4UkIyzNZX+qAO8YSMHOclDHem4hk9B+QgHqu4vDo8HbIrOteUbms4K9/G6V2\nfrZAv8ZT9Pl2+CBsVRiwt63WmOqAz0p69BFi7VO6m1giS4QLwn5bEzw2xJaY\n+ti3+csvIFWgjCo1L33PkuWd75dE3QqEObDDDmbzD8WmDHjqF5VJ4QnjXLzJ\nxO+n3yzoPJxpiEaNAUB5HSUm2kxgXnixuhwaRhguFtUkQ/iMqNAComL/kiXm\n8OE1/EMeG21P5eUI+ttd92l9kfJPRb1WsFdQtxEXixNaYkxjNYPqh/f84kio\nELUgSxA7eijpfNav8QW4TQTeNfWoZQma7IOTgilt46fXQM6jHcy52c+EAYTC\nCzge\r\n=kR7r\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB5BWC7HEBLmVk/nuB4+N64y3f4lpqGvMOMQb5vQDmeGAiEAkW+IfhwzRpYRtLBK4P92y+a1HnfJcGkN8sl2c1W1hTA="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-56c8471820f5f5e024258e1ce9b9edb473714834_1585880274676_0.36739286368317003"},"_hasShrinkwrap":false},"0.0.0-20a2d77430604cf0a23f1ff59f38a00dce6c0d96":{"name":"type-route","version":"0.0.0-20a2d77430604cf0a23f1ff59f38a00dce6c0d96","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.1.4","@types/react":"16.8.8","@types/react-dom":"16.8.2","@zeit/ncc":"^0.22.0","history":"^4.10.1","jest":"^25.2.3","parcel-bundler":"^1.12.4","prettier":"^2.0.2","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^25.2.1","ts-toolbelt":"^6.3.11","typescript":"^3.8.3"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"./build.sh","lint":"echo \"TODO\"","unit-test":"jest","integration-test":"echo \"TODO\""},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"20a2d77430604cf0a23f1ff59f38a00dce6c0d96","_id":"type-route@0.0.0-20a2d77430604cf0a23f1ff59f38a00dce6c0d96","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-E9iASjElUXWUwJfnXNNKvkx5wWPM3XzyJJ09UvweXk+qtQcq3YSbrSkXPBmAYbXfo3sa1ux59hcd8ky6hWBG7g==","shasum":"9f464d67a4a296f33ded6e064f385b4bbd95ed7d","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-20a2d77430604cf0a23f1ff59f38a00dce6c0d96.tgz","fileCount":6,"unpackedSize":84190,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeh37SCRA9TVsSAnZWagAAwZcP/3XkErLjMuDf1WPexXSi\ncrxxBwx5nZgoGW3/Cyk7dWeTCmQRS1zeYKYFCKjLvpuznBL5W2nwH555OOhP\n5oNCo9hZRQ1CeSi1HkHODbfghWM3JdvfQu7LakePytr0oK0ieeC6WpNK6Njp\nvIVtWyrZzgn1tlV+XLVSsJ1HbwDbqteWmWDyhTjNRkRP4j3ZgFU7orNq11OG\njo8GqpO1+jnx05vRuRmYJ+YvvL5RzPHRhwZbDITZYP6rOh2kkeZd51U+3L9Y\nK502CbUXOuPsPlHraRBR1Ww9TXXMYlrSGQhKqT6mNvO5K3Vj6S/uEVO+I7WY\nPfrgDoTPVAaeSZDqqLJ41vbaivmJBll1ekJXdevXUUnUS3/wJLGSDzK7DYqh\nWXDP5bdSvLsYJg46F3chCIFpxp7dz4qo8mI1I4F7hXc/9XCoMOwAxOtoWJcl\nqzLa8m1vqtM+r+AhnDmWv1soN50szzJ1JiJRTUI14rzwSzYIRcsyDnvmcpTN\nsZxUbru37gWC+RmKXP3KFHzQhv9/3iyJla1Pe3doZBDgv+dAj4kQdlYzl7ZT\nmiZlzUwNeOPKLVeKiLNujnHEof1xKJ4vyvuyosbtMtBbKOSRyT1HpjePzmnD\nVIgxffJXJnrl/JenpSx7PUDLNsSRu30Yvc3GevuM3XmRtPPyMTmKgm3A29/L\naMxS\r\n=voyl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDxjzky1v+qpMSxMcoff4AcG01erYsI/p6bmq022EaB1QIhAKhS5NEoJ7A0vpWIN3IaLilcNyGtubxPT+5W2kY69K7O"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-20a2d77430604cf0a23f1ff59f38a00dce6c0d96_1585938129884_0.08756002167619026"},"_hasShrinkwrap":false},"0.0.0-6b61db51c3d437ea50ccaa806128acbf2a26dde5":{"name":"type-route","version":"0.0.0-6b61db51c3d437ea50ccaa806128acbf2a26dde5","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.1.4","@types/react":"16.8.8","@types/react-dom":"16.8.2","@zeit/ncc":"^0.22.0","history":"^4.10.1","jest":"^25.2.3","parcel-bundler":"^1.12.4","prettier":"^2.0.2","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^25.2.1","ts-toolbelt":"^6.3.11","typescript":"^3.8.3"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"./build.sh","lint":"echo \"TODO\"","unit-test":"jest","integration-test":"echo \"TODO\""},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"6b61db51c3d437ea50ccaa806128acbf2a26dde5","_id":"type-route@0.0.0-6b61db51c3d437ea50ccaa806128acbf2a26dde5","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-/5zuOskg/4DNNQknPecjMydlVOrB1i/FIO72FEmsM5xjsBcZY7lSoY12c0mlT9BXqeKh9IJhC3Tay0iENfaQFg==","shasum":"c3efbf02d2cd89b30d0998efcabac679833e5dbe","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-6b61db51c3d437ea50ccaa806128acbf2a26dde5.tgz","fileCount":6,"unpackedSize":92672,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeh6efCRA9TVsSAnZWagAAiJMQAJFUloM7JYxLYfdTP0bh\n7qX36uYeNGeOlZd0eAqoYA23/52cxor9x/jM1g5UptXkHX1DvfVn/BfKGJBs\nL/DaYSMk7oQ3/15qxqVcIqlHuxsfDvQpqak2SEM/38z9piqS+DvIm0dl+UOv\nCCK5vX/J3oUWzQRq6gZ5d6xWOPhwGp/zz4HGyrgpEoHP641IXptSGfPixzPt\n8PlPVzsAa5xHkGpCASnIsI48L93siBFd414OEq2RY1f85eDZ6h6KVgvxWf/Q\nPNdv4ugee4dgDD8F45sx6eSvpOC+Cp7ENoukZwLC6mj43XmGSCprcRZ4jBIx\nz1uXhtfchypbZiHnnxDAc9Wbck7xSjbFyuFvE64Z4ioeB273c0qOsKwSLSVS\nWAuW2vqaqjzhzjzdlJEaUnVbAQ+/iWYgol2+JyyXx5ryklQuypUIJKEyIUSL\nRUFlOCCENrGSsJry30NpJsDhDNC60Gg6yMOMxVJ8ckI4RGzkFHiA0o6s4g3m\nIX8CWHSNm5d+qZM0NVJIT/qEmOzwrnbVUSEmKfNBu3MpxH/+KrwJSXvXu0ik\na5JCgef1A+OfH0I9k4XON0yuqNsTp2+55xFlCkmHLNXFHMZRbgu91+C1jW5n\nZyiSfIY4vHXT1TPKSYWEw4+cf83RstqJaMgSopOI5saOX8tiMiiZRdbXoV4Y\n4aXz\r\n=23O3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCwpiqUYQNuFG+/PdOojwm0qzmYqKF0ydFcqd+r49t7fQIgJeAND2VrrgFk5UK9ZD8eRGnnT8eRxE14ncts9/UzHxU="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-6b61db51c3d437ea50ccaa806128acbf2a26dde5_1585948574417_0.7754889023623293"},"_hasShrinkwrap":false},"0.0.0-e3ec9f15fb3ddfcc94e4e02c6413bc429cdf861c":{"name":"type-route","version":"0.0.0-e3ec9f15fb3ddfcc94e4e02c6413bc429cdf861c","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.1.4","@types/react":"16.8.8","@types/react-dom":"16.8.2","@zeit/ncc":"^0.22.0","history":"^4.10.1","jest":"^25.2.3","parcel-bundler":"^1.12.4","prettier":"^2.0.2","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^25.2.1","ts-toolbelt":"^6.3.11","typescript":"^3.8.3"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"./build.sh","lint":"echo \"TODO\"","unit-test":"jest","integration-test":"echo \"TODO\""},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"e3ec9f15fb3ddfcc94e4e02c6413bc429cdf861c","_id":"type-route@0.0.0-e3ec9f15fb3ddfcc94e4e02c6413bc429cdf861c","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-NTQfE69nCE2ZLnLauEgYNLZrAssuOAHKLKJ7PxILMNfE2CEnslSasjYLi60LCm2Ue3ZJpCFxebqPHbvC3j7Qkg==","shasum":"2145f50765f96c524890aec088c9e128e1c53f97","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-e3ec9f15fb3ddfcc94e4e02c6413bc429cdf861c.tgz","fileCount":6,"unpackedSize":92672,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeh8/pCRA9TVsSAnZWagAAjiUP/R7tAMQjEGQuVnmbdJqA\nM0oCWA2jMDCyrE9lzkj7+2r4DMMVW497XJ99ofno0w3AKv48eVTNlr/ldGLF\nnWYeHAq8PNphp3imE0jk/91uBUFoYlZOWsObg8m3uKUeuKCAhm313FCr4dkr\nbXdrQXitG/GOx+z7ZrmN0/zBY7LDEYQkR9Uq+FIbTpKKoyXh/C9CN5vT8ATo\nXxdWbdJgr85oEd+VezKNQo+lfQZtrA0R0czD9VsQxMVEh+pwWYCgKcgklRxs\nhN4Q+k+OBVGyoLKrJanF9/Q+1hWKJUECkNMDD3ZRj/spsGtLpweDMV/UqU0k\ngC9oZF3CgA++55Vk8i02mC9C0BIRi7kNmGRXcEwk3ss+OwWrqsZMZiEmhoEl\n7Ri4wit7YfHDwUtVkzhMx8hkQWrpGjUi9mRL3T6t9aVorgDgY5fq5SJNDlMm\n/0yinatNPFN3FMJf3j1hqI55m/o0xRuCbo4YlTnptzrh4DtTr7JCJsjkwE3A\nigSQiA9emD6TWj9mrFJQ3i5yGunrnsMbhsyD3tmwwM00VpBCyfOCaR/WEJQZ\nHXJysSEE8vqIV3P9HeTTBj8BfsW9dr+BLkvqHST6PyQQxh5QquAboHL+EhQ5\n5YvQXsHXM7YT3fAzi3PQS/9fvPnFmAkvoHfI5xBxX0kACABNQogeDgeiBJ9f\n7O8s\r\n=ilKq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCsb8z77J+gD5KrFg0atldQNQL7OQy0W0AOJlBujM4XcAIhAKxi2NLoaO74atvx3msw+V0MpHZWobeEWRdtklIgIdjF"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-e3ec9f15fb3ddfcc94e4e02c6413bc429cdf861c_1585958888801_0.6017745630301332"},"_hasShrinkwrap":false},"0.0.0-bf0414822845a145884d1e7ba3c9c91d800e1bef":{"name":"type-route","version":"0.0.0-bf0414822845a145884d1e7ba3c9c91d800e1bef","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.1.4","@types/react":"16.8.8","@types/react-dom":"16.8.2","@zeit/ncc":"^0.22.0","history":"^4.10.1","jest":"^25.2.3","parcel-bundler":"^1.12.4","prettier":"^2.0.2","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^25.2.1","ts-toolbelt":"^6.3.11","typescript":"^3.8.3"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"./build.sh","lint":"echo \"TODO\"","unit-test":"jest","integration-test":"echo \"TODO\""},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"bf0414822845a145884d1e7ba3c9c91d800e1bef","_id":"type-route@0.0.0-bf0414822845a145884d1e7ba3c9c91d800e1bef","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-mhQxZScmODO0zb1V6egoz56o0pMpbNLHtqN6gAT8WwUPMmnav/mv/NqCSbQlaS656HzL+vG9F++6SLMpax5RtA==","shasum":"a7dc973a7aae862566cd226151ba4770218c9416","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-bf0414822845a145884d1e7ba3c9c91d800e1bef.tgz","fileCount":6,"unpackedSize":92800,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeh+AyCRA9TVsSAnZWagAANboQAIT1HruDF1coluJXWwkU\nVIxMxI7aax6A/yQre9ftIuZqdimNpRC3CT2J5KLxbFFzDL+eVLKXLmv+/h7p\nrjnG2yiEaT1v+wDON4fj9d9HkvWpDHxJaZD14FmJferAkX0pi0U/pyR3PCrN\nqbqZC0caJB6fex2hg53rGSU4TZsPFYuDu4F/JD7Hcq+6EZWhImzz2snFskFo\n7mIhrOyaDMeZsPLdCAIMiBbh2QFtfhhOVjKfF+d/BQaq0rovoqkFhDzzAhEW\nqZZinvTxdGZpz8zLxbRI0wdVuQ4k3nw1s8IAereenKVrfOhsIKeiys25SGJm\nrk3nraGEkIOp0OFaqr/kS/V7zVDhhXKQTpGMt/LeFkIkzfPf35ZDf/Xw1EkR\ncxikUv02cnD3YTTzsEwjIx0PFucfuyyq0d7CHVOzYXBHVSZK8fuwOp4pwEzw\nWp+WCi5I+YR4LrUIXBkwcyczL5M0ZEkoXza56wD9M2HMutT6vJwgqXU7Pt0C\nnR+9WBLhyFGxLY2oFw/w19TfUWO8mSMNuJWBferMxPFnL99f/CHTCs6O2MWU\nZ3H9wE4j7gkEw/uux0c8vabPqQ3uc8EjsNN1rqbIIUY97VYOA4WfP5PP3MXw\nopk8V6jpDUDBekhSpTjCvzqWlZJKnK+p7/C/m9J6B0h2070iwyEPCAjSqx2T\nQgQ9\r\n=SCT9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDD1y6ed3Zbt1YNRf7kSmapowiBUZzreaEqa8EMACvW7AiEA5skXK/9QZcR6gBU3FAtSG5pM+SdAaSNsr/MWvRAwn5A="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-bf0414822845a145884d1e7ba3c9c91d800e1bef_1585963057744_0.2801324087124575"},"_hasShrinkwrap":false},"0.0.0-0861befacf5f964b7b284f926129cb8d94bf91ad":{"name":"type-route","version":"0.0.0-0861befacf5f964b7b284f926129cb8d94bf91ad","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.1.4","@types/react":"16.8.8","@types/react-dom":"16.8.2","@zeit/ncc":"^0.22.0","history":"^4.10.1","jest":"^25.2.3","parcel-bundler":"^1.12.4","prettier":"^2.0.2","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^25.2.1","ts-toolbelt":"^6.3.11","typescript":"^3.8.3"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"./build.sh","lint":"echo \"TODO\"","unit-test":"jest","integration-test":"echo \"TODO\""},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"0861befacf5f964b7b284f926129cb8d94bf91ad","_id":"type-route@0.0.0-0861befacf5f964b7b284f926129cb8d94bf91ad","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-GCpk855v7QWK2DcEMM3q5qCvphivv8F04K6werd4L4WZ1IoBE71uHNfSP5XnaJnL/d850TvBm4gfKlSDrLzh8A==","shasum":"5924e7132352d48d4b960eddfe93eceb96ccfa53","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-0861befacf5f964b7b284f926129cb8d94bf91ad.tgz","fileCount":6,"unpackedSize":92914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeiPDuCRA9TVsSAnZWagAAruYQAJbmhshcjT3d9H2EY+kZ\naN+TrtHMqxNs7q9Q2TUob39xlFuF2rH5JrDqjYS3kQUeQZa8cTevVB95p991\nVZdL10nE/irw0vEdN2aWmiBDpTek+QJuju0jDyTJXNY//d0R+cemxSi+5oV1\n052Ft1Us+ginQDm156J60feRE1r56Mq1Hh+AP8c7CwSCRvjRvAhHjGs+Pzcw\nCb9dxMoLqzgZGz7KuBMGCyKaNVnmWuYnp0PBIIdVKlmu5nKg27mzfsDdLqTc\nHN3KVLnG7dYyndsRTT1MCCNixez6CGlDbKj5Jr8giE/GHEJw0QN7vlT3TT0Y\nJu89Vz/EnLq1iQp5+jE2oH0z/8bTycUvq2bdwQ+5sci4E+47/om7jBb03Bjw\nrSI/QnmpSOLFo6D6Y5idSGSIbuyY6yIjApMi4r1lEcwfkngu7VYbuDSTIEEs\nOuooAqVy0yyWzUzOhOwiIuakM1SSyQRgkB8+Modi1SVeLW3FPlGpQX276ASc\nFV8GzzadfaN/g1M89WfAq1DEs48yulYHfEdeecXAAXhMK47ryVWAZg/nJhZh\nPxZj0WXCYWQhsFOetDHJSwb2iotR6ned0Fm13naGc+SNj7j3JfC92hSrZ0i1\nNud0x3jAcbRJtL5n2r7DRCz7mbQ6z4pIzSO+GEXT0NWbzS0P9G3eE3ity5fO\n5h9l\r\n=jwAr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDvJlz+uuBQaIWfKLDqCN5pmV3wT69GB5X3cSbvcAPVXQIgUkjmYNHy/FCvdvPKzCapqmrpu69PnR7OGpNL/lfVqx8="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-0861befacf5f964b7b284f926129cb8d94bf91ad_1586032878117_0.4757458440571203"},"_hasShrinkwrap":false},"0.0.0-bf3914046f8ff129d9999aa5f22f0ca3d789edc5":{"name":"type-route","version":"0.0.0-bf3914046f8ff129d9999aa5f22f0ca3d789edc5","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.1.4","@types/react":"16.8.8","@types/react-dom":"16.8.2","@zeit/ncc":"^0.22.0","history":"^4.10.1","jest":"^25.2.3","parcel-bundler":"^1.12.4","prettier":"^2.0.2","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^25.2.1","ts-toolbelt":"^6.3.11","typescript":"^3.8.3"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"./build.sh","lint":"echo \"TODO\"","unit-test":"jest","integration-test":"echo \"TODO\""},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"bf3914046f8ff129d9999aa5f22f0ca3d789edc5","_id":"type-route@0.0.0-bf3914046f8ff129d9999aa5f22f0ca3d789edc5","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-KcQr7rf1Z92c2/MYclrgVgEYVZwKM8ltjQgBz/UK1u/8H7aQD0U2l9QoIsjWmOuM2xYWAmPiHGQtUzBbOUZ/Zw==","shasum":"121a684290268cf6a01fe484468df003cfa4c7e9","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-bf3914046f8ff129d9999aa5f22f0ca3d789edc5.tgz","fileCount":6,"unpackedSize":92932,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeiPFZCRA9TVsSAnZWagAA6pcP/0mobgUL9GZNz4LmB9+k\n/kChH5YfDtRhoegymHucoJvXvHd9HSXBXbxbOd0jcF9GpQtrdFlwFpWDbXBh\n4+I5rifPMjJxsJxOYy6UAdP/VAPArha9jmwg31lHslpbhQmVGjO6OiAPd91N\nIQtSFjy7agQEXkgDseRy4Mc0diEDHqI+bOl/GmCgCjoMhFKIu6CXt1+3RI+S\nmH9xzrQVp6gXC8A8cuwMqRdoetCZvPN0O0AUmHVg7YdaUY4Fp+IzrlhJLelf\nQrXnDsFxzDtQa4H+XJPRVJHGYOnf7EElVb+P7WUhHTZrjhIWuEqtH64/g2L9\n0Xd90Gtvr7UpByvui5hMRjT0gbv43JyWQnl7lQzRUGOsfNyVX8wMX/EDJMcv\nNEz740Vx9QBVvxRhziuoIaVnbAhjAxPNVV/3zcs84B1zQIQTp8iUZYpPQjr9\nGloDVYdBb0cORqsJKK/9t8Oz/mkXXcpwPf1wrh8MI7gU9foBJeRHb7xiELvF\nXWohsXVHZivB3XNAjDl8uJlocvxz0OMQJlT/PA1S0frUTgHX+HTh7lK3v6BH\n7zJZ4MKehz6UzwL3fsZctJBvFlevWxxVT+1r48W/PqDx4nwUaZL2voaGkWeS\nmr95Acy7crr0zr1qRdBXTv1zjcrcsGxj7LNf2xnkwWefy6zsj2VJG/1PLPB/\nIc7K\r\n=Vfgh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDXVAjDvCfvRELw1dThOOJgqWk8byDhz5dFQrNkrUic1AIhAPJyjDVmlo1IsB4AgN6qXX7OazPFBkp5nZl6QH1jmR5P"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-bf3914046f8ff129d9999aa5f22f0ca3d789edc5_1586032985550_0.519205689213226"},"_hasShrinkwrap":false},"0.0.0-65c9c671ed0ac2bb0bb2b02f612613d63549e0c2":{"name":"type-route","version":"0.0.0-65c9c671ed0ac2bb0bb2b02f612613d63549e0c2","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"@types/history":"^4.7.2","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/querystringify":"^2.0.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","jest":"^24.5.0","parcel-bundler":"^1.12.4","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.7.4"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"rm -rf ./lib && tsc","lint":"echo \"TODO\"","unit-test":"jest","integration-test":"echo \"TODO\""},"gitHead":"65c9c671ed0ac2bb0bb2b02f612613d63549e0c2","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","_id":"type-route@0.0.0-65c9c671ed0ac2bb0bb2b02f612613d63549e0c2","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-F2X3cfUSJbZJys3xC5KVxH+NwubzVwKW0SfEjAK0IWFG+9eiWkHT0aM5MpEKMLl/RKfirOOX+ImiTg6js+aLpA==","shasum":"a353599bfec9dcf0d61f0099157eb196b06f46cd","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-65c9c671ed0ac2bb0bb2b02f612613d63549e0c2.tgz","fileCount":34,"unpackedSize":69856,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeiaQ6CRA9TVsSAnZWagAAUs4P/08Ae+1jkkPUG3YYUn8V\ndkfg2axw9rV68NB/NdD4VbiDs2QsIFwpiXtloM0YczTwpn1WpSOIWX0eK2ux\nRZPHMkZ4fDvo987Q0UB4UWHSIEOBktBX9ep5uZ4T5HlcferOe060hQEz2CTA\na/NAYNHXrzu514AA1728a6n9bvjZ7GZBTWIGXEOofv5wRUlcgH274mMrkUNh\ndFsDP7rBfawLR4NMX1sOPKJJx/0z1EXhBNuuEBYkKzSg7FA8iqTz1/bAR0+k\nu5aiCKkGNkESc3d7KlmLnVYAYlPnPCmmrpefZB0pazVoDbDGo6QgZj0fqTp9\njHe827Z6+TmFOVnKk86qaZ2yoh9/o13G8V5iQhzzPuI0eMm5/dME7yQVVBXh\nvDaocMrnoFaIJ2y/XOq5Ve3m7+lDv5Dyxfcr9cniczKN7BtrXv8THq4MWb4c\nEbf40EeSYed9lS/TLmBogEOmyHA/AQktsVfYGMQQjIsps2E2IZoqA8YITc8I\nVwlCjtKOILAn/xlOYH8p6o7BQbCjwWJY6+Fvm8C+J9qI3nN9p/FpQEsbDJeP\nfh0/NCLKIOMkWKUcuSyNj4nNaEkIv6Zw7At8C2XWOy0dlKSKl54J/6QWA5cF\nUp761d5NLwYVM0n57wxMvjzS5NhsOAocVhiqd4/BPWlxjEK/9W3RXRYT/HvI\nPAK+\r\n=2fuA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCsI/8UxEWUNVnvTwzscygYW2dkgWh+xGsqKzWrON3cLQIhALpi2QMCOZ02Cw6OkjVLdwpBDlBaqvz/Dwiz3oE4H8MQ"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-65c9c671ed0ac2bb0bb2b02f612613d63549e0c2_1586078778447_0.2975653503224134"},"_hasShrinkwrap":false},"0.0.0-7e46cb1fdea9a63f51d101ca0d9aafb0522527f8":{"name":"type-route","version":"0.0.0-7e46cb1fdea9a63f51d101ca0d9aafb0522527f8","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"@types/history":"^4.7.2","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/querystringify":"^2.0.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","jest":"^24.5.0","parcel-bundler":"^1.12.4","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.7.4"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"rm -rf ./lib && tsc","lint":"echo \"TODO\"","unit-test":"jest","integration-test":"echo \"TODO\""},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"7e46cb1fdea9a63f51d101ca0d9aafb0522527f8","_id":"type-route@0.0.0-7e46cb1fdea9a63f51d101ca0d9aafb0522527f8","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-Ht8SSPOlWQjxGOhXo3Jm1HdX4yUn7YXJflnqNZU7Pr8Ii6pJKXW2dWaxFLvkTknvOgEwjBrS0nF1sjjhVS1nIQ==","shasum":"afaf1e01d2531d6e4aa7b9e6eca6530b17b5f179","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-7e46cb1fdea9a63f51d101ca0d9aafb0522527f8.tgz","fileCount":34,"unpackedSize":69856,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeiaRICRA9TVsSAnZWagAA6YYP/RZ6aPIMWRtiUmZGWTVQ\ndx2L0kO6+6TRi+eCePEgkyvhm5OXDjeAj3bQTETN8Zdf2Ssur00pg8N4mYpu\nXmdV3u9nVReT31e4r8Vr0cQzK/BfsJfApYsYFdhLbjIuHxxtk4zFtw0bwmFH\na0FFC7/HVAiqVSoql+djVoTYqj7R57AZPYAkSdbBgANJjncrjsyytDHdzLdg\nAOfTrvIz813TlDoJ+OtKWKzNZ9s19Hek4gDBdzFFmUaSV0TF6LSZ56VxAaNr\nn97Ea2CKT31b2RV0g8IKfnBHCxyIYYMIWg9R9/z9TgHfvck6/MxgadTiZey/\npgiCSPCCQdpO/ZedQGlN5w4K/vprfVqesZnrNpoCGF80s3DS1rGqYMfg8Oif\njSQTT8BN0JK2KrmD+dKY9Q2Gqf5VgT36DYWe21xB1ElDteuJ+I9QRzMt9G5z\ndKX1R1RlZhyr24ICESlsjr3xWRC47mudsUibVHI0ZCFrtSJVg9IXKqy3MbbH\nspwmSobWLYGpiyvaTACNN2iWp+7RFAVb4uDs/8rbO/JXw5YgBvzo+p+FfiWz\n/wMKCosgz8P1ewKGsd0fTNwavmoKASUZFlPhZeGz7HRYWThDrJom6TkTrwFn\nGQH+GJIze1Yy1sRnie0naBF5OOxurE1OCVI/qAxJePzc/1QwY13NbRfKqanC\nrWZK\r\n=Q/mF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEZX9KV5P4QxTxZaNQd5r+afTTUezR4Itz5d1Qhg3zLxAiEAjlwhz4MK5seGczpn2JeMf44QnU6C0ocYB1JW6O9mlow="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-7e46cb1fdea9a63f51d101ca0d9aafb0522527f8_1586078791925_0.4285514211179722"},"_hasShrinkwrap":false},"0.0.0-0df963f30a4d0ad2b0998c53a3ff37cb0fc13ce5":{"name":"type-route","version":"0.0.0-0df963f30a4d0ad2b0998c53a3ff37cb0fc13ce5","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.1.4","@types/node":"^13.11.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","@zeit/ncc":"^0.22.0","expect-playwright":"^0.2.1","history":"^4.10.1","jest":"^25.2.3","jest-playwright-preset":"^0.1.1","parcel-bundler":"^1.12.4","playwright":"^0.12.1","prettier":"^2.0.2","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^25.2.1","ts-toolbelt":"^6.3.11","tslib":"^1.11.1","typescript":"^3.8.3"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground/playground.html","build":"./build.sh","lint":"echo \"TODO\"","unit-test":"jest --config jest.unit.test.config.js","integration-test":"jest --config jest.integration.test.config.js"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"0df963f30a4d0ad2b0998c53a3ff37cb0fc13ce5","_id":"type-route@0.0.0-0df963f30a4d0ad2b0998c53a3ff37cb0fc13ce5","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-odrXny31RZearpY/mxqJIzqytkxW3SHbSPbI2fzsWeejbhilVt/J/R9XR5Jgd5vhminUdMEbyCUXcS3cZA2hOg==","shasum":"3411278cb1cbef5e23d691326e38e68b13b23b6b","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-0df963f30a4d0ad2b0998c53a3ff37cb0fc13ce5.tgz","fileCount":6,"unpackedSize":93244,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejPWkCRA9TVsSAnZWagAAp6QP/AsSoDO8oDS79fy12RgX\neZXv6LwoOpDVpxDtl9G9kS9HYT/6A6UdFnFN2YQxYWx5m8IeIbP9qXDQLrhS\nyWyqOI8kWqnTeEe0MAFobQ1KLLG7R28MCZwAJC4TUOPlNFv29MIibbf3tO0Q\nAPq8PEZvNR+E6KWHPbdNXIttBmqnJr3pM5jv1H/3CYQtpXpHRWGJo1kJNMmJ\nnU6nV+3+xt/sy/cxrwOfY+WuKn/iSCUFQ0TSp0RfJOEbMSvfEs5y1XJ0kcFZ\nTM39xc++9Pq9LRhRE/EgoyDiSVMXXW2jN+ziLIBoBhKJ3ROmzE9tiA/xH2SW\n3G8tt0ng7bGrFv1xvEr5kQvS+lIOpOV7nDHhIe1QbZbe5liuNKvx1AaOZQRv\nwPMtzQ6KgX04ZcGkVTXmkbeZrgOWkTNCzmDVyxw6Z6LMIEQhjNsJ3b34jqVm\n/ATG9X7S9awyNyGCwH96/YHLYVT5p6ml9qKpOWpJpBPobndC38Pz9HR0Lxf6\nHF2K0qPaZRVKGjzgpr+lLZW2YtSnx8gT6c5ETvYhzZ5OQmS0bE31BwoGaLcY\ncsRm1Ll09BrMoTxZEfsUB7vphTeKCrFI6VJ5qevE7Q2RFhBKZ1D2CGtp9o8m\nrOUdHFOuIETgb5vIIlc81yoFyp3gB/ApY4r8iE6dxpN7KtW6//pdkS2HYZO0\nSb6D\r\n=BuZA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCsHB0NxGiwu3nYJFF0uYdhn9wHFXhZPHbuUFmdDXgXbwIgVOipHiIeBHtKqOLd0xDktYt1xqqnl9wOyMHH7A0Kvro="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-0df963f30a4d0ad2b0998c53a3ff37cb0fc13ce5_1586296227637_0.6014631680229374"},"_hasShrinkwrap":false},"0.0.0-058da7d6e337a68203aa2c762a61626c5156a71d":{"name":"type-route","version":"0.0.0-058da7d6e337a68203aa2c762a61626c5156a71d","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.1.4","@types/node":"^13.11.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","@zeit/ncc":"^0.22.0","expect-playwright":"^0.2.1","history":"^4.10.1","jest":"^25.2.3","jest-playwright-preset":"^0.1.1","parcel-bundler":"^1.12.4","playwright":"^0.12.1","prettier":"^2.0.2","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^25.2.1","ts-toolbelt":"^6.3.11","tslib":"^1.11.1","typescript":"^3.8.3"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"./build.sh","lint":"echo \"TODO\"","unit-test":"jest --config jest.unit.test.config.js","integration-test":"jest --config jest.integration.test.config.js --runInBand"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"058da7d6e337a68203aa2c762a61626c5156a71d","_id":"type-route@0.0.0-058da7d6e337a68203aa2c762a61626c5156a71d","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-pVBoDjfBNMGVNTOoGDiNpVO5kPwGYtjqGRtTXRfqxMKFXBHxIVUXgEUC/Cyv+sjPZAt+fdkSCYULEhZDUPVQSw==","shasum":"9e1e2789a6ebf7ea174500f08963ea38b232ad6a","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-058da7d6e337a68203aa2c762a61626c5156a71d.tgz","fileCount":6,"unpackedSize":93294,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJejb1YCRA9TVsSAnZWagAAxMEP/0/xKuoethetjBgIY6/x\nL86/pRuUwF+WZJlnG5et9Ivib0IywEcHkzW+bE43rp+215/RJ67EFBohVA2t\nocBMwkoaW61kSEssfrMRg0XJoImBg9MKvBF7JcPNhkrLgbUElBJdlj+Mp4Yl\n8IUysmNmCywZteFUDEM9P9dmXDhT+1msO45vYVtzznLhq/D03CewgkVYUttl\nZURUTojIFq6ymEhJv+4XXzaB5oGiNx50ZjSPxCobkJshzlAaZ+KU6Xc6Fk5V\nNdXj3YJg/OfbW92jZBaMPKqiWCKEeYOUwNitffOyfepSrCiEo0+AE3+dDfvB\n6WQ2EyXvw4TDxmSFo8dvJ+W64UawCFpGUprHRblWHpkLUMGT14qRnccxzowM\nZJE6Vfdn2QAq4b056M0ZfmBmYj1v6XM7W2PE2RdrB0+/c1pDTeHriMBc+VYG\nnvt37VE7JSiCn5CXPOFyFCH/bjbEI/Sxt7xSfJjUcZ6IpGHbfJuyHZ9ZJnHZ\nfXUmnOoq9WlrWOU+g0h4a3MNYUavhZpHB0eZWo9WxXFiqDcKCgO0ybGEhPdR\nRL63PscGbWU4905tWZG9ipJjwIojbFURvdlAmYD1YTyRJFKDeTCkt1a32u+Z\njcuJJwhYH5LtlyebUWbNH7KvdSId/rKyECVn//3fecopXimLbSkanfDQVvXu\nNjrx\r\n=xhnS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICgL8Rm4h3Z9GKhHNYqKrTpZ7bsK16ftNfvo6mvDh0wxAiEAyLw6Qg+Bumt3wLE0+iqB3Hgh1htIZJQJmOML5xn3GvA="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-058da7d6e337a68203aa2c762a61626c5156a71d_1586347352126_0.9189929418144673"},"_hasShrinkwrap":false},"0.0.0-2728792f90b6af223a0f40a13eea402b3be07d62":{"name":"type-route","version":"0.0.0-2728792f90b6af223a0f40a13eea402b3be07d62","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.1.4","@types/node":"^13.11.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","@zeit/ncc":"^0.22.0","expect-playwright":"^0.2.1","history":"^4.10.1","jest":"^25.2.3","jest-playwright-preset":"^0.1.1","parcel-bundler":"^1.12.4","playwright":"^0.12.1","prettier":"^2.0.2","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^25.2.1","ts-toolbelt":"^6.3.11","tslib":"^1.11.1","typescript":"^3.8.3"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"./build.sh","lint":"echo \"TODO\"","unit-test":"jest --config jest.unit.test.config.js","integration-test":"jest --config jest.integration.test.config.js --runInBand"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"2728792f90b6af223a0f40a13eea402b3be07d62","_id":"type-route@0.0.0-2728792f90b6af223a0f40a13eea402b3be07d62","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"integrity":"sha512-fZYHjFNg2Yb6ECE09HX96OeGlSnOUy7JCY41p6XvOHFfJ+NvjuJk7F9mt8dRiAMi31c/Bd8P1j5EIJAEswactA==","shasum":"df5a83bc2b5b4943a66da16e65d131037327fab9","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-2728792f90b6af223a0f40a13eea402b3be07d62.tgz","fileCount":6,"unpackedSize":93967,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJelmA/CRA9TVsSAnZWagAASn4P/iF5ZmqMrkMP3/k0iotF\nR4EatSFKs/m6TJ1hSBKBxMQiYLVAsK/vEh17FW8SDe0pEALIn3J3ZdRxLz0V\nltsVKuZ3W+9zKB9y/oOJQa7E1ZyeYOhwp6U+KNaeHL+B90hOE0F0SB9vg0nP\nVebl9RADWKbXKMApMUc0K6BNWdhWlOZE0H1D6MK9Iz0h1bMtf6AV86xc/YCX\nhsZyuSryYNY1f8TN7nfkS5byCW9JSWZqKvl0ZCJ40RVgllEh5ZAneQR1Falm\nULSmlOCl0spBHSxF5yME9+yRUVsXuInotND9wJY+VAobZWF5XtEIce6JaCGa\nb6Suq4TtGqmeeFBdozoR351fTFB9USpcFwA2+IdtGMrWpLmCxEcP/5hQ1ZEr\nMkhWspNz3G/9bQAPS5HKJ5mk1MHwXoYRkU3MyhSliG5DeQTCKXXc4V9ZB1Vj\notDe+vPNQlS2eGpEZHxpp5zguVhXz6g53dbhebuiCxmPsNDQq6l9loq1Y8Wk\nfH5ZsQxu+VKXhIfrgusTC1H+3G9t53N+MvnQOqpQFxwfqQGv4MW6XdJUYM0h\n/O7C4VbFbmzU63lZ6Gcr1SSAJuS0n/1eFr3KEFa2Ow2N3SUOroWvqCh1/mXP\n1uGJZ+VMP+DK5H4CJ3eLUmXdZtr/9FonUeJyP4hXYkSYoC2dAPnRj8eLXxBe\nEK4h\r\n=cz1t\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE/NDl+Ircp/F1kzmYyIbIySCws0aMly9YkuGNUzkCssAiB/jPhIQDUeE1Mq2qBGnHK1ObIudj0flfBbn5W+N2KBFQ=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-2728792f90b6af223a0f40a13eea402b3be07d62_1586913343008_0.3518258566708119"},"_hasShrinkwrap":false},"0.0.0-c0c427c417ae41d82663aa94c8966b510198faf1":{"name":"type-route","version":"0.0.0-c0c427c417ae41d82663aa94c8966b510198faf1","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.1.4","@types/node":"^13.11.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","@zeit/ncc":"^0.22.1","expect-playwright":"^0.2.1","jest":"^25.2.3","jest-playwright-preset":"^0.1.1","parcel-bundler":"^1.12.4","playwright":"^0.12.1","prettier":"^2.0.2","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^25.2.1","ts-toolbelt":"^6.3.11","tslib":"^1.11.1","typescript":"^3.8.3"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"./build.sh","lint":"echo \"TODO\"","unit-test":"jest --config jest.unit.test.config.js","integration-test":"jest --config jest.integration.test.config.js --runInBand"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"c0c427c417ae41d82663aa94c8966b510198faf1","_id":"type-route@0.0.0-c0c427c417ae41d82663aa94c8966b510198faf1","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"integrity":"sha512-2packYORlAPYCiw+7as6DXI5TUUcH+4Xa3u9j76wZ/4l4vIrF8XR1QAVyQZRocUL1BMm+LLHCMqsvTw9I+l7fQ==","shasum":"e5b086bd7acbb8bac0da39855843f73cc64639f0","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-c0c427c417ae41d82663aa94c8966b510198faf1.tgz","fileCount":6,"unpackedSize":66075,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJelmQTCRA9TVsSAnZWagAA6JAP/Rz7FcleVnyb3+YQwN1t\n6bqtzMPm2eRulU9aRed7xz9X8NDHgPUoM1nzI8GK2pv5gaDEE0tapC/cmdX7\ni0xh0HZsZcjABeab/UvdeqE0g0WjVRdLMEoIKIQN5BHT9UVJKR/CMJYE/SOi\n9gy95zP9vD/pu+kUIcAUdPd3kJXGhDGe5V9qUCgCvqNio5xTocvBcxu0av+y\nptaNWAkz3xBp7VF/RXuZHIldA72k++JNg1N9BkbnYJxHH2w9/2ftDJStM9+o\nNjpq2ltpRjnYThute6+HTywPdY58ndOW6fCZsX2m3P6kieeudHdbJvDR2he/\n447M0HMXg1GJJbF53FC6THl0ecRMfT6i1+1nbbM8LaRzMTYO8NQ+eAK9RTw6\nXJI+AoulK6hJPlfcgClpR/wfiNB6FuOlJT47cWg+VPvUrGXvbq4A0IzRC0Oj\nTqS5625gnK83PFMa5WFnDFTBXtAAhJ6Wnf+Wt75OO38MXM65WAMfCOgSfsYC\npLHBz+jp5ohoNSUOBlZnsTBD8FUr1kpLV3owcNxnFBa1c4/zp5MhFk3JIF2M\nDc4m/rMAVLYfVFc+AJ2UIyWctOOF8cAM8JVK5C15EUKzEPU1gCsA5GGoseN2\n/VsI1o2OWV5nf22vJgtYii0MjX6qG+zJY7sUq+44tj7+kWZmXc++hdn3gbjg\nM1yu\r\n=nMbd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDcAgAc8kASE/JdMhhArNaFLccqERcqTrbBPIQw7LkLGAIgVu+bx3Ab7bBVplINILTbEotTnsZdeE+uqQWyeyawd34="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-c0c427c417ae41d82663aa94c8966b510198faf1_1586914323103_0.6694901900321433"},"_hasShrinkwrap":false},"0.0.0-979acb5790eb6ad6ca6942ceb38abdde60de486d":{"name":"type-route","version":"0.0.0-979acb5790eb6ad6ca6942ceb38abdde60de486d","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.1.4","@types/node":"^13.11.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","@zeit/ncc":"^0.22.1","expect-playwright":"^0.2.1","jest":"^25.2.3","jest-playwright-preset":"^0.1.1","parcel-bundler":"^1.12.4","playwright":"^0.12.1","prettier":"^2.0.2","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^25.2.1","ts-toolbelt":"^6.3.11","tslib":"^1.11.1","typescript":"^3.8.3"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"./build.sh","lint":"echo \"TODO\"","unit-test":"jest --config jest.unit.test.config.js","integration-test":"jest --config jest.integration.test.config.js --runInBand"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"979acb5790eb6ad6ca6942ceb38abdde60de486d","_id":"type-route@0.0.0-979acb5790eb6ad6ca6942ceb38abdde60de486d","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"integrity":"sha512-6rsc/N9s+1cH56WRo/U4bGXjhJxLuiEDokjOrYkxc/Ook6nwjsUixzlo15ktOOvqSwfgbnREIk8wjksh83QZIQ==","shasum":"80919fc314453f63483dc80f281ae7ba3e6166b1","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-979acb5790eb6ad6ca6942ceb38abdde60de486d.tgz","fileCount":6,"unpackedSize":66075,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJelmnZCRA9TVsSAnZWagAAlyIP/j7lSV+77PYQzKyP2dxV\n4EMndFHZ5G0Y1qnZxfF/S5aUi2GTbmAHH9pn4+msDXqBMEd2IGnUSJT6SBZl\nNORefXlKanMof79zVla6LTfevhMp8lvR33OZCexqqnS3keTgSxV/PIJro/Ij\nSUspNLGE1pCazX8HR7eX0EVuZG0mTG9erLVtIRXDcM65mo7KbLCpsj6Rx/TM\nmYJ7ycMlehkABG8YSFCET6afsk6OZTdGbL1NvHUGwJ+DB26UJDLTugIf2M3i\n3ojYialiYwqg5+VpI5KEFzqYxkzSD5QyQRM/jOj19BpUuYO0qxMwtoZC8frU\nKVer+JnJWcV6jRMtwN0G6Z4uSGVIFawiMNvyEEfogf6m8YLgfY+RcAlnNbvx\nSI2gboEfkLNpxXIlCTfHu1XRtGY09+ttyx+trKQn4pSfc5OY2fT6tWOCZgeY\noQKVN8+7GLvLQgHm+YM1sUNCE5b+TfrGUCxUsH3Z1vhzaTfdOTJD3PyLjCCz\nF+qS/CoPGPB/Wqja1J1EID0hmlxE/jEo7SoPDJ1HhIxnBkDpOgQI/Qefj/5G\n34kdNikiynUqRBljKyXY4yFukQes5Hq6HSLWUr5I72Yr+Iyt45yJjQKvJXBy\nxt04DH7P+6fgVoEEt10o4JKV9dXvsipbhwrZVNkq2sTiIgiBiNoztZ8j/VZo\noHBz\r\n=90Qa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDbzCIRxgT3WSHFw/41ndc6TXBBTKdQUcdsCaq9dUh4/wIhAJYyrTIiGGLkXwnAlQkpAjvPahmXX9WdtdMI1kfafeOz"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-979acb5790eb6ad6ca6942ceb38abdde60de486d_1586915801272_0.6753696315564921"},"_hasShrinkwrap":false},"0.0.0-0af632f749f4b078b8ff55a187877c19e2aa0c80":{"name":"type-route","version":"0.0.0-0af632f749f4b078b8ff55a187877c19e2aa0c80","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.1.4","@types/node":"^13.11.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","@zeit/ncc":"^0.22.1","expect-playwright":"^0.2.1","jest":"^25.2.3","jest-playwright-preset":"^0.1.1","parcel-bundler":"^1.12.4","playwright":"^0.12.1","prettier":"^2.0.2","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^25.2.1","ts-toolbelt":"^6.3.11","tslib":"^1.11.1","typescript":"^3.8.3"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"./build.sh","lint":"echo \"TODO\"","unit-test":"jest --config jest.unit.test.config.js","integration-test":"jest --config jest.integration.test.config.js --runInBand"},"gitHead":"0af632f749f4b078b8ff55a187877c19e2aa0c80","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","_id":"type-route@0.0.0-0af632f749f4b078b8ff55a187877c19e2aa0c80","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"integrity":"sha512-3ZGJtiwwCFXB6GE7d0tMaAXp29a7u7+MoDhhpAmYXYjUDlaBuQjStICNkxYqZcJvjx8yh2VTKFrUJvKdpKBXOw==","shasum":"3631dcd508604dcc1ca01bf568b7210fac42a178","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-0af632f749f4b078b8ff55a187877c19e2aa0c80.tgz","fileCount":6,"unpackedSize":66445,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJem0d7CRA9TVsSAnZWagAAtt8QAJRtf1KKrkM9b7D5ynyg\nv71Aa48o5jIyvIfG0JUkAS3i2OZgKfbFboYTO1vRmmxPuPkg0arQFaLW4GXY\njPB0LKDJHgDpfSb6m/Ie+Piv7l6iC8bzr70fHWXTL8QerjZ9BSN2tsVon1BB\n5mWB4LCCIAoYpDrAfVdbh9oyhWpKn23BIPTSDwTpKgJe4OZq1Z0xqTFdfmJF\nk6dQ5P6Ush+cGClSb/XFdaIDW2R+lYWoaehaQW+2khFqX1105CBafMX9Ocem\n7NZzJITdcYz039mbqCQ3NeOQl88ejwyYkgdteDzH/i63GleOnveDAwL1bt55\nualtsCchdhOmCydRvZNo1tu6ug64VtTMeEes6UckIEEEe1rpKOrvOOFSiSKM\nz1pnarS1eSsjUrRaQydbzjsG/MVX43xHOgnX3sQlHKSR51Hb00eM9rD1VZaR\nLC/nrVTELgYgYJHHuHoH75HQBm5TMHqPeFfS448ErK2TKmxvkOhcLT7ZKGpY\n93mF8AuSeqM3vn/anI3HdwC2pX7/UPwLB/gyj5daOXeVz2H4zr4SCbrnTORj\nMoFxJPFA6FSfkn5rBxoNpRMypRViFm5KjFjIkUQbZSMF/pLZYd5NkEI6vtOE\nHfkC1+tyUmJwZNVWgd0B0nwbQIdeibItxUCz0Ez09yUX3E9JZj3EymmKOkBF\nqwCQ\r\n=V4EF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC/3JnpfrouHHULSDVpQu4QTHK+7B9+yjS2kq7W4C1WAQIgI3wMb5yr+2PrKtorGzbtYr2Reruc585CgAj6aCpHVBA="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-0af632f749f4b078b8ff55a187877c19e2aa0c80_1587234682933_0.8592497802106465"},"_hasShrinkwrap":false},"0.0.0-6c861109562dd61618e15c50442a266028d7bd28":{"name":"type-route","version":"0.0.0-6c861109562dd61618e15c50442a266028d7bd28","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.1.4","@types/node":"^13.11.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","@zeit/ncc":"^0.22.1","expect-playwright":"^0.2.1","jest":"^25.2.3","jest-playwright-preset":"^0.1.1","parcel-bundler":"^1.12.4","playwright":"^0.12.1","prettier":"^2.0.2","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^25.2.1","ts-toolbelt":"^6.3.11","tslib":"^1.11.1","typescript":"^3.8.3"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"./build.sh","lint":"echo \"TODO\"","unit-test":"jest --config jest.unit.test.config.js","integration-test":"jest --config jest.integration.test.config.js --runInBand"},"gitHead":"6c861109562dd61618e15c50442a266028d7bd28","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","_id":"type-route@0.0.0-6c861109562dd61618e15c50442a266028d7bd28","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"integrity":"sha512-BFDPW/vjHG3P7ZEe7IE3c39qfujW4nCOR2mO9aBlQEP4XgkANr4pXb/WuD0O7O+4Dttuo2UBs/uHGzR/4Lf07Q==","shasum":"eed1965f8c460593f413147fa08e86af00728df4","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-6c861109562dd61618e15c50442a266028d7bd28.tgz","fileCount":6,"unpackedSize":66445,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJem6ZmCRA9TVsSAnZWagAA+BsP/3rCjaQxC5bzGKmCR9tI\n15xTzhnF8Zm4369sOarNbg1dK1LLTtV5POWSBfjWPrQu9TezOn92D6KWZ9dY\nKoSPGks16gWI17E3O7GMf5X8chec4CGuUSm13ldJofQ3pDVUVYwtgyBX9giA\n3WfjC/d164c/z/9Wc7GIVqORCmtdqPa9OxdLP/BiLbjTZL06iOWGoL10T28i\ntEFir3hpSq+oMCMCrf4UQUdFWjWzYc5VDiB9KmpNZOa8de5bp2fGiwsi8xI7\nKIisfbnO+yecRtI//og3ePMnB3XlWM2bREQqE9Bhd73Cp6uA7iPMewN/PAAP\nz58Kaq4g0ja3CUCavUf9fShnHNkN2ECdaCL0AU4LhD/mQKijhurF5bfwgN5r\nvRNUib/n6j21aez7eh4/L2PVjceibqpiakXRPn41Q7hwfB+qmvOmkwIIwN30\n77XN046slu9195QVrM5RPNda2XMCNTSZraVACo0tu+t/p4ApsCv7V8mZSbN5\nXASWDslkxqxwWPNVGCGskDHSl24h3G4f+f9+SYKl74A+/89apBZxeSR/2xKO\nWywkXLkX+fer7nY+7o/FRv7QT5d8vR2AnOd8db4Z1vieO9431FYWYWDvvCSq\nVO2ULGV3FBK7ENp4kDeE4x09hZbBDj74LWghKVFGOj1MIN5AbjrAaHeuYa5M\na67J\r\n=pPmR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD8hSOKe4hHBXj5KuOOK/MDYRzZ9zYpvxwFNDuLdoMDGgIgHi0IPN2EXwqtDlEdNq2kgV0zPn0KRAI4iueimwr/l+Y="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-6c861109562dd61618e15c50442a266028d7bd28_1587258982022_0.4348861056300761"},"_hasShrinkwrap":false},"0.0.0-2decdd5cccdbadcf0c16a91cc21565a08ab114a6":{"name":"type-route","version":"0.0.0-2decdd5cccdbadcf0c16a91cc21565a08ab114a6","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.1.4","@types/node":"^13.11.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","@zeit/ncc":"^0.22.1","expect-playwright":"^0.2.1","jest":"^25.2.3","jest-playwright-preset":"^0.1.1","parcel-bundler":"^1.12.4","playwright":"^0.12.1","prettier":"^2.0.2","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^25.2.1","ts-toolbelt":"^6.3.11","tslib":"^1.11.1","typescript":"^3.8.3"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"./build.sh","lint":"echo \"TODO\"","unit-test":"jest --config jest.unit.test.config.js","integration-test":"jest --config jest.integration.test.config.js --runInBand --forceExit --detectOpenHandles"},"gitHead":"2decdd5cccdbadcf0c16a91cc21565a08ab114a6","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","_id":"type-route@0.0.0-2decdd5cccdbadcf0c16a91cc21565a08ab114a6","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"integrity":"sha512-9RoPftSIS1MSZ4/WT50bTYORlWZcHXm1niwtkYVVz21Lpd8sBW8IFdl8DKwmsKhYWhRz27369T5poRojadnp/A==","shasum":"38daa9c5d3e9aac4f80b332b8d53e35db0635ec0","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-2decdd5cccdbadcf0c16a91cc21565a08ab114a6.tgz","fileCount":6,"unpackedSize":66616,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeognnCRA9TVsSAnZWagAAsToP/AgAtW75jPHroippUajI\nh38QhD2q8iZp7dGTU5YSvd+rh34ALWfr9Gvk52aG4zCDxiF6a1IZMfrKIH0/\nKmsQ7NNdzjXb2+JdoYS1cfbyEOlCmkzqT9iCo9oQpjiiTDdTKE+oBdT0qWMt\n4ZWHqTXzW12RDza8zKdAkqI9OeoXrzGXAjVvcldFm9QouMeqgS/ARk3AQYhH\n7p/4Rdlmg7W786TokdHgT9ePF1tX61/WIEisgWd3Aa69MlrtGPV50156loO9\nZlrDSfAyfr6HST4yB8G7VyZuKHWimsUny7nIYWUoRkihTqq1LtZVg3pFIo5E\ngeHagFHxYkhGBo8+XVu71AjrVTkVedWrvx83VokPYMGf8CItNZycwR1BSN3n\nbfhJTZLf2/zY9ynVwDWXmh8kjbagSuNIcl9bPgri1yjW8zH04fJ7bC50kEsM\nRyONfx/UH8Rdcpgegj9sy8vUaWzgXPwRSTd3q0QhgmuQQd6I88+4yZK+Oati\nOMT0+Aa8tdVnbbPzGPnN39BvnzmUUwERiP8N9hipLAplMpU459S3nI/7dNtw\n8c3SX09pm8RbM8fBm4bBo9xXJcOhIpR4tsmpiY1VkIjjMk2zz8+KXteN1mXx\nKn5PjFD82l3BdZtz152CVoT6pLyGXp3nUj+bOQkr2K2LRddakFlUGeQFajuc\niorL\r\n=/DYq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDRIRM/v2RWRLUDF4W9nAFeXCaF3QAttAGfxLgvlKk38AIgfMIHzQ28oq9QTEnrArr6dlzVbc/WzdGY2jq9diHDXuo="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-2decdd5cccdbadcf0c16a91cc21565a08ab114a6_1587677671335_0.12561720018075806"},"_hasShrinkwrap":false},"0.0.0-98f1b56859fae2869e48a504a122a2729be560a2":{"name":"type-route","version":"0.0.0-98f1b56859fae2869e48a504a122a2729be560a2","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.1.4","@types/node":"^13.11.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","@zeit/ncc":"^0.22.1","expect-playwright":"^0.2.1","jest":"^25.2.3","jest-playwright-preset":"^0.1.1","parcel-bundler":"^1.12.4","playwright":"^0.12.1","prettier":"^2.0.2","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^25.2.1","ts-toolbelt":"^6.3.11","tslib":"^1.11.1","typescript":"^3.8.3"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"./build.sh","lint":"echo \"TODO\"","unit-test":"jest --config jest.unit.test.config.js","integration-test":"jest --config jest.integration.test.config.js --runInBand --forceExit --detectOpenHandles"},"gitHead":"98f1b56859fae2869e48a504a122a2729be560a2","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","_id":"type-route@0.0.0-98f1b56859fae2869e48a504a122a2729be560a2","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"integrity":"sha512-G0cluxBJ1ZAuCOhD8NVFrYvItG7QF4dAW/LL5sk3apqK6scwhTv2zFd3OgdTt+PAUhSmopplHi8L0rLnZTNBQw==","shasum":"84a113e18f5e2464dceab70ac9a28007d38b3d72","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-98f1b56859fae2869e48a504a122a2729be560a2.tgz","fileCount":6,"unpackedSize":102154,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJepBqpCRA9TVsSAnZWagAArKcP+QE3DsKH+vQ3aYBqNCW+\nHuhWX/PdlzlMlxaJNAS9Hy8PbNPtShGrZvVtL463Lq9e9eXqia0D3aT/pdh3\nKU/44kjWxM4WAS8Q0d0XBUADB1tZUXnVeHlUD9TswFiVhJNAAfc2bbGWTncF\n9FrRlfeHWB0YrFDCASEj08DRW+Szse763S3WZ1vupliwFN37i3f3njJciqoE\nr/JYs8bs03uDwdyv2vRqcGpYPygqpX+MBi+U3B0v8YYARkej7iunkhsOovA4\npHPyQ5uhmmhuxsNv0qQgGknOAAWkbO/I+YTTKSzCg8nUHMqXpND+npnTLzBp\nVq49Ig6rJw6OLoyP/YS6mGGvr78VqCDVJI557zt4a0ClqBxdrYSybU7GMTlx\n9HCwryYyDv/R9zDo9iGtxeAur8gttCqO83rj+5rjyGYpmKeu5mP3cvowqqEB\nVmwXsf9MORnYLSoyem82jaPZNEfOfjazOObaRIeYofhQ8ce6A9op/9p2qsfz\n2zlj7J0swLDBQhaDCa2ow5IzkAaGMy818sSmuXnA+ehvxORjgy/+R+0dyGv1\nemv5NHuNSBmSxj6zNlQ891epLfAiLiJgX9GaclChakEuEFCqMW8vhRmZsrdW\nb/99uz8qRLbXNpYe1xWHU8VTHXLgNFH9Uq/eaXS5C58dAgyFwzYK79VHNITk\nUfXx\r\n=cXZ+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHnPCQoufF3upvZtWho9cVwpxSjTZsGhg+yNZceyNgKbAiEAx5U96a6jY9RwO8v+LRpmxvgQBTRLtwb8XZR8wjXgD8I="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-98f1b56859fae2869e48a504a122a2729be560a2_1587813033053_0.8078767361226833"},"_hasShrinkwrap":false},"0.0.0-e532662f44cf50416b5537a84f33d377aaf3c8d4":{"name":"type-route","version":"0.0.0-e532662f44cf50416b5537a84f33d377aaf3c8d4","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.1.4","@types/node":"^13.11.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","@zeit/ncc":"^0.22.1","expect-playwright":"^0.2.1","jest":"^25.2.3","jest-playwright-preset":"^0.1.1","parcel-bundler":"^1.12.4","playwright":"^0.12.1","prettier":"^2.0.2","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^25.2.1","ts-toolbelt":"^6.3.11","tslib":"^1.11.1","typescript":"^3.8.3"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"./build.sh","lint":"echo \"TODO\"","unit-test":"jest --config jest.unit.test.config.js","integration-test":"echo \"jest --config jest.integration.test.config.js --runInBand --forceExit --detectOpenHandles\""},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"e532662f44cf50416b5537a84f33d377aaf3c8d4","_id":"type-route@0.0.0-e532662f44cf50416b5537a84f33d377aaf3c8d4","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-rmFcmKEItMhOO//t0wc7jV4NXx9YMj+l6tqITwOANRx+r7jHefFTEzqYRfqHwf7gPfFm2GrhMu3mj36fIol5Wg==","shasum":"39dc0f238bb2b2a987f1451e4e750158385d5d41","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-e532662f44cf50416b5537a84f33d377aaf3c8d4.tgz","fileCount":6,"unpackedSize":102163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqypMCRA9TVsSAnZWagAAVzUP/Rl55qe36xe+6inMKj+H\nIsISDzWo0kGVfGIXUst9mYk5/NuV+8laEfUoiUXu5TFtIIWnvGsEmxjiyvof\nvME+LCcQGxRjPINpjJ52Rm0rXm3BMnUj1hhvXVYK30UY9vILg4DyOG7SW9aq\nYB5Y+8uWLP3cdXJwHIIEocmlLvyRl5phhnXbR4rFV9jlJxUwcGO3LOs7Dpj3\nC/SEYbZrpKAYVuL0QLetYMwk74yO17Zu3wBHJpAsZgnX5gsXaIOvBLXcksRI\n3ZCAgpFA4NdeleRO/+ZzQMuXnfAtmeaO48dXek1lH6jNLIvTDmGPyeItxskY\niuwDSOJ8l79upkgbgz2PtwX01iyhC9VURvMJhow414UUoTPxCprBh0drh0s7\nqtp/i450d+Tt79XviNNOGQfVXWJ+3z7lgox9iLRoutYaPOY9Z1TyZxDtkaMT\nqXh3rdG1LduA5VAgKzdC3T6od/wrJJg4ZTxY6sdHGPkTJTw732tQGsM8PrIL\n87uk4gR2RO8uL5/Zvo2kpwkaKO1vCW+ewkEmd/z5zn+TKR41ou1Mr55TMUm1\nqGzwTNuN7IgW0oYMN28YiOetWxvdb9reBrYit7EZ8D/I4ZYulmfjCrS8bKa7\nyafLQFlvcvPD9ck4SfIk0LABG6YhjE2K+PtUkXxlh2UzDv3W4XiwwYqsMdGw\nFclq\r\n=iM4x\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHDg2eCmh2s21fujrftKafGWrvKPJqovue3ad5EPH++IAiBJT6dm0vKBjeYJLRoSp+desyrz6seOb32b9MO3N/u1nQ=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-e532662f44cf50416b5537a84f33d377aaf3c8d4_1588275783904_0.22421238297198043"},"_hasShrinkwrap":false},"0.0.0-d69cb0e2bb5d895d8d174eec21299b73d4e7bf79":{"name":"type-route","version":"0.0.0-d69cb0e2bb5d895d8d174eec21299b73d4e7bf79","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.1.4","@types/node":"^13.11.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","@zeit/ncc":"^0.22.1","expect-playwright":"^0.2.1","jest":"^25.2.3","jest-playwright-preset":"^0.1.1","parcel-bundler":"^1.12.4","playwright":"^0.12.1","prettier":"^2.0.2","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^25.2.1","ts-toolbelt":"^6.3.11","tslib":"^1.11.1","typescript":"^3.8.3"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"./build.sh","lint":"echo \"TODO\"","unit-test":"jest --config jest.unit.test.config.js","integration-test":"echo \"jest --config jest.integration.test.config.js --runInBand --forceExit --detectOpenHandles\""},"gitHead":"d69cb0e2bb5d895d8d174eec21299b73d4e7bf79","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","_id":"type-route@0.0.0-d69cb0e2bb5d895d8d174eec21299b73d4e7bf79","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-yQwMOd0uWCia6NVcJb8x3Ml5B6TLryYBPLqJgJOD1+FSKFeKMGHcUHw7JqikthLrkHzgyWvyuKvg8wWqUr/ngA==","shasum":"be6a77ff5e19bf6fd96893919e739f654d6ced54","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-d69cb0e2bb5d895d8d174eec21299b73d4e7bf79.tgz","fileCount":6,"unpackedSize":102163,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqypbCRA9TVsSAnZWagAAKs0P/0lnkffEIV7tpqcLohwU\n0oQ3RYN/ngCQ6HlwW7o5D6SZqZUPDQBaXbkwHF2+pcLP6Tc68NQU0XGI1ihG\nEoGvXZ8+4FiA6jWTl9at1df7jHtJwSK8Z2e+SeGUy66x9WQvfLQhI4eb2Kcm\noxhzD1GNQ34y2aR2OA56s2C5h3zzUlfYhDkH70ytk5jjRRSV/s8qCDO9l1Hg\ny35nQ/4WZVo/2AvchQ/sqGRR2/kv7p+JPBJRclo6wvM28zrqxzPGajU7HxNV\naqQZiOP0VC2+RERahlsKdyZmp82rpwaavszvn+BV2pyOInk/WtYvYNODNGAO\n2Fj92NmwyJGpkAaZCw1QTBa+rA4fpj+bpWv2M4LTKaOYdVU5D6uZ9Adu4DhP\n3o++6ZxkwKQcSUDFVg5quU1+6ruT5F6SzexksP5qLVryzLuYPTpWwbx/pJbl\n5lezrpDomlPgZMyKnql41N+ZpNWkbHEruPIXNohyFuxHnx1ATI5myF30FTI3\nbeNysAGC17gJGxYzr2CbyapUnFcfSpB2QZQBUhuPWiRBDD26HPrtpBJC3jF1\nS2mc3K2a3S//HkTFkgigPZkgSN5hPb3XXr/HHFzVFZ+L2cpmkAi7Yrk+B8IZ\nHtIpkjl9ihoBJ7Fo4Wpe8K+BF5brnQ/JpJFejx8HVmu89VtKYssnIkjqQstM\nclij\r\n=Hi9W\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFP6120gcnmDK1IANby5UIyyvucFENf6xgCAm4UPVZ9WAiEAhP0DiJ+v6AIaRnhR1H64OMUxwzkpgra0TIztID21oXs="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-d69cb0e2bb5d895d8d174eec21299b73d4e7bf79_1588275802650_0.22888826881443292"},"_hasShrinkwrap":false},"0.0.0-962ed642470ff9876e1dcfd8a026e18d262bc09b":{"name":"type-route","version":"0.0.0-962ed642470ff9876e1dcfd8a026e18d262bc09b","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.1.4","@types/node":"^13.11.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","@zeit/ncc":"^0.22.1","expect-playwright":"^0.2.1","jest":"^25.2.3","jest-playwright-preset":"^0.1.1","parcel-bundler":"^1.12.4","playwright":"^0.12.1","prettier":"^2.0.2","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^25.2.1","ts-toolbelt":"^6.3.11","tslib":"^1.11.1","typescript":"^3.8.3"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"./build.sh","lint":"echo \"TODO\"","unit-test":"jest --config jest.unit.test.config.js","integration-test":"echo \"jest --config jest.integration.test.config.js --runInBand --forceExit --detectOpenHandles\""},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"962ed642470ff9876e1dcfd8a026e18d262bc09b","_id":"type-route@0.0.0-962ed642470ff9876e1dcfd8a026e18d262bc09b","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-14kbUxQinOBkHMi0Nh6XJ8zCb+UKC0yuSGNWRWUrHBpH2htqVdV0cgnW2Kk9Q2LA1iziK0e7/MC9qFY37NaYpw==","shasum":"af25d1a7af0cee68567f774b51716fa87da90e67","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-962ed642470ff9876e1dcfd8a026e18d262bc09b.tgz","fileCount":6,"unpackedSize":102392,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeq5iLCRA9TVsSAnZWagAAotIP/jpYLTNDtLIsjBOLupfA\nN5WQs+RYvI9FDqoAuXnxGX6RLhqt3YTI9b19UyxSnOMUdN47JfInJWkt3U9g\n0zQC8MpzG+KRqJyL2Z0TbBliTbe+OF3g/JEgOAj1lv1Y8FT3/T4whY6sx8V1\nfs70vZ2+lTsZohMwSjxUfa6IjhmFaJMY1XJX317eECR6MXX1WkImCcZQL+zx\nRvki0M1GH8PQs0ifnhmlh1e7E8O7aySxsG99o9v5QR0a2WB9isMPlWsMRjAY\nCEenyjrCc5UZKoedyIc7OQKWOHG91ta06B4tXoQSoyIJp6a2oh0kp7wqcnNS\nzTs/bxkYYxj1i4GVB4mLh4Mq4jyZVGIJL1rRxbfVRGEXpL1Q1QFHaWGBj4cC\nBue6sAmCLzN60BOjfraSqbPYxhL09b1PgBJfcoYIEjAO0ihj9iKItUABd/Fm\ngVgxnei89pkl811bEIlsoGSp5H/niet36+jYByZPtkcwNmgWDs1ZHZq3wcex\n4wqP0cHftVBhAVizvEDrKESTi0XspeNKprD/ilWLSxOv1Fe0gBEWBlBvqvMe\n7fZKpfsXlDr/gkVgqQEeMDpvFouKkwzvRG96EmzRvACdHHwTjMJtr9i7wmBv\njHNr7jCH8nlSexCrXBr858CkxXlugGFl+awlarDMfYzd4MCf8EuCLSmeBgO8\nLy68\r\n=ub/V\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDbuHml2otDu/8BwPcuWSELm1aFqS9dM2svLXBMDMULagIgXD1LkM5UAL6thAP9ixK4S4QlTNjDZi2UW4Fk+cP1GAU="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-962ed642470ff9876e1dcfd8a026e18d262bc09b_1588304011140_0.39391072604323685"},"_hasShrinkwrap":false},"0.0.0-682d3ce0925e8d6874bb5f290c3b36bef5136035":{"name":"type-route","version":"0.0.0-682d3ce0925e8d6874bb5f290c3b36bef5136035","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.1.4","@types/node":"^13.11.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","@zeit/ncc":"^0.22.1","expect-playwright":"^0.2.1","jest":"^25.2.3","jest-playwright-preset":"^0.1.1","parcel-bundler":"^1.12.4","playwright":"^0.12.1","prettier":"^2.0.2","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^25.2.1","ts-toolbelt":"^6.3.11","tslib":"^1.11.1","typescript":"^3.8.3"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"./build.sh","lint":"echo \"TODO\"","unit-test":"jest --config jest.unit.test.config.js","integration-test":"echo \"jest --config jest.integration.test.config.js --runInBand --forceExit --detectOpenHandles\""},"gitHead":"682d3ce0925e8d6874bb5f290c3b36bef5136035","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","_id":"type-route@0.0.0-682d3ce0925e8d6874bb5f290c3b36bef5136035","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-g5AxYgJcmVqFJOl9Uoj075ABXHrcUmiYK54TwVxI65yzqDL6X6sVyiKXeUzHCmu/X1B1Nh6npPLu6/VIq2x7PQ==","shasum":"d45e14b0be673714a690734104742b091340ed09","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-682d3ce0925e8d6874bb5f290c3b36bef5136035.tgz","fileCount":6,"unpackedSize":102392,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeq5i/CRA9TVsSAnZWagAA4i0P/RZ2NFa4wT5ZLu3GfZu1\nU/kynsqqnH/v/jNmEMe2Ce//JZ2Atwia+oQKeUzETqnFfbQPaaYiI7F4HnyN\nxTRx7lzhHv2dpJrDnhG4/TZ0Z7uXqjQNchGk27UzcYAb04MRRvw1d1/3yUDp\nMt/A6rde/FkbnUgCcLbPGOHT790ZgHPpQ0AM7COt9w80qnVrKrDXjighqgSj\nfib07wT6pdXPOiJtnZ3tQyhQES2uX9+40OVLvFxkJn9rIqquaMfcdrvBPZU+\nd+kNcn9Mpbu7Al9LuUbnd0uCL+FS61/DeO2PuYk5cWrS6ZCNLHLKeV2HTY2g\nJSxVFv6XFt34Lj5JSPUHyksZRbw7vc1wJlFfQrF1hDfCxFjtfSySecklsFHE\nSVAj5ky402fMf/gUO4CAjS8Hjwiq3akRY1UDk+4VL+6+2/YdD1tZTxwHx2H6\nPJvsHYhz/OLYKQj+qkedyFLzsXgONjLkhyQFPawnhR5I52580N9RQ2WtV7hC\ngs0pHVeVp6wNr2eL7u2CvcUPlNCYj7uyoVK6Cj14jG7Y5ZrEsfLBdXoontqV\n3ONOdC7w5YwnA9FCOzhdBWBB9F7HWBrdEKteWOpYdkyjcgrT3ugy6RYEMod1\nwVWiHT6vIpKu0jtdSKTUE3PObfJ9T3Xg+KPW96zVVZ+d967WpRiDIXdA0IX1\nw7x9\r\n=mXhl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBxDs4oGLqUFSnsO8PItcvMgAN+4Uf40zBkhFJBOoUiUAiEA2+U/Sy6CYoS+z6OyJboo7mHKky6QYIaq8ATlNfn/QeY="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-682d3ce0925e8d6874bb5f290c3b36bef5136035_1588304063003_0.06885233486402265"},"_hasShrinkwrap":false},"0.0.0-75f49b703343675ba5e355393fb11d9e6c1636e2":{"name":"type-route","version":"0.0.0-75f49b703343675ba5e355393fb11d9e6c1636e2","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.1.4","@types/node":"^13.11.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","@zeit/ncc":"^0.22.1","jest":"^25.2.3","parcel-bundler":"^1.12.4","prettier":"^2.0.2","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^25.2.1","ts-toolbelt":"^6.3.11","tslib":"^1.11.1","typescript":"^3.8.3"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"./build.sh","lint":"echo \"TODO\"","test":"jest --config jest.config.js"},"gitHead":"75f49b703343675ba5e355393fb11d9e6c1636e2","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","_id":"type-route@0.0.0-75f49b703343675ba5e355393fb11d9e6c1636e2","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-ODQlcUV1hhA71xcZqOS+ucwJ7t6G8mvSsFEp/rskDRSkNhM9ekF+OhXbBZXQkRT7Csge6UHN4ELkLvGpWnE66w==","shasum":"f8039fefcc452f08c2dc04c2e50f9a4dd74bf270","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-75f49b703343675ba5e355393fb11d9e6c1636e2.tgz","fileCount":6,"unpackedSize":106947,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJethFnCRA9TVsSAnZWagAA6l4P/RwPP7CR6PLSEqCAV9ba\naQomXA8EMbU63r+kcaitt6lCQhDGPKt0oYJgOMb0VzbLfPyNVMufDB09Hkso\nBRB3sqrAUhfIgb6UIdp+kDK/XNBo/L0sZHSFMtRCOk8x5kXWgkGWaZNdaAB1\nYFHFkzDrTMgR/ViDsIHRPuMT/nAJ8HO61sGGwCBWk4Fgt9K2/dj5tv47moUQ\nSpULDRZ+d1wHVk7BFBkkza8mTBaVW9OtydiY7Gsd4swxlEG/+okbJ+E48ctS\nsaZD/53bScem3Uw8KaopkYJsV6j4uZkJS3Y8ta9q46WWllQ/CUdOoA9EmvD0\nt6VTdfB0z6h/d4+PpvlAOkTSPFozkM/7Ff9ZPrY/9CcO8HoKBGvDOjG0CcO5\nOCN0wvFqkxB69c7dmxoALb3aNTv64xoIpPuV3pIh0bx05y00X2GffKDhMQcj\nra6IMzqzYekd9LJyxHhsnSV7ZRmhgJoX249vESJWMDGMtH1YL+CKzprZ030s\n7rQj95K6ZmK6yQ58Pf5OGlvfiwNgxTFQ042NdEtslhnwnBuqJCS3++Qok+On\nzjYwDwEn8b7q5thX/9F6+bVt25+iJKVLzkmr0TwH19/dTSjnRncB98trEWQC\n8cUrPGAnR+xyeT2A567VuqiRtV13BrOP4WTA62AwYSFu7oMLRpn09lxyQDSL\npclv\r\n=O+04\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCb9VVRd5stus1MYPoEz4Gcvw1ii4Ha1L8zpgQKRPDbPQIhAJ8PZ6pKf4UZWWSCPOZuVq/Kq3qBBXJh0ld95Du3H2tR"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-75f49b703343675ba5e355393fb11d9e6c1636e2_1588990310796_0.495214819066468"},"_hasShrinkwrap":false},"0.0.0-30aaa40fd6282de53f42c48f5fd559ac479b42fc":{"name":"type-route","version":"0.0.0-30aaa40fd6282de53f42c48f5fd559ac479b42fc","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.1.4","@types/node":"^13.11.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","@zeit/ncc":"^0.22.1","jest":"^25.2.3","parcel-bundler":"^1.12.4","prettier":"^2.0.2","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^25.2.1","ts-toolbelt":"^6.3.11","tslib":"^1.11.1","typescript":"^3.8.3"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"./build.sh","lint":"echo \"TODO\"","test":"jest --config jest.config.js"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"30aaa40fd6282de53f42c48f5fd559ac479b42fc","_id":"type-route@0.0.0-30aaa40fd6282de53f42c48f5fd559ac479b42fc","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-23feiY1MHl49psv4adhlgytOf7tCCYhiXllTocErGv9c8D29ir5+9kmnC6gBybyIeYY1HMtn/SLs0u9KNQ8qxQ==","shasum":"617af5792e9763e7f1f6be3e8b342b1ad2e6e273","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-30aaa40fd6282de53f42c48f5fd559ac479b42fc.tgz","fileCount":6,"unpackedSize":106947,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJethFqCRA9TVsSAnZWagAATkoP/1x0FX5ySHB8EF4Z8nG2\n/An0XYprqZjXfdZmdZjZFIfVhHuFHIt9Plrequ+6XlZynMC1eJwL4zHvcVOG\n80zM6202oQnHwfpS7midqNR6vTxb+XSi9M16WCdenaXEIlK5wCuJeVkuKw+l\nlb8rETvsWDaxLeXB4V7/E9PQUbDaXmBAzOax/YlZNYUBfmtfsvAKHxb/ujWH\nkcImKlTCvgunB3yOQMb/a0I3+/xMI0L3UbZrl48CngMrILyvFc++DRPxH7W4\nQO8WEE3QOzmNeNAMisru6YyqnpMuw+e3jyAxTVXN+LGdSlt4ZweqkesGD2LE\nJAJk7h9ZvzDKpOJC5eGOnlmRZU5BCbwdK58BvAgc6igeNrVIe+Gf0vonEW6g\napjvZKUXb56Mh19CYSWXWc3kV1cPEH4SKNijGxudm+cS7EiH3lOhYhy3a0DB\nHpbMooXTN0CXFnoXT8lpFx7femErXqUwNVx7WV8AVWpeKXcvbL8fJQQ25EAQ\nODIO0CAC3UyxA/DJu8Ar2VIGNRPSnPzdgWO7DcvVjoJ3LxTaqIOj21l0eW6u\n5T7ZI0rxoJIHsLpJFZKweIdAipzgVY5FA1izdmqgiMyHCzzkux7QcSIRKNyb\new8+wkY0c5iUZrfZwAyR9ddIpPOSHKC3K2CHob42jhoHqoclQMNdBsbPdRMZ\nDBdH\r\n=W6zq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICqUqx1JdbJhHTaKvYgJ4TVx0klUeBmnwXL1OGn6FYyFAiEA2+MSiQqxoRLnqkiE/Nn9A+PmMe8QeO7FhTTMXb2uyAg="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-30aaa40fd6282de53f42c48f5fd559ac479b42fc_1588990314125_0.3749466625176665"},"_hasShrinkwrap":false},"0.0.0-ec563d3567624b149ce53a64c9f3aae763b72b4f":{"name":"type-route","version":"0.0.0-ec563d3567624b149ce53a64c9f3aae763b72b4f","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.1.4","@types/node":"^13.11.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","@zeit/ncc":"^0.22.1","jest":"^25.2.3","parcel-bundler":"^1.12.4","prettier":"^2.0.2","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^25.2.1","ts-toolbelt":"^6.3.11","tslib":"^1.11.1","typescript":"^3.8.3"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"./build.sh","lint":"echo \"TODO\"","test":"jest --config jest.config.js"},"gitHead":"ec563d3567624b149ce53a64c9f3aae763b72b4f","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","_id":"type-route@0.0.0-ec563d3567624b149ce53a64c9f3aae763b72b4f","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-+ak4BnuyJgqT/DWH+LZuRWRMj6HX0p4ezOlxsABqlwxpPHvsKNc3hyJMWaZd8KomjmcoiIHCCRfL3fMAF6hjNA==","shasum":"d990eb18b888bd7634d1d50c580e2cb914250914","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-ec563d3567624b149ce53a64c9f3aae763b72b4f.tgz","fileCount":6,"unpackedSize":106471,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeth6ACRA9TVsSAnZWagAA0ccQAJpd8QkeT19EzOgVM1fU\n8sbzZBgR61VQkNBfgg1GhuaZY8ZlCvxYqXVRqQgTOFkPW/hx+jtMqqXXOlMM\n/vUDeGbsumZsKqC4mEGQiD1dGcNKVRcWFkGh3oDcZi44pbxIX/rlwuyN16fP\ns+qagQb46w/dV1eTAbvS2G/SM9HfhKuCPf5r+vllMTgB2UVPNDOXkCJv9vaB\nfdMHiqeh4OtnMxvC8Q8FoiKL6RyXO42RksryCCVucUOhrl4mkpxacNPIBJ4r\nKqL36PID7jS0x0JldL2bD6d0TfQDYoVYomi5rPx3aknRiNppZf2wp6zBO3Od\nbAj0PPqMuFvwNuRT7Ft4x3EHgLs0ytOxfCY3fSLHZLi/1zDVzOKqN958u0jM\n81kX0u3ApSx0b94IyoUC6qZZtEftXpCa1WDQ9sWORWswG4ed3zW+1cSxufYT\nHzY8QSNKW9hJsWBVMiNX10+BHywHmcy0LWtCbd2HgBJOk9xqHNmB/v2NQwnH\nGXMCJACdrueGwu8p49FqkCYqKJgbXyvNtF7vUOxiCbNCa8knFglZU8qkgpXy\njPlyVJ4NOFdSLSQzFqy9eZole1YaJp+3EgCYM7z+1tkTkxgGLnMXIpmZWziF\ncmzP+M1cZ5qPXujAc7C2eZgpSrYFNGe8PrMpitNOhZosz148a2al4qu4pMRl\nYays\r\n=plMz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIANotAoS0wox8m+4hKhCGhp+AaG5UpSfXqvRD+CJ/8JiAiEAx8aw9AvPir259h97JN/syS4jCBDtb5BZoQq4N4Fl7os="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-ec563d3567624b149ce53a64c9f3aae763b72b4f_1588993664218_0.5079151938195727"},"_hasShrinkwrap":false},"0.0.0-63df45c503addce2468b543149f1ab388d4ad516":{"name":"type-route","version":"0.0.0-63df45c503addce2468b543149f1ab388d4ad516","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.1.4","@types/node":"^13.11.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","@zeit/ncc":"^0.22.1","jest":"^25.2.3","parcel-bundler":"^1.12.4","prettier":"^2.0.2","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^25.2.1","ts-toolbelt":"^6.3.11","tslib":"^1.11.1","typescript":"^3.8.3"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"./build.sh","lint":"echo \"TODO\"","test":"jest --config jest.config.js"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"63df45c503addce2468b543149f1ab388d4ad516","_id":"type-route@0.0.0-63df45c503addce2468b543149f1ab388d4ad516","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-Cc7HaZxObf2EB4mH+rVDyLe8WRD/gEj7/WgewSUAdp8qUzEoE/NBlbhcdV+I9X3IREyoAmMRZTzbxtO1srKyqA==","shasum":"4c457c54972fd5c33bd34213d89a354ea92848dd","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-63df45c503addce2468b543149f1ab388d4ad516.tgz","fileCount":6,"unpackedSize":106471,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeth61CRA9TVsSAnZWagAAcZQQAJBuUMIh3aHh60SRz9NB\nmpHwwwMKB2yvuV+TtuJuEr5yhXA5gyYZUKJG2XFurURLNjXjRuXTSNMQWgW8\nFbsw+S54YR05QrRMNO3eL7WKx8PMhsRyKz+8Zc0EyEwCTEkOV2tymqx6FRV9\n3jDGP+dVQb6Gq/8G5s1kyHV1XZ/2oE4M9Sr0ubz0/jlZJS9dJW2R3xUzhtyP\nCeDSJNkvxR1nMd5OSzSZPSNyrFBCvjdrjWCD1qNbITKXBFP5mNINVyFk7hBp\nZFXMU3UIUig+pMnByupztG0/r101BBK3d800L3j2bBHwH2yLXf4WeCNfDse9\n2OTiSzCcz6glMlwBND9k9btAci64uR87215ypNb09viUtQp3Q8taUvp8NEHb\ne464VeEJ87/GyLCtEIEjnQZG5Kg6ooukd1IN55AmZxvl3ysvpJFgHfBDdMIj\nPsqyWIlJRaBaVLHq+psZZqTT/TW55vnxYkw8YN6y0lgJdxGUjS3AspJvbJS/\nPeLTpBQq/OuOjHYGPfxvAoN6ZdKGwJ8HTrcOwVoOLmt2UCpqpQTgs/QyT4/1\nBTjheAq13Jxa15N6RCXBBmz866MHdN5NVzXHiC4JHE62by1KIMg6u1mcn6DL\n+2+8y0Msh2tyYj+2klk4MhSVRDHVXMewX09WWHw1YpQM2VFzZuFm1najHpTG\nyUjT\r\n=56Ig\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD2c5aRZcDOcdZv463vwjfRdispLi8FxIl4PvFUxsYSsQIgbAojR7vbHHSlhEMjh/jJMU8fffi8pPGwBO/fBOYFicY="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-63df45c503addce2468b543149f1ab388d4ad516_1588993717537_0.4669934418304682"},"_hasShrinkwrap":false},"0.0.0-d35d5d931104703e109f01610a9c7aa756c078ec":{"name":"type-route","version":"0.0.0-d35d5d931104703e109f01610a9c7aa756c078ec","main":"dist/index.js","typings":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json","test":"tsdx test","lint":"tsc --noEmit && tsdx lint src test","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"gitHead":"d35d5d931104703e109f01610a9c7aa756c078ec","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","_id":"type-route@0.0.0-d35d5d931104703e109f01610a9c7aa756c078ec","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-rcRA0mw/5ZZrYWgtHy3DGOShlbntPGqzkAtqfLVAu92Gbe5hv9WqiOFnLxunRFfh1LdgU8SqNj6PJUQ/irEoUw==","shasum":"42183ef37840ed5509bf7a0999f804adf3f337a9","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-d35d5d931104703e109f01610a9c7aa756c078ec.tgz","fileCount":66,"unpackedSize":591304,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetvYjCRA9TVsSAnZWagAAVqgP/iVH9a+sT82yhZx37LWJ\n7zwmzOCanIpq5S64WSLouzUqKQ7qVRVG5Yzn3fyoS1H4sz1o6OKfzCtQLpIh\nELuyAIXcRCe2jKLGxD3R8t8AFKBMZg52T+xaL+ikrq+dhXYMbSDGzaiT25oS\nHmS6rL4QipStwbKgGQdR3t8kyu/IgYY9HHB/lVVkI6eF6ybEdyOA4SF1FGkW\ngAW6Xqvd2MTLR1bLmP8UvzKcsvS5QkfLK59N8mAVHy7uWCQSWue4lGcZULVk\nLco/ltoXJK4+G3O4TXTc1hCz8ONh+IP7mKpv6xt/vacjp1SH29zgABrTUHp9\nBqwDHq506MF8OtHt6kcNdaVf3aFtRoynm0L6zpQZxPHxiWJpYhE5lTMslxu0\nHSUQ/Dcfrx5blvUNJe9ZHtVAU66Y06yiWdwjs621eHsXNMszjz5s7Cy9Ym3f\n42Qg47UcvgLbiaizB4JFZ5MS3PtBXm1WM0/nEzP4K/H4XhQWUJa05iYQPfMn\n7m/J5U/lCrHvUIA7pQF2zMV8bFuQcvanvvDWmvA/tD85jfggUJ1yOaUhXxeC\ns0qKUtYhEM8bYA7Mt6LhzE1UR64mtR5ssvfxEyb/h/BFVhjCJEKev9xDv7mc\npanfU5bh8cK4eVhLoytU7M2bf+RZLOwSDmtSdkjAl6S5R8wgbEmil4MGI5Cy\nHDny\r\n=8c94\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDOmiupTBlaaiPmR7zuRdkV7/4Lw4uiynG9xb0DRKHh8gIgUBnQbNtt82mcec5bLdLiXjJOh3UoN3aVgitdxUbhs7U="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-d35d5d931104703e109f01610a9c7aa756c078ec_1589048867158_0.7220896252888365"},"_hasShrinkwrap":false},"0.0.0-3f966238da59349286f090647a055c946423d740":{"name":"type-route","version":"0.0.0-3f966238da59349286f090647a055c946423d740","main":"dist/index.js","typings":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json","test":"tsdx test","lint":"tsc --noEmit && tsdx lint src test","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"3f966238da59349286f090647a055c946423d740","_id":"type-route@0.0.0-3f966238da59349286f090647a055c946423d740","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-4LitRMJbBnGX/i1KNs2lVXbqq8QG6lQSTFkzZ51uz088adC3y3q49hAm5TRt3DHUxXNcInM5nqtSjinkmgWXsQ==","shasum":"36e1f1e236f6515bff8ed56fd0d7d9b727ad1e82","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-3f966238da59349286f090647a055c946423d740.tgz","fileCount":66,"unpackedSize":591304,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetvYvCRA9TVsSAnZWagAArQ0QAKSXuEJx3K3m/3u+f68v\nEENElmSmxW2ZXXMTnb/LQKG94VmvvbvYNcltfJyV92hFiwJwAzzYNvu5I9qF\ndxBA0CU2LNEF2Lf97d2XkVOdQJturT/tKfv0RcA902QN8RUE7ywwF+ciY2YG\nDv/AYnYV9pzB9Fl096qZ4DR57eYM2NWJOEDgAULzrzbJANRSSR3jo/5EvPs4\n6947/7Oo9JP5iqxKph6Yy4VG10llNxmzwlZFqFMjviDWNZLvzrzUaymcPUGy\nAs2TILP7mEeX0kHVac17DIzo8ry1FmWNJnSgMHEK6HfLEA9sEVEzv2tYYa+/\n5IxaBZQ6y4ApQQuISFD6x2Tkaz7j0rAa29YZwHnyT+rxgkvLeDCLSIWaC71a\nXRzUO1VAcE8pt6znvwZ3AOITNHP9QQhk7P5JcoZnnk7ptPPf9kgGRma1yloJ\nV9Zq/nk3PYdDc/9sDyh+m4XeP5Op5NosERfOnR2v5lHBQ++KfitiKiKs83Kc\nI4maKmuKJUGUrrSGZRj0HxvCPZc2bBRpOX+p49+hx7nB/NzpqMC8W+0d3uEq\n07EML0mgShSq47EV5stnRuG79vaJETcMpVKKTA2D7qMPJkm3iz3qyezSZzQJ\nt9AWxVN3g2Xt3izS4V4DVP1HT9iOxD/3jC5bnq+0gOj2qtg1aL1KciX34cQ0\nbgbe\r\n=leP6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICm5Qk3RzYKxo//+l+ZIPV9LtamFhFJXrW+Gi1xb3d9kAiAQsZJRxk5iUYyI/NfRebyOjn77h/GoSlaB3c2Ha5QhxQ=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-3f966238da59349286f090647a055c946423d740_1589048879537_0.22017076495232324"},"_hasShrinkwrap":false},"0.0.0-594b5c26e8709aaeec42191497fa388c79b5702c":{"name":"type-route","version":"0.0.0-594b5c26e8709aaeec42191497fa388c79b5702c","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"tsc --noEmit && tsdx lint src test","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"gitHead":"594b5c26e8709aaeec42191497fa388c79b5702c","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","_id":"type-route@0.0.0-594b5c26e8709aaeec42191497fa388c79b5702c","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-O2LE7pSrIHhdQaObfNlIaA0F867ZGE2+ywgSar5IEqt+CfA4UvfQaAkt22/D1cgw8TuvbE/QBxS0Up4ktkx9xQ==","shasum":"bb1ff715b13bb560c0416d54da92fb8c469011f7","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-594b5c26e8709aaeec42191497fa388c79b5702c.tgz","fileCount":41,"unpackedSize":545940,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetxBlCRA9TVsSAnZWagAA5WQQAIanDTPloCi7vIcXP8iZ\nRz92j4EYbMMrCDakbAsA5/gwwKhcq1qJ0UK1GUCWO2yB3XZXg+TZ+kz2lgBh\n5NlTx1yznStMdcmkQCgI+35NLia8i4hgbyvHgqaJIg7ZE4/H7g1pzyRqkDRg\n0Ec31Wt1Gdpo5FPBIX399ckUDLwfqBRSwVDhaScO4aUVVHaZn9SwkDdNcv07\ngXLyrLukmIbjFfKCFZkb8DGYgmq7/dC+HkrirSZ5+8YBedkJ6GtSB0oqJE2m\naHt4ceu6/WB4VdsrOJk842lbIwdy8adZ48029XBDqKbigzFWE0eAcGZLAxVo\nYLS1i5tMXQIFijjUgsoFoSDGfwNlrSNLP5QkPqc2KyiPjzX8IKk0+L0sIz1+\nf1sp2YhQbuauzo5HifTRYEKoS/d0V25XysiH0kXBwIhvX1K5KgalpxR7/WgE\n6dnSIS76Hd0p/BoKi/1aW9OgkU2X3dCdBtkbp5URJqBZZM0LxDjZvO7fkZcR\nZi4os10Gs5wgjovK6Oxxs8sRNgRNegGBaDJ16lRfKkB+H9Sj6V3apZ5PKhLs\n8RiF/cdmbMNpmQAI2VO+FtjJ/VyGuj90FlTAEbQjMcnmRGUxsEB71ELt9L4j\neeq18t+Ag11xPX7UzJfODZr2nmuaqLBiFrem3ZrJc33bS8P6EYZ/kwhBvt2C\nt8I+\r\n=C5B+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDIaxbeqrhW+763J760ojRsdAQ8MtCJs4SWnJhFqFejhgIhAMlJS+IINWqp0fxYZtRj/696CmQV3lir9DkvwvxScF3w"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-594b5c26e8709aaeec42191497fa388c79b5702c_1589055588566_0.6974248981304572"},"_hasShrinkwrap":false},"0.0.0-099ae7b5c836ea8e1bfd22c1f562a5eb4d6274e2":{"name":"type-route","version":"0.0.0-099ae7b5c836ea8e1bfd22c1f562a5eb4d6274e2","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"tsc --noEmit && tsdx lint src test","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"099ae7b5c836ea8e1bfd22c1f562a5eb4d6274e2","_id":"type-route@0.0.0-099ae7b5c836ea8e1bfd22c1f562a5eb4d6274e2","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-LksaRjjUROuWMGgSgdkOpKzY8O6xzSmhZuYn8/9+7kbL0iIUXOMjHeWjXwGKxuwUzrWmsaZJVLXJ6CoTP6RrcQ==","shasum":"0eaf4672f0e320e42086eca6289920f017c32685","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-099ae7b5c836ea8e1bfd22c1f562a5eb4d6274e2.tgz","fileCount":41,"unpackedSize":545940,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetxB0CRA9TVsSAnZWagAA308P/jd+LTKS4nV3OH/Vd69K\ns6EFnOSDPBvi3Ociots18sGIMsBSinyMzhKjjAhUdhyQKt8pJZb4XKLdGo9w\nlZFrXSkpJeQLsOLm9JtEH/2sDsw6pKnWNUYyyGkhPF69JPAtBfVrZ/fLlIV3\nbmEoSX8bsMZgmqCSNoxuafl3f4kanPGnQqQ/H50TqD90JdDjUVgSao6iOjoe\nNKm6Zv3e11Dcy7XsVJXu+SJmTaqReo4WqKDXaoHtKH+rTWlQRuCQjKm6HRCG\nq9e3AW8Nl6JstyK6M/G/jUENTajT8Ue9J1diJExJ4ZPQ5ZYK0hngroEqAYXp\nLrtvIamzAFb9rQU70sNTtPbmQwERzZHaQL1TnzswluQG6l8uhCdw4ORNwzrk\nEY1sf/R86ZEH6GW2IlX2rI6yxpUXI4CFYpHglt4P1U9CIG/0T0OMMV1wiBfD\nuhAC5gmQVGzPKBBOZnNs5F2grfTOvB7Mh2vsOu4dWEsO3WWPF7IqrRQ+6EGM\n0H+X+d2LLKn+upQBBAB2JFiTfF6sXrB69wh0urqRL9dGh7EqvwkgTp8RvzsP\n/qiDtz7EEcS/O/1pGS1fo6Un9+WeBjkwinPQEiy4xHgBNqRZS7oPTTWAu74M\n+zO9XEf6kOdcQGgwtzvb/OE39XQjXDjQFa6kaTp38inejSU0wX068QNS3hIF\npcyG\r\n=pLQW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDywyZ+VVHNTkPMKyAag4DKNL2dqNw6IU7Bd0hzunFOxgIhALA4IXAqovPUj9hbVxQsQxF42CcDq5LlCswqD8730rYc"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-099ae7b5c836ea8e1bfd22c1f562a5eb4d6274e2_1589055603813_0.24239117620324757"},"_hasShrinkwrap":false},"0.0.0-5b144a746fd85f673d72c2f7493c7996d6cfebbd":{"name":"type-route","version":"0.0.0-5b144a746fd85f673d72c2f7493c7996d6cfebbd","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"tsc --noEmit && tsdx lint src test","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"5b144a746fd85f673d72c2f7493c7996d6cfebbd","_id":"type-route@0.0.0-5b144a746fd85f673d72c2f7493c7996d6cfebbd","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-vw6vAbTBaMze2QQfFyUilkaxxFxy6FFY5yXdbTj53EsLh4atP52mXYheVGJUyc8/RiBMQp4A9BRtq3h/DoeL7g==","shasum":"849d578aef8c36e0e8b4df5400d02d7945e12d53","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-5b144a746fd85f673d72c2f7493c7996d6cfebbd.tgz","fileCount":41,"unpackedSize":544703,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeuFKACRA9TVsSAnZWagAAt8MQAIOkKjpGfi3PCmdOcNk1\n/vLCOnGP/er29zVSh5lekpPwW+5Yuo902LLvNKpN5PY02bNrBxmn23gq8T3H\ncXPPyBznr9dmVIYo3DNN4i9atbNkTAID/b0efz97xe0fmfHaV/N580/j8q6E\nMaNYtvbJ4sXIMNnB1O00Zoar4HW7IplcWYYyr6mkgwD+3qcDyKmGfMWyG9yW\nzubi66tlmHu8tPRMZJe84OMt6ViQN1iQ6G0Yh+SJU8IDAuasofeUVKWh2qjw\n30gq+z81cOOk4N/xjhGhUYDJ2B9HOyEnsV29lvEEcvhqM06RECF+XcSeqhDL\nK8STklpayaVM3I05p9urNIwKf0HATUY5r23caEsK7FxPSOHijyTOICVl9GT1\najDS3oJUCE27nEy5fs0Bsn0TREE9ZrGZgfULrD37KuQssnaWZsq3Tm4i6NLk\ngt5l4UFKSFEOrVzl7NmrK7UxlAwaRR9zdiulio4KWc1yAq56Bl94VgTwZ2mZ\nj9ml4j1zYqdtZsavGIVwr06aqug1L+jBD+XmxckslFN8/D2uoELzZ1wlAafR\nMa/O0Ycmbfe5Y1wGrn6SzBcIuu5aa5FQAfDsrUZZi+jDvQfdIbb63+vldwdg\nJgbTHx3+qbBxrzwUhQxK+nL8DI5ne1MjhQEDu4mHcF9ITrWplytB9wWfDWC+\nBjBJ\r\n=TObS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBbOFAy4EkuF0hksG/apwMBF9NGS+ko280CsaBBG5BRXAiEAxiuTya16/2hlmXlbnpwHdCB0JxWYHKJ+7XiAg5J4Ayk="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-5b144a746fd85f673d72c2f7493c7996d6cfebbd_1589138047688_0.1952012469323301"},"_hasShrinkwrap":false},"0.0.0-5f2e552511daa16a507de917bf95076032bd1b85":{"name":"type-route","version":"0.0.0-5f2e552511daa16a507de917bf95076032bd1b85","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"5f2e552511daa16a507de917bf95076032bd1b85","_id":"type-route@0.0.0-5f2e552511daa16a507de917bf95076032bd1b85","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-d4nwyEDhzLevZLmKT3MR9GFkrsb5QVwFv5HaDJdsKJ20cqY8w71NDqKgh3ArTCwXBV2xDLpMrYK2l7shkQ5AHw==","shasum":"5100b09efb64a1180ed8524b2e280845597225e7","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-5f2e552511daa16a507de917bf95076032bd1b85.tgz","fileCount":43,"unpackedSize":551603,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeu0jWCRA9TVsSAnZWagAAa1cP/Rx7GEWha0LRe+RRnpmN\nmqM0gxKMg85vWJ1DQVKZYW85C1714qvzDxZPikNpKeaqimu36+hEVg7+Bdv4\nzMjO0gaUHDghM6VEksYFnV4JeoYVinr8YKFpOhbhrGg7pxxo+G7oEpuPfF4s\nFHJLLoZTNfzvpKmkyBdiJ63LjAMRGLNg6DQ/iRGI7MigXT/bCz9nmEtUnIDq\nXutBtCqI+R2JOw6xVdAFEWnO7oAFv0UpbtzFdRn0DygtZR75wc8f8ScixpMG\n3yMp0KLcQxOP03bypw0QyLJIQ+ro8rr5p+uUHquHMc59o6h20Tj4PbqX2f46\nVTNDoI7TCmceOMvU0ApoSDa6rcb6wGqyMJqubphFFMcRLR07p7zy9VTd4awL\nxEACtKI7OLN2pLHoQAg0p5Nh5hJFU5x+w85haX7i+hauFTwHQGxYpeE06hv+\n6KFCFfBLb4N8psszdTHUauERY34dcluIyCzE+xUn/5R7WAap3Uu2G9fSdqHj\nZeCa4EqiINy8jqMfthriOU3QjyRV86txJjvZeSKBXoh5G0Iti9VRHRBgdgw5\nABuCHxf5LxnOm1hGWMytA7nv3E4efBoa3HcdZC+520BniRc8lCSk2OCB6R5r\nIeArXyzWrcitBmtPr6ZcA2MakPknoEeCbjri6ssaUrsDk0veeYcJrUhwLcaH\nq+oH\r\n=k+F/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID4urV2bepBxtTui4VzXaR00SVyWr8WqxPTxKmDVMlL3AiEA5GrO1j9MubPrbXx4sNRiERV8BXUxvcArvFUGAnTKlMw="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-5f2e552511daa16a507de917bf95076032bd1b85_1589332181756_0.1266725597828997"},"_hasShrinkwrap":false},"0.0.0-763a8074f829e16ed9aace3961f5dc949ff68ae7":{"name":"type-route","version":"0.0.0-763a8074f829e16ed9aace3961f5dc949ff68ae7","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"763a8074f829e16ed9aace3961f5dc949ff68ae7","_id":"type-route@0.0.0-763a8074f829e16ed9aace3961f5dc949ff68ae7","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-FepjmCgsAX0+jhS4+7WT2zbI9NT99B7gl2yQhQPiXJgulFC/49bhI0+O/Lf93WFgirt3C00B9zJP6iE71P881g==","shasum":"5b53f40a36d900b0d05e7e445aafed34b3711d56","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-763a8074f829e16ed9aace3961f5dc949ff68ae7.tgz","fileCount":43,"unpackedSize":551257,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeu1jrCRA9TVsSAnZWagAAAJAP/1v52p7SLCeNEc0mmmQP\nBM3yKDp2CWiMKVMqhye5fIr4PSuIUDCVav+uLx6lCHqL6dmuAMPqrA30eCSN\nSuHsn51iNnGyUmhOan30yMyhUlR3Nxj/9LfAMtmbLAu+l/un+Y4Tl1SGsIT+\n9ZvDVZMxtTEH4SJudk1c2QyYFffkxxKvalN4ohffUAsQrZKEJnjdeiU2S8lz\nGJN+aXZxofSASVDZWnmRROjxa0ljFApTtrO7vnM/wl/hRFH6zyCfiPIQHEnJ\nrug0XXF9RIR0aBCRG9UoNyr2L2VJezU2xPSFgF+LG/eBxXvhmHGg+l3HgSn/\nj3svdXc4qYVLn1igWtPVjHew10UvohGjSkusprxYaDJwuJxr6KMYDITf0i1w\npQQExxYu51qT3nCkzQVNeorGCpEYbqnwgeoNaK4r3Ch6pfujyvrrt0yv8FJc\nOcjTH2EROrTclu5gowjUwwF3y2z9C3fZGhELD3WJgFASw+SbQF6dJGSVKPcG\nC43SIlFRyBNkKAyqNlCx4Q9offRFXirx6vMmeFleDoyE9WTGue5ZF2dy+0ey\nHtnPvBfY/cik2/5YE6547Vl9pVVETydJdoC7QrwtZn4q9hD2jVE6WN/tXgnL\nso8yAPSbu5vU32Yss96qXXuxwp2/SY8BIA57qteHNNwZTD3FZ916yGdqvxn/\nlHpC\r\n=Jgla\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG6wEtQRODrgp5EsyRnfUuKLqfnOinLMgxSCjCPeO3exAiAAxQivu+S8tMD0FUzAneCsWEn51GUbhyOZ4JnNZKrRjw=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-763a8074f829e16ed9aace3961f5dc949ff68ae7_1589336298622_0.7013428044845236"},"_hasShrinkwrap":false},"0.0.0-ea1952321e15d9661ac44ea639b7eb289e8cdd57":{"name":"type-route","version":"0.0.0-ea1952321e15d9661ac44ea639b7eb289e8cdd57","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"ea1952321e15d9661ac44ea639b7eb289e8cdd57","_id":"type-route@0.0.0-ea1952321e15d9661ac44ea639b7eb289e8cdd57","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-jLw801h4SZo8R+laJtPtxbIgoJRpuBcNXfn8XncrcM1qRyed/sHr3hX+TzuDCvSAWDenxr8Tux1v9hzFPrwrTg==","shasum":"57e3b6bf128bb7f42129f700ebbf89f10fb5008b","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-ea1952321e15d9661ac44ea639b7eb289e8cdd57.tgz","fileCount":41,"unpackedSize":527873,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe2TKACRA9TVsSAnZWagAAc1wP/3XjhH/l5wT79LQ+axAk\nY/1dhT1RFXAOMKTvN/qKUO+3AwoZlNC6TbqaiTsda4GzU0tPXio9SIX3fyLt\nAUPQy/MP/oivPO698X2a7wZ2MiFHUJxMfLPYxLxPXFRNmrByAFaVzLvhHWTy\nbAdBTsEp5vemcsBufYp1G48q7pWbzIPW6mJCjgQn0pjcj3qqf4FLH7KXz8E6\nvF4x+KGMdYALhENhEHFvFpv71gO3Ye35WGsIrLHCJtHlw6VmT1ZOCTGSWaJn\nBh1k563OBr0Mq8VYbyp9qRDyp/gpx6lOiSJfrvGskTjNy6OeOMfu/aWtK8us\nM7oIWpm2BzubndJM+OY5AfpPJ8EGbS1CDpGK1te/pY3Gc7vwGDqOWBnjCmNb\nDA0omddPVXJ57TjQJskndfE5z9oRUTbaeI/hwsjv0eA1tNH5M+UIEemG2P4t\n7VjKQ1cIX5Vw7v/UVkb4TnGWSZoarQYem5pD5EqHovwB/SKGSKLIFBB2PhAX\nt/hregZLmWZi1FS8/QWxbnc0dRmrAQ5P2aMLpRuOI7xIXnZCXFTQHlZbHqnz\n2yQLT48PNfi83BKBgIbJ6OZMhVfAYaWQDQXOTJfq9+pJCw4fXl/ZhEbFQnN5\nj7rgc14s10ZPP1+fJvvvIVOQTzUVgHaWB2PT19B3TfzTL6PoCHfZXpk2J01w\nF71E\r\n=yF1C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHzJ7VcF65MmioGzvlLN5TmAgBX8dCOrtRih0+x2g0/WAiAlwmhEguCWJaKK/mhmgbuHQF4CZBpGE0sdQVuNebVDIA=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-ea1952321e15d9661ac44ea639b7eb289e8cdd57_1591292543770_0.4002987665515816"},"_hasShrinkwrap":false},"0.0.0-d2a2320eef322c35d8ea10958f124a91c276a7a4":{"name":"type-route","version":"0.0.0-d2a2320eef322c35d8ea10958f124a91c276a7a4","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"d2a2320eef322c35d8ea10958f124a91c276a7a4","_id":"type-route@0.0.0-d2a2320eef322c35d8ea10958f124a91c276a7a4","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-sFf8ls1OLP92wTKbqqvjodeP/BtpHKoEtkF6K3IX3fTWFIdN544ZS4Qp/kUdWez7WBG5gJjqXFvcfuAJ3Alybw==","shasum":"7a7a143cef5f74ed92b9c49dbf850b88a4a73d1c","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-d2a2320eef322c35d8ea10958f124a91c276a7a4.tgz","fileCount":42,"unpackedSize":555318,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe2UmtCRA9TVsSAnZWagAA49cP/i+S3QrVRLxkHSd+8kW/\nC/h1j0LcXawmtoiISkDZT12TeOzLG253RZUJKkc1BMpfELOKEEXy7Q/7jHfW\np4PJbMuMB1IlOi0AYym0a718pkjw0UQ5ZNw7x4YbCTksvE5vdOtdopx8I5U3\n/GwInPfp8m/puAHc6M4QnzOBm1wdyndIeJwhBpJY83waQ97AA62o+TeWJ+IQ\nTsTQ50zQPFNPQlr5MBpgGeIRhEmIbiJgWLbuAW3uNuKsKnPRMMrUzCAehpzm\nfZfkahuCWCvxydXLOCkzC2NVsFw/jsXzayDVMpTCSob2NdNUBDGImbjxSR6M\nTxSB9IYJPkVaoO+dxjn3OSwfn9FliKHNQZINE/xoqaFwGV1QfD+f04DD8hFS\n0/lQNSfG0LQSSE4WSr5I5CZ1gLyAjK8BBT+HLRzSwjR5RdfZGwPDX0dqvlWV\nP6/bEKHeKfwBV3/RmjjZ87dXIOX123zhVXAlnLl19SEl93+RI0ZYERQLcuXh\n9r5M/bz0cpb+LTIjfi+yNdh8TzTr9E5HGzPNaWFCF9Wo+dFWjkhKCIHF1in7\nqbIrJQhyk+NoBg6ewZ1syY4R+uXuZ5DJQhMhbnU5qLBOopqTHIdTrMTogbry\ndTOSVUtTVhMaHlhgqZNbfUYzMpbT9FYPEmZM654mfuhtBWQXxcXZsXiENUfF\n04Cp\r\n=xlgL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEHMgZ1vPVLfBiSICxG6FYlTKJAEFAswgS3L0D2HQrXoAiEAsuzcE2O2I0siJ8+8EKr+yXZLqnQQs3NaPHta4Vzwz4w="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-d2a2320eef322c35d8ea10958f124a91c276a7a4_1591298476703_0.5972903192965981"},"_hasShrinkwrap":false},"0.0.0-55cd57a3bde6c75ea2d9e3a67898e9e1c814b9ec":{"name":"type-route","version":"0.0.0-55cd57a3bde6c75ea2d9e3a67898e9e1c814b9ec","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"55cd57a3bde6c75ea2d9e3a67898e9e1c814b9ec","_id":"type-route@0.0.0-55cd57a3bde6c75ea2d9e3a67898e9e1c814b9ec","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-vRj0fSMYqEgzuXEPutYZ7oUahonPIl5MM3LDjWsalfJqisJJf573GQQZXL6PblYXbcHVPksyv6syaTB9ntil6w==","shasum":"7aaac747a4715295ca61761db13e4d75d6fd4761","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-55cd57a3bde6c75ea2d9e3a67898e9e1c814b9ec.tgz","fileCount":46,"unpackedSize":556350,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe2lE0CRA9TVsSAnZWagAAvk8P/2AbO/rnT1b/B2mbRFNG\nN+Qo9U4xJfJuxFJ/F+XrMsAs89dyNQFik6PkxQhpL6np+an1vIhr7FvFTgmZ\n0gi0Qr2E+VtAjtpf4MForK9LIP5rSB9IKjP2WWSH7caZFubMLQbPP970+ToG\n1OyDAki8XzZXgFv7NIPzGzfUzGuCvOrxdh2VOoHgKHf738ZVCK8eh+May45q\nscXjXbSmzcOmVC3IBRoX62d4cW8frK7SzGLG28fCQKJQg2lYXaSXFzr+79Q+\n8C5y/4hunW2LwP+fVqKjD65CsHyCgB1PWHm1mTjE9vbfV4BkOvLSix3fFXnn\n2msFcw93cXKYLeZcDuZNvmPK7WFH4tN4Mr0XT5QTuyWKH7GVhU/doScOQXv1\niQsBg9nmGt7pd5GWVjK2rk5bChx1JqZ8abARKmWg5UJpnWqjSHtM+3zd38mf\nKMWZQu9l9k0DT3HLoImWgt5N9L/STq+SuVKHo2adhsvLTcePpuPOqTyBEqOK\nB9Y6dIqUDQvSPcjjU1QrUt/lY19RwojbZJpz+4YkhjgUbMHvn5YcRyLAJ9DQ\nD0/tUvDEETw2EkMiKfuKOcoiumqoae2HUPsN8qAkO1EAdRP74zbXQ/IHKBQn\nvfDM8Sn8UGdlWGtZXH9M/ypW+/y8eeEe6JofIFeUReKsWPka9/Na9NrkICIb\nXzX0\r\n=mD7f\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/MzD0CA7LQEZQK3fQEI8kx+H+G899H4FbFQf0iZJv9wIgUrMZRfQOYaJctYXj++LWpfCqutjdJWsi+gcbyiMdxzc="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-55cd57a3bde6c75ea2d9e3a67898e9e1c814b9ec_1591365940306_0.17296931576289798"},"_hasShrinkwrap":false},"0.0.0-56108c5338e057379489bf686e282bbc49c11d08":{"name":"type-route","version":"0.0.0-56108c5338e057379489bf686e282bbc49c11d08","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"56108c5338e057379489bf686e282bbc49c11d08","_id":"type-route@0.0.0-56108c5338e057379489bf686e282bbc49c11d08","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-aVM45hl3vf7CijlI8aCNkG/8aCjReSyKejIX3qha+77dYrr+4ysexsqFm6U1aMwPfRHYi+ejAj6oHvsF2trMWA==","shasum":"95286420fd811200847d59d33493cb5a76e3babc","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-56108c5338e057379489bf686e282bbc49c11d08.tgz","fileCount":46,"unpackedSize":557548,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe2mGPCRA9TVsSAnZWagAAxkIP/3wWC2XfWgbRm58mjw8w\nUObCDsgAMjJg+7ud8BetGWXCAs3EyCmgSFi2sdYkFe36NaXyFlY2+7b3TySZ\nmmrbEYrMrHI9ZfBn97unBDAKOXqvnQpLZ67boMZV+sL124vxuEQan+1tfKoB\n1xffKI6K1n4LHArSQrjkUI8YM7N/kNcm3AgUw+uS9ydDklJ2bBa06GlH4S1p\notst+G3TntqDghNcmC/BbSDN60W06HdJoReCw08X/O8XvFtwp+waAP7ndkb3\nHGjCBeKpdD+KEgYDyxksnCnqIzIpbw6Z6rmEs4ET1LfYr8Sudbf3GdDpwPFA\nINc+zzU0R6gqPHP6tHxNSaE14CMF9y5RylBQCAySBoKAt5Fg90N1t+lXyuB+\nKiwjcz3B6Vn1QFT9K1jCU2segUthWR8RCL+F4VjjIAuLd7grWQArrxliQlxZ\n/9IAZmpe0d5Nu5b2lpajOMnW4hszKrrywgO60Fpsbn32TVJjjLoE1cBYeLsz\nWr6yPW0M02/a4xt6lEO1zmgEEVpSwIBnNYS+U7Mn9UVq0kFOuKEyJAM32MDn\nGqvgM0ysTFSpWfeywG1c0/XgFN5s1CWVWo3K0GI4sYKca84i3V9SRjC4t9CM\nIHvJs/rqV+lCBpb3bwvo1MhUzvDmco2c+j+PHwHRGPd088h5JkmhLnnbP5wh\nTNa1\r\n=wQQw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE/cU3V/95D9bjsAwBpyvzir4T6gmaP29WC/HYOqaGpKAiEAspc7TmyPDjoSqTezB3jtMfBHLyUG0kAs6u2qWwAmyP0="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-56108c5338e057379489bf686e282bbc49c11d08_1591370127290_0.9443181780029812"},"_hasShrinkwrap":false},"0.0.0-fb4857009043066982e9efd905f9e9dded81ae82":{"name":"type-route","version":"0.0.0-fb4857009043066982e9efd905f9e9dded81ae82","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/type-route-logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"fb4857009043066982e9efd905f9e9dded81ae82","_id":"type-route@0.0.0-fb4857009043066982e9efd905f9e9dded81ae82","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-gKx2taMWai16NF2mGY8Q60Co3dqjmPm6ipp8BQZBditrQjtcztGhLg4lE5JMdS825v/BM65FuiN3+SJdfyllhA==","shasum":"bd207f0648d348586d9083f81d4b916727b3e3b9","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-fb4857009043066982e9efd905f9e9dded81ae82.tgz","fileCount":46,"unpackedSize":557559,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe2wUiCRA9TVsSAnZWagAAQtAP/2Vq366DukDT+E3BGf02\nYmaaU4fn+QMrIYc7aw9u/zZZlwTEZNfsZw78ZkvqA1dnudsLVSndH6utu5JN\nUc5DUb154P3VERcgtMyfMYzd0SOWC0qSl9HHNoTNX1/35rTCFh6utvccyERh\neEvhE5tKZha3/9CUsE1WOEeHhczcAn7y2H79aqahbHkg/PmvO5I+U85qZgOT\nem3pNRnLG7qK4Wp85xWw8dLfKL2cYT1rHr4WGTtZ4O6TCptgR/0tHKzAAZ02\nmTcDPeRAVchwLvMI+EHkHn+NzHvpLOt0G7jmMmh7BX2u7Uv++RII4nDZfmvk\njj7jOvqyJCOyads8eU7gr0PnYPdvCZXDu089dXeCbc4Anm4zRX/L+Aos6l2w\nLblGRAnDZoKkRNmv4xVPAK8ESBDCTKAZIN6kR8Hxs5C1gpSoLxGf5OyTHELW\nr9tjaZvBQsV5wXWE/JOZIV6jSGLwpENorlmUkSqzUSrn00PEkARe1at75uKN\nCEVhZ36wuKwf4g/TgbmCcnLFo7nJZoIrD+RLQR/sQVSf4rVuGHFStvKaZAYj\naE5x/oCYAGpYTaekwvjD9Qt77Gzmfj4aisDPFcpGYcMv+5vTw5cWz5V3GNIS\nDZEG+vAacwO9SEDwWjIVvE3CYoHkIMXg/yOuuEolPFo2VU9c8nYEUrOUHypQ\nVCel\r\n=VU/R\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF0w5aHlNBezPJ2IkZb+bLUzHrICpUXC6QhCOYtzfGkuAiEA1Qc/41a2kkax87LnsS658aoTdcQQK4t4ccQcMJAL8i8="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-fb4857009043066982e9efd905f9e9dded81ae82_1591412002476_0.867389775372307"},"_hasShrinkwrap":false},"0.0.0-8d2df3eaac2ff9aff58788980fcd2f0582a7427f":{"name":"type-route","version":"0.0.0-8d2df3eaac2ff9aff58788980fcd2f0582a7427f","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/type-route-logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"8d2df3eaac2ff9aff58788980fcd2f0582a7427f","_id":"type-route@0.0.0-8d2df3eaac2ff9aff58788980fcd2f0582a7427f","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-/hroSqCAHk/PoDTAXJ9RImSOlxCGeWuCW5ZdswvJLWEZkouDQ9IX5HMq3kB46Lxc63jD1yo1K6uOT8U8pAkgYQ==","shasum":"5ca739d66ce03d8a964b2fbffced4a4faa15feb7","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-8d2df3eaac2ff9aff58788980fcd2f0582a7427f.tgz","fileCount":46,"unpackedSize":557348,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3ASbCRA9TVsSAnZWagAAmzUP/2NxwQLwSvHtb8w2hK6f\nIF1U3Qbb/qg00D6knjkEqwhaXGY5par+nQvHxNDI0zcmKDjDH/DGkrr32XAL\nQ//JlZdNws8hkblQo7eO+BG6VTi0kvEPFF9C3o1XfQwfm10wbgR2MRLWnpi3\nG6QnZbw2h80Gsaw5KXMN6a4S8BCcOEZzV/6xT268NJCUOMhBlaNxYUtO0ncK\nB807KxwaEl2fSfKV9cHO7tjKSiddqumdXQ5jWdgaPSDVT3G1DFH4x7iKhKX3\nNzURf3NHY6qvFT1436ZR/z2Li0Y6txLngUo3j21V3F7FPsL4Waznf59G85Ry\nUE5Kvvm4Oxf99giIdrDcJNjjw8cn8DGSTl6hDL2aQrU5bhM71G/90HYhRdNq\n3N/dAEXP764DIMIpIolUaDrmFdPBNrqItX1oXw/Cme6dAIIWAph3yp/ET8zd\nWSceExI5RpZ5Z8J8T4Ggjp9eiUEb8GWx7S3nISumkjRC7ZvDPO09L+HsBZHX\nZQdPEGDkgSdZwEkg+F2/YYhqO1SFD1Y38chhL/7hab+AukZFzRfMmEXzxdxV\nJInUKoJdEycCRT8HP18sq4bYk8/fSP5Xr72ZnjLnhbttlLDZU4Or1SALifm2\nKzhktUBJySf2cuCpZXkKwnDDQHVHVS/HoJkUwCYqugUgTINBFH3TWuZjY0X/\nr4Fj\r\n=BG6g\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD8C+jg+52BLlI6+ZgzjKUC0JE9bCtvnYvEJ3wFTwxU1AIgRoP+9fgRbjg5jLUEn4MEGEubTRd8+g4in/i2RW/dr/M="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-8d2df3eaac2ff9aff58788980fcd2f0582a7427f_1591477403138_0.40632747436723826"},"_hasShrinkwrap":false},"0.0.0-8a7576e7e341ca35b817ebdf4d155dac9d95f85c":{"name":"type-route","version":"0.0.0-8a7576e7e341ca35b817ebdf4d155dac9d95f85c","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/type-route-logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"8a7576e7e341ca35b817ebdf4d155dac9d95f85c","_id":"type-route@0.0.0-8a7576e7e341ca35b817ebdf4d155dac9d95f85c","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-xIe8SaG/xiVoaR/NjU1LHkg29EAFyg/FqNvBur+neOW+TRHU8dnn74xdHS2Jy/sRYuXZ94VE/syWIaPOMU36dg==","shasum":"0eb006d4d4803a2416f9d55a5cdffedba0cab1e4","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-8a7576e7e341ca35b817ebdf4d155dac9d95f85c.tgz","fileCount":46,"unpackedSize":557348,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3A5kCRA9TVsSAnZWagAAhDEQAIUPmUtCB/8Zw+f3TqIE\npo7j+Sula64GmD0mQujWErkWVQGUFbL1hXa+klcBe1sSeS8+aK5B2oNJS0+X\nHqgXYY1rq45sj2yJHKjRgsjYA2EKRIQ7IAD8ePWJ0CyWkGsXRqUTrOdX0p+m\n9pHumFmAnzjCdgbbVaVeKvfLhWLsz3rPpeOFaGHoq87Aff5f0uDIxv6Yx1U2\nzNOdF45NLqx7DuQt5SCuHiaXpUjdcoigKzfH7H370ir/d7ZOJXMQz3KLnn/d\nRiTGHoIzZ0M9c2fbWmZhAOceZ2jHH75FfRrpRS5qdcvHTxTG1bttDuA93IHt\ndbsZHMjLYL9Nm0PowvUmmyo+LHdT8M4uWqLPmgM999km6wGOh4x5nuiUzEkU\nIFudH7RNrYWw1GS7GjzupP0Kv9A/RTPndbT2pqXMemHSAHTMgJ1IvTEAM/hU\nGjF0MP8xyP9msJyZOjxmgTUh5xbCB1e6bue8jRnjMag8ediXE8v5r9c5YCgK\nzyiXysNsSue4g+pLmPh3TZVhlUtfRQ0AjJ6PkI3ITXhibd7xrBXxlhvEzDka\nNMEpSQsmJ0wh3UvICo5RoKWmx65n0T9PWVjk4N15vivQvcvCPZCdgPqLSjFx\nLJEPzE6OTRLBwsieb0WS78g93U4oKKvOV7+I6na31vBqs3fpYa63HeSrun4X\nRVcx\r\n=HS6M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGWzxOQ1Pnd+1/E0Qo6ROWUCoe+TyM4MEBfseuywuCoBAiEA54PgE3gNLSFHVIhO7RypdSBQiHdFXFA7dGvLwGgVj0Q="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-8a7576e7e341ca35b817ebdf4d155dac9d95f85c_1591479907814_0.9994169944229869"},"_hasShrinkwrap":false},"0.0.0-4f1ee068bc0da73a1d46e6a269182bad8d05ca9d":{"name":"type-route","version":"0.0.0-4f1ee068bc0da73a1d46e6a269182bad8d05ca9d","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/type-route-logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"4f1ee068bc0da73a1d46e6a269182bad8d05ca9d","_id":"type-route@0.0.0-4f1ee068bc0da73a1d46e6a269182bad8d05ca9d","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-wOcebpQKsVhcIS5f/6GQeS4oHKC+33MWNMBwAqXwQKDt8TrAXHG2obfZ9RNNsUp1E2+s4IfaUqOm5eSSbtuEAg==","shasum":"15aa82d7340864ef7bcaf47d12dcbc6cf4b5247d","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-4f1ee068bc0da73a1d46e6a269182bad8d05ca9d.tgz","fileCount":46,"unpackedSize":557348,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3GoHCRA9TVsSAnZWagAAOEEP/iaI/rV44LiUuKZM6Q3I\nDr3/yZP8xc1kCsCdp4lNp1mRnyUQMz6nRBS7kfuOwK1rKnINksr5cT3BYRrF\nE9x9XKJHG+YCOxGTlsaQKE3H47PySw0WJeKHy3dpJFsLLvTiztARXZS4fryZ\n6WfAzJSqOhko8clreGHsbhN6FSHw1qw2FVk5WLFrQ0rd/VrVSGUW5Om+55Lx\nlCPZ8blHemePFOKHUR6djBFeYa+WReS1UIcVLgrVMWzcsBN7XWyXuNI2FAJ8\nU8kkIC/NccCuNKLpwJeMXgQcsvRx0+4J193aJA9y3r8NEB7JaBH1OfIXuLN1\nW1lZRMrZbVOLgzyV8Ie9hcG4aEAraRXnnyIP9sW/nQFeg5n6VEFwauyZk2D0\nADTQx2fCxWMoCEuYRLV+C1KGY1jRAoFtKPJgUI2y8AADtPXdVjDOnlQcRNkW\nj9iqlWHWdgTVcBFOSZCiu0DwdCBfZVSOhL3JCO4pEs6z+y4c5jz41pPOkqxK\nJL2olRmgjtd3i/OsjsPWnrMu9eFgfUqexWykvCde/eM+6M5lCg5trs35OLaY\nH5JddkB/3ojBz7UIOdWAr1RJaM4CiXAsGjX24mpCr47JF+j4juGoxHEQapfe\ntubLndsZnbo/brVjHqul/XcSlLCmT6fsPsiNQtEDzFgHncYpH9e/nEf/Pcxb\nvVq3\r\n=iHmF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICyYPxbGz88boT1jw9Nu/K/Y45cxilfBcBCdhamyvFvxAiEApXGXogs8gFgRI8/ggf8MEMXIInrvCJSxVD5s4SsXE8s="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-4f1ee068bc0da73a1d46e6a269182bad8d05ca9d_1591503366521_0.9654664707296645"},"_hasShrinkwrap":false},"0.0.0-ca4ab8e929411e5738d5b3ba28b0f428447ec514":{"name":"type-route","version":"0.0.0-ca4ab8e929411e5738d5b3ba28b0f428447ec514","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"gitHead":"ca4ab8e929411e5738d5b3ba28b0f428447ec514","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/type-route-logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","_id":"type-route@0.0.0-ca4ab8e929411e5738d5b3ba28b0f428447ec514","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-5GGejRfE0qmP8otjc2tTvQXsgdtYkI4ufiCVb/NVdvp7RELgPKpsJBBu/S3EO+BwnApjJfKnZu0cG/kQI25oJQ==","shasum":"45c85a3c6ae8fe0056f07078c61b971ed85c0c97","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-ca4ab8e929411e5738d5b3ba28b0f428447ec514.tgz","fileCount":46,"unpackedSize":557348,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3Yr0CRA9TVsSAnZWagAALAAP/RZ+BCAg0fY4BOvRlUuh\ng6ZBTO851M8CKvm/gcheTsbdlJYMSmTaTkrO9O/nF5VqQMpaL3nEJc7eF6Pp\nfmPruxAGcaNRn3mKaRbj5VqejQoAc/678JQvkePlYhwy6Hcb1FViMv7rbm6g\nMEswT/LK4zsRoj3AMmfRowG9t3cYrbCKv2z7T4ph1g+lfQEE32sVlTl0Ob2L\nO3OOuMjx5YtvXm+P9hMk1+Gsh4vySTiGn4G6D+shIuE9KhXtPR6gejc4BY16\nUhRfge9djeQvh3vlbz1diwtsPPsjXs5JGxhjdTfE4SOWX+PYP+kDFK3mfTfr\nlKF/mIkqyy2MkmFn0v7tAr8oDgnDKklsVXvRLHp2gm1ESwvTEIJDhRvGn2YD\nERicq+HQFUWXcp3MFKsoHV1NbCU7l3Qf5Rl3T8DeSlWOayptxvk+P5YryA2K\n8bCf9B2VrY4bDZK601SDU3Wjh6GMQtGUv0c7i7vJ7nkAMgNuLOUhd5SK2dJ4\nefYC44P1cXljoYR4gwkN19ZrCW7cZLJZb3rDbJcf1OkDD0DCuM/k02smLD+v\noNwWa5UHR+mpcSuOXF3I9I0E9Sv15Q+0sSioqwXxvm6WBeWOVC1aDkG65FwG\n1kOQPq3AK6X+RE8FlFdiTcHKzUw3Ryjf1v+54ALQtoIMJM+JYwf/ZYlZaQjl\ntDay\r\n=ASBg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQrWu707g48E881BVCUhWZMGzkUwXk2QZ5QXy/gop3AwIhAJZU0x60MJ1IFW2iXxEcwYeSxVa1VrBdIAS4fv8M99HF"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-ca4ab8e929411e5738d5b3ba28b0f428447ec514_1591577331372_0.11782604975346"},"_hasShrinkwrap":false},"0.0.0-e0804d1a6937645d78baf26e8062d311a24a01b8":{"name":"type-route","version":"0.0.0-e0804d1a6937645d78baf26e8062d311a24a01b8","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"gitHead":"e0804d1a6937645d78baf26e8062d311a24a01b8","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/type-route-logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","_id":"type-route@0.0.0-e0804d1a6937645d78baf26e8062d311a24a01b8","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-Qa3/Gs95rSe3FNq20g5SoThB6d+7i85ohS+FYBXu5JKz5xJCb2HSD0UYazN0VosfIC2Q8NWgNiL8Gje6/ECdDw==","shasum":"cdca5c86de932d6ad802f4107e09a67cb97ec882","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-e0804d1a6937645d78baf26e8062d311a24a01b8.tgz","fileCount":46,"unpackedSize":557380,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3YtBCRA9TVsSAnZWagAAyRgP+QDSICddlCq0qFTzWG83\nXd2IbzFGDT6RvBEz4GMYEtLmyjg7x09e9fWdhUyx0ZTnQND6MOhOuiaiYV24\nn9DqiWBAMxND7bFopNb+TfkUJvtQpgFVD1YXc8ZonWYs5i6MeC2ayDFt7C7B\nDCCc69G3DKO20GoAcR+VJFgQU1j7MHZmTHZ5Gs5bVku3xZzG7rtD/D/dNIsd\nkbhcstHfX4zVRvIyX7mr1RhGDT5rbhP/+CvTy6AgOzseZEQ68VNWgfKHxQBb\nhLuwJ3XJBKrEJDGhDiJSwrANuTRuxUnAOfXoG5tByVSSUJHvTfVA8kKwAZA0\nIyC+TT9ckNU8WHVRnKnepoQZ2PO1MjnVwJSYKwnoOgDC7AloVRzYbskZX3j1\nIpfovLsCcnoAPytFNymGcX8RLcINIr0fwWd1lVi/GnhCPIDmaSl9QV4e//RS\nAp3qyizG73nvGo23U/ByJVUST+oxdSmQsSDg/D5R/rWBIgPLQOViZZT7jgP2\n00yXI/AvN4718BFmtt3xNDOlUteQuMD9cjKqeXC3tEv1BazDpQX6+ZcMMlaV\nsjPRMaHyxQRgHQzdWwaimvE91NrPf+ILeBNfY5oyzLecBmmX81++POEBPfED\naocb5GeoHzdOkZ5RuTomaOY16w93V1plTKEKZZaXUt5ElZpNueNNwx4To+V/\nAdMp\r\n=1K4T\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCH5r9BQuABBQYfEcoGboEKo3D4o8ODfIhRSHfdVU1pIgIhAK//fE4Jhx5DLz3zuXiuWCn//aKZTueJfVW/ckzH/q6M"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-e0804d1a6937645d78baf26e8062d311a24a01b8_1591577409127_0.8018286327366071"},"_hasShrinkwrap":false},"0.0.0-b7d6151d0b40335bfb04f2a48c0e6120ce78962c":{"name":"type-route","version":"0.0.0-b7d6151d0b40335bfb04f2a48c0e6120ce78962c","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"gitHead":"b7d6151d0b40335bfb04f2a48c0e6120ce78962c","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/type-route-logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","_id":"type-route@0.0.0-b7d6151d0b40335bfb04f2a48c0e6120ce78962c","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-035C/uzX4rKED4/4hGHjtjmSZSWz0inDq2YZDtOmEnGo+A2azOBZ/5oaZFM3Vk09jqNLNRJAm7USmicst7E5ng==","shasum":"9f913731102776ef56b415b9df24d264fb8f4803","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-b7d6151d0b40335bfb04f2a48c0e6120ce78962c.tgz","fileCount":46,"unpackedSize":557484,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3Yv/CRA9TVsSAnZWagAA7k0P/03nceiwnmvRNXibDp/H\n2gIr6h9XFF9ENB1P14iMDG+WlWK2cdJy4+mJqLX9XNAf3OAz8iHRmk6nm0ww\ne0yZLU9YLU5ws3DLtxpmgkp+YyXgeaCcDpq0RLhX24D27Z5sabSRP/iffAFv\nkq6yrSu1znKPfG8GLHbvh/Z8To9v16yQ4riTyEs9n3uvltjP4ejQymNOzhdg\ngY8tMW0S/+Kr4R04Ybr+efpq5Pt5gZAqkNjR95vrjz0HRIgTyni/We/ecsL6\nK624+nKGSWQhBxjwFwQ0MqPP+GBpqfzDuyNUM1+CHXlAqSEHn7ZaYUe7WnBX\nkMmX5hllryLwCRIOs+84iBD6ygbQbTzAbMl2XN8Z769rYQNxI4D31dazKHoR\ndYXl4/Bn00WgyjCgP2k6O2u4I3+r0z3L4Mf09ornDt+8vGyRwCDHSCN9glWo\nDsbf8J7SsDgYZzklJFtPbJlG4UtcPlLN9PapK3xUmRKfULuRgUovoeU1ZVNs\nVg+0ewzciNO8yNf5AkIRT2KvxJAp5EttQL4IGHztkV2ok8yIs+gfD+SSXCUj\nMV9o+YYzL9OGYdtBnHq3jY0vsyMqq9T/+GKOFe7RBGRcq33MkgiDBjPvAdgO\nBQeW/P3nZhSoDi9Y3qzz1g78gWy3hqHbdfXJGum5K0SE5ApTROQJ9Ydl1gVT\nCdoC\r\n=lFws\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCdLsw9SKO7VuZ9usDc/WFUqYtQqR7qaEZwwhHMWXtfKwIhAO8wTzT/ZnkhNHBjGauTK/e6YBvbhGb6EWRowqm0N0LS"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-b7d6151d0b40335bfb04f2a48c0e6120ce78962c_1591577598832_0.07668137245033613"},"_hasShrinkwrap":false},"0.0.0-829ac9335de15cc46a894244f50372a336da4a72":{"name":"type-route","version":"0.0.0-829ac9335de15cc46a894244f50372a336da4a72","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"gitHead":"829ac9335de15cc46a894244f50372a336da4a72","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/type-route-logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","_id":"type-route@0.0.0-829ac9335de15cc46a894244f50372a336da4a72","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-dEqJ0DwXBOidiIVsUC/W27sHpY6CUTCzNP2IrLUDDutTM0GOelSmdmAbwTQCIJE3vY0E5Mnjh7ujAfHlwJVndg==","shasum":"2a33d8e4ee8f5ad098b1333149167b5038d2be61","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-829ac9335de15cc46a894244f50372a336da4a72.tgz","fileCount":46,"unpackedSize":557986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3ZOgCRA9TVsSAnZWagAA8rAP/REknKXCNqyEWOftEEZd\nGnGpA888Q9A2fK6+3IcgsHYag76KggwmFvfkA+HLuEEG7Bs65PdNjIGf4vzx\nlrvLOkOlbjD1NC3lpNRpGQ4yL1CyUVc+mNMEkiDAKsYyuvv5ibhU9Pzd86rc\nhotctXCnkhFge8wKZrR/g7SES3oox3D1sKy1mh3zZBoz7Dx8BH+wnHvz3SNo\nW7U7XqB3g+VHPPqQJYw9FWhSomwuBSBOsNrhWJe+gmWQ5BwnSwxI8V1dDjBR\n3r8h5xuUuNWJGLwEsDnt2rNgV1dA9ObOAVckIc48JFZyAkPYjRsJpmhIY7YV\nRL3HRv9kg2wijreNMpCs3seH/fYAujNC9652mjlyk1TAC7AmguA/EZomhSkz\nF4R0nwgg0wxczJGOgyYlXDAwrtQEtH/wHs1GZZsTgdun6Lv8xxBvLGZCqeoH\nv5BfEqGm8gnZUT6DH+6WFHTJWkiORuWAK5r6ONzpRmqhNxPdbVtOB0f4QAVj\n5Xg2EgQ3z13DttecAH1n/hXk9OTMy1sahXnyEU2PXXmlnMcmi6UBgoh7sfnC\nMDkaQz1Ym4wEU3on6CDjTV9wZM87weyVLyV9EQhDfRgMAOg/Zg+GjSOFwDs5\n9rSLnbb6Xvb0jVq9Ej/CQOWiu5HOOzQOMvAv0e5LyItiVe7J9/EF3Y+Yd7UM\nW8f8\r\n=d4e8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDS9uVvPwUKDnU5ylt3nwe6vY7dBE+9XS6tmdyF+zReBAiA7LxUIGU5AUpOnas/S/Wub12FawoHVDmviNmpyTCo4nA=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-829ac9335de15cc46a894244f50372a336da4a72_1591579551589_0.5071809673172163"},"_hasShrinkwrap":false},"0.0.0-68f354e28dee82518bc96e44a0271bd082d632ff":{"name":"type-route","version":"0.0.0-68f354e28dee82518bc96e44a0271bd082d632ff","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"gitHead":"68f354e28dee82518bc96e44a0271bd082d632ff","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/type-route-logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","_id":"type-route@0.0.0-68f354e28dee82518bc96e44a0271bd082d632ff","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-VzhvDVIVivUrERObnWcZLT9h+VfEOsxQjrudujVtchwV9wZmTPPskjo/yvcSniLgl9fIBWZZN28u7wMCFIIQMg==","shasum":"febd42457bb8a5311fa87a071cd78ee33bb72590","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-68f354e28dee82518bc96e44a0271bd082d632ff.tgz","fileCount":46,"unpackedSize":557986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3aSLCRA9TVsSAnZWagAA/GwQAJ6amTmthSVTT2rk8inR\nvtA/gx2PiehaafRGgZ4JRUh55Si1k4ewgGjdYtC4k4HnA7WzfPIaauoVTh3q\n4sHO/7x61jkE1j4x3Eut2+m9Zkwo2Cct4v7thwJaJZsyhp/KkN17/zEEr03v\ncmzKnnsRs2TC1iSfv1I33Z7cZQfcEbKyeEI63eTI1U+7xvsC452jjxJcaBVp\nXS/BhESRkKRzIIuUkBXg5IbthA7KCgkZkTAuptPMif2BJMlh9ajwjAeThzFL\nBePw8Vn4Ip4+1iQxzVNQmLMocXoeOtnKBlGn8bEh+QYqotB5ZfznWxmVCwSn\n3nBT+ZS8Uu7PN+Rfdkcu3uKXokto4EffWPb1Q7t0E+ZRjsgrsY95vWNBcU3N\nrfM0Mgl0sfS6HfXHprp4M/Q8HA8VG2OvcvRpc6iwXhAR4g4EYbDcyvdgUED+\ngMt8bpUgQ8IbcFEhBaOHuCfrGegMBJ2RON9VRN6VvkGf0rWdtH7WoYjgYk2w\nAIwXWhoOwFjq8dFKbgbwS9cHlE97oxjDDwVDKa+NMIXsFWxg5od+/hB3u7RE\n0XLo8mtp6UIcGKZ0oZuZYMPo9DOTkqe92eNkXYcuRsYQ6TVbQjypdOjoDGew\npuEgcRNmVIJQX78hBJHk5O2Cxg0+1fGGfGhcrWisWvRR/zoXJOH6Hw4cbrVx\nVxm+\r\n=3hQc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCyqf5pKHppyAiTCDW7BJzUk38IoFYXhY8uI4cxjMFx7AIgKved8a1A+BRrfZgiEDjKP06JTjEu9E3jAqXUvs+EKuY="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-68f354e28dee82518bc96e44a0271bd082d632ff_1591583883178_0.2609853103006954"},"_hasShrinkwrap":false},"0.0.0-94b8cc0bbf3a6f51e3491925d504e3caa8e24fbb":{"name":"type-route","version":"0.0.0-94b8cc0bbf3a6f51e3491925d504e3caa8e24fbb","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"gitHead":"94b8cc0bbf3a6f51e3491925d504e3caa8e24fbb","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/type-route-logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","_id":"type-route@0.0.0-94b8cc0bbf3a6f51e3491925d504e3caa8e24fbb","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-3B1axL10MiEeanN3eIWe9u3HOw7iyEDoMwEm1uViC6Nt7LjvFEt0GZyDr8cQxR5NdBtyKjzn03aB1qMIr3t1dw==","shasum":"20121e6e430701cdb50b1f93d21d7f818131c95b","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-94b8cc0bbf3a6f51e3491925d504e3caa8e24fbb.tgz","fileCount":46,"unpackedSize":557986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3lBlCRA9TVsSAnZWagAAWYsQAIhyIuDEkkSmPv3vzSco\n81aSIfkMiI8RzwhwKcFeIpH2W0pGJWj2Mi9X0ylf7ABVkMjXoEhYR312LVnL\nwI4FXutggJ3cq8qP6OHibPPX+1ZUwtxzoGQZbx5tU1doney38mrVDsN8rK8f\nB2wxLw4tyoTASH0LkRZ7g5wmpnSgYwk5UtwgfFfuA8bYgGDfdUAn28WtFrhp\nbCDKDMYuKRN3j0llt4PpAwNUBL4CddtrX/gtiUHVy9A6aF0yKtJJ5dPeBPEP\n3tMhJ+vy2EQ5kLesfCNlB8HE5WDqdvZcZjDEfyCKknjGvfMISz7mE4zgalwK\ns5uWH/MhRzVt5RqqpSf6ap8HhqgTRwQGsUfNnPHIinSzy8LTR37Aw1H2O3w+\nXhtjfqvRbD80j8f2IxLfd6VhuCPmms+9/ccmuQc3H43d5LBsyMIcae1EpoA4\nEwIBnqv82ivkwD3F8TJyQn3zkruhcVSZjzL7mDPPcP4ro5wC4FRbOrQuKSGw\nSp2jLQL94sfkp2YdAvSFrdmbLW2oyW5yJL8FL2dt6zyqqAIoTrasCGCDaEGz\nPqT4VRfp6MM7fIOkRa7hhs42iewMSUot6cAMoei5E25KIQ3bxH+5y9FOkuIz\nxYr6GLINGjBvvjMzxgx75EVp+geJ8MHHB622UEBl63L6etsq8EHlVDEfsipS\nkAl2\r\n=8llR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQ/0uMYfhh3IquxNU5F9AgsM42QQ3p8CDvzQAw/hmK7QIhAO9Dvr6IRw50a4/NoChUdMS1hm7ajLfNjU0TVkX8RFmy"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-94b8cc0bbf3a6f51e3491925d504e3caa8e24fbb_1591627876617_0.6359088597262159"},"_hasShrinkwrap":false},"0.0.0-993794d536dbeb6a4420b1031b1b009db0c9e901":{"name":"type-route","version":"0.0.0-993794d536dbeb6a4420b1031b1b009db0c9e901","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"gitHead":"993794d536dbeb6a4420b1031b1b009db0c9e901","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/type-route-logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","_id":"type-route@0.0.0-993794d536dbeb6a4420b1031b1b009db0c9e901","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-4It/FodYrqI4HpEZ0D3ZoqQigexjgq5jlTpjxYDlDxRbNFl6Lni20odkeSm101ZLQFb3yQqGuwUWVtQm3fdHbg==","shasum":"603919cf51b445d1584b3b9d4128b235425e12fb","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-993794d536dbeb6a4420b1031b1b009db0c9e901.tgz","fileCount":46,"unpackedSize":557986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3lOWCRA9TVsSAnZWagAAgrwP/1QjnzT7w1wQ82sNcuO1\nZ7rIfy62ve0gvhIgNVDGRmxTZVW3lCt+olRKkEceQIH+n+BFOlpUy2fyQN7A\nx7ZNbZ3I0jlXyEZAA5syTUxV5MZcNYJOD2UHs07U8F0b7Yb3DX3xnR2qYLjf\nr63BW7LmVITjZbTMgLRuNr2jZhLmuJXoIwKKmhhbsB79S1utD6Yfm23bXxh3\npLi5PRM/14hlpy5CyWYp/5ILY0KR5LI285GVJa3Soi9r4LDV4cYkNl6omAkG\nTBsBMRjUWopv06p+lJZI1CIVBjjCLO4C+TLuQ4/seaYTcb3AXpdohvCEgyLh\nwKc25zaC/+W37+z4FXZULKn7NXO0xcAx2gZg82ClJ7SjKy8KwJuqhEp4DsHL\n2sEvaYQcaQv89IpBBjaefTB5cldVLWXzdvv7/KO3KJgKa50SW7kz93Evbjm8\neneb++gZYBK57UL8pUp4IGOFUGfkvZ5PcQfV15QmZ+nPsLAw0aj/amriDJoQ\nVxH4PiGOTwEgwrh0j8c2xdIbrIw0m57U1yiZRzqjX2uEwGbMK2150QFwFz8f\nLX1AJfKZT45VW7VK1GZvUgbsLDB0InN3Qamg90TCi2JF0xCROooML+gW2tt2\npJUhQLUxo3BwySI9ZfuoJ+KzoYCt8LvAnM0ADewNAL75mjMPtkIMFNGm84/m\nnBI2\r\n=ldE4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICOauRzEffYz+zql9YGkhSo9UGxm9HUvoch8IUpRVVe2AiA4ugOUuQggF3A/f8JbnMzoS1ni9XXsTI6f+WS7wfRTGw=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-993794d536dbeb6a4420b1031b1b009db0c9e901_1591628693679_0.6722820806104142"},"_hasShrinkwrap":false},"0.0.0-db5489522feacd61f29be3365d406666b410a675":{"name":"type-route","version":"0.0.0-db5489522feacd61f29be3365d406666b410a675","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"gitHead":"db5489522feacd61f29be3365d406666b410a675","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/type-route-logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","_id":"type-route@0.0.0-db5489522feacd61f29be3365d406666b410a675","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-F0V/YyCnBhBmsNAKpCh/WGfAfsh03AHjvhsXD9W3NwOVR9V13cP+cmmtVphv8/l3Zn4FMhk2nIiLBwrZI8/mig==","shasum":"2a1704959f0792865023635d29ebde8dc69022b1","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-db5489522feacd61f29be3365d406666b410a675.tgz","fileCount":46,"unpackedSize":557986,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3lcPCRA9TVsSAnZWagAAmAAQAJMyb17Bd2HCM1YG7USv\nS5CfIVRj4OEckmZQcW5vT49MA79aHns2+RFHG+h22n7UIPJ5d72FXB3lZNFu\noexIiQfeYRI6VRuCMI/7KvuEarAizf4931aYxuTKzkF5MlJF/dGSyIdRG6b6\nTqkg0uYaGBQsj6edt6R0NeDF+6kHQ6pgRiE3RGzTeFV2AXr5NsBJm9GDl3Lq\n4TBIY+kn59GjLJIkiuinmWw3O81HwwHLpyUteIbkTUgd3qOMh7D8KM+Mhmvz\nkf67agJSBHJZoD6ZdYCM6NVpIDlrjNBlYYiblfZLEx8WCUASKQ/5Nrp+V4P0\nPB7QySlGUpnwcjSH7DAIIpCgqlihdOYT/OQrwMk6Y0gxe3u8JxBky04W2ZVw\nAoYoDHE5FJtV0Mk7zJG+UeW9tycpzKLqjPGqirw7WUaB9WUWKr1JXs3f6E5c\nez8S0K3Bz9JxsYdmurGq3TKjlVKz2YtHygTqJKuhEJe7qUu4sm1fsZGpSoFA\nkmTK9d25kqu4OkiC/G5o8PPX3JKMkPCH82E0s3ilqtuGQ2YdTSB+rqE1CwR1\n7jSY5Vwgmy2JSbzoYswK04+59CIsT5qgUtrx/OjdFmtxLNE01DdjyJBPqjgs\nRGzPTKhx8S0k3j2uGIxu5tjVgWpx35TWHREJVx3Hb4V1D5/TyJ22sWJRlM68\n3KiE\r\n=XK6j\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDoSzXWeO9deLtaaMii/fB9IGyUy09bXP78ngCOiVqAqAIhALtWvMVQow1ahwUr07W+vtoPuQ/i9s2+pSkHavaglaRJ"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-db5489522feacd61f29be3365d406666b410a675_1591629583462_0.5542571971616357"},"_hasShrinkwrap":false},"0.0.0-85585a65f310c553f2a68ca11b069a79cf39527e":{"name":"type-route","version":"0.0.0-85585a65f310c553f2a68ca11b069a79cf39527e","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"gitHead":"85585a65f310c553f2a68ca11b069a79cf39527e","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/typehero/type-route\">\n    <img src=\"https://www.typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [typehero.org/type-route](https://typehero.org/type-route).**\n","readmeFilename":"README.md","_id":"type-route@0.0.0-85585a65f310c553f2a68ca11b069a79cf39527e","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-eXPxcMuN7chfLMn7w0OO1Oz0Bq0G/bgqjukolV4Tz8KsuOL/KPZGBaNSrfdvjTpEBCv5K2I5tdlsGvtLpx9lbA==","shasum":"0e38787fd50794f007f9b96ebb84e6eb00578041","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-85585a65f310c553f2a68ca11b069a79cf39527e.tgz","fileCount":46,"unpackedSize":558016,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3m+MCRA9TVsSAnZWagAAEj8P/0QKMgtQjYugQj8zs4wu\nYrY1rTdF+u3+I4Q66F1ioeulIUzQIzEADGNLX3vyuXLxcgWK7pWMfS/2oCkQ\nNGtK9Y5GdOFusVKnHtm/86CPsAadD2TL+P4oUqRIkXjMsnz9ZIpanRtVv4En\nDRyIlSHAjZd1Q2mj3cSuNryQq+LAk23sr7wJyY60U/S10YD6R6wSxsA0q0s4\nww4P5pomhtP7vk2VCvdeMXrxjJblKCb3hxxtu8aPSWrsEl19oIxh0+v0JoO4\n23Lyex2NhkUnS8rZNrJZqljYQeepJY2x312vdNAZ75W+RvKdFBPd3uQNHJH2\n3bUq4FXKTAYoS9PspAnCqZpSWGoZ4RmIZfn1JVkbTYl+4j6hIwmlSElqYrTx\n9ndfWU3CIrFheKHzCTgYp+eoCIgfwXWbfKZeekffHK23z65EUeC3AFUJwB0l\n6ayCaRYsEwOewTyn/y1aORZE6wIcwj4soGteyi3+f1aalYwMfyilMdDCMmGX\nS0AzMX0WdTq5ufJJrslK5uDQWbQ3MBFqRM3xvjITi2WMVWaEvowhHNg+QN1G\ntHNnznaA/IghBYyi99kpAdmyFtRqdedwP+66yE4GQDZe1/1vnUBrl+SQlO9G\nsIvegpU6CRpAiNIyO80R63IJlswDJO2mGMJi3fSTmbfXuaAC+WiliVfd5ew+\nw9O9\r\n=F+8c\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD8fjywVkbCe4S11nert+6867XU2EpKG1IAoUVD9a/O1gIgeVjeE7tNMC2QRMHTIWD/1iK4kM4bvwMCHPDNzhQUhhY="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-85585a65f310c553f2a68ca11b069a79cf39527e_1591635852046_0.8481870764649502"},"_hasShrinkwrap":false},"0.0.0-1f5df8939a05119b614932435688836c2bba9d49":{"name":"type-route","version":"0.0.0-1f5df8939a05119b614932435688836c2bba9d49","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"gitHead":"1f5df8939a05119b614932435688836c2bba9d49","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/typehero/type-route\">\n    <img src=\"https://www.typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [typehero.org/type-route](https://typehero.org/type-route).**\n","readmeFilename":"README.md","_id":"type-route@0.0.0-1f5df8939a05119b614932435688836c2bba9d49","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-sP6jxocqO8lUNjUox2ReBFjuB/TWf0gvEGbuDxlll+xGR0GnEMsw91deDOw1ka2ecMo8HQQIapRXO3KDJFV72Q==","shasum":"7e20bf18694a0afcd6bb72982e1b2e2f35c89342","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-1f5df8939a05119b614932435688836c2bba9d49.tgz","fileCount":46,"unpackedSize":558016,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3nIMCRA9TVsSAnZWagAANyQP/RpAJq7eEMIvYdGBlxK3\nQ+bZ2bL7/VWtdzylBZC/GrddeDOvtsqibBo2/66D0JO6FGaA1I7O2nKDm0EN\nPIQEcBfs4/3Ed5/kEFcrqwM3wkj5X1QPhUV06pYRzAT/kl4ADNgdXgA1VXqR\nuwAidNvND1RMnHhkGw/nJ3XTVQtElIxyFTLV415Murbjrsv8WSvnOzz6vc5X\nDLNxXF2zquPzK/UeQL/DpulQEQhOpFAn6qGAcqFeOjmauRsZns7+FCqgFgxg\nVWhQlQzsnRviRLD5p68iHoVydsnDla/VDCKS2EC+B1VCJVbP4cvB3cxFu1Xr\nsrWmeYlhp5G6l4JTMatZmmDvVsH18X6rbTiPKODaZ1o8G1j3H+aMBnF1y0Sv\np8OWYJX25GgV9izvpAfvVfdlZ0lB6ev3hXHWfNjPmQ5VvlbbqooqeUI+852I\nqGFa6NseuAYfz8MMteH0RGg54C9Zzeoo2DKPwx1lgJAfW+wgRlLeuEajfxQ0\nS9/K2e0fSoPxB/CMea/kVf7m+QiJ79iXg4ZIQ4HNL6eoyJBuL1rd2OUjtne+\n/nmIGUqeV6+G+1dHfwQQRHasjYiUzM7IIVbEujsdp6KoAWGxWTOhrQpagQ3o\n8f83e6IUNecI0137ao0WOmoRtCx+8V0usdWiS1MwaopiQTfaJFRsXYgQwcBO\n7PuN\r\n=GYvF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDux1sLgTAjSa7dkD3aIwn6732HH1j5lHjPpm131orqsgIhAKMbmJjzwmOZZANSVTDVkFLOU7p59oH78+cLa5sHAoua"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-1f5df8939a05119b614932435688836c2bba9d49_1591636491857_0.02349086461680061"},"_hasShrinkwrap":false},"0.0.0-8a2939dfd948661808ed28eaf1a3e39c72cc4f49":{"name":"type-route","version":"0.0.0-8a2939dfd948661808ed28eaf1a3e39c72cc4f49","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"gitHead":"8a2939dfd948661808ed28eaf1a3e39c72cc4f49","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/typehero/type-route\">\n    <img src=\"https://www.typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [typehero.org/type-route](https://typehero.org/type-route).**\n","readmeFilename":"README.md","_id":"type-route@0.0.0-8a2939dfd948661808ed28eaf1a3e39c72cc4f49","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-fP3sVT2LLdMyzAt8L3J5hLlSl9fN+OX0EHgYrAB/MQfCrQNsGsWTZ87eL/G7KHK8bSw1iERCOtkAvgFB9jB2XQ==","shasum":"0074518e1c94a46be82e8889c5474ba3d3672318","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-8a2939dfd948661808ed28eaf1a3e39c72cc4f49.tgz","fileCount":46,"unpackedSize":558016,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3nU4CRA9TVsSAnZWagAAY4kQAJkRx39fm9MQXyQrCg4e\npDiIcJ5wdst+ITT99UYhZ5PKCos3qmpwgYBByqrUJA2WJwIKhI4yBQVYYqoF\nyAKzJdfjoiQj4NGIV9WdG/IR4zFKPXOoEHIBJjiiXgBGElV2Wwd5npshQW5j\nemSRxyDUQlPcVN5kSxEFASu/3SuWLZTKm3EO9cLfWmPnHR8guoK2zVXjhcWg\nzPkoiQ6FDOrIpWqvUtw9IqhfNvpKQ96KE/8p3PO2l1P3eAtwpQKd9Rlfx9Wn\nbp+2KhlFufBd0/ab+fjGaIToiystIEFS0zCBsCEiiNdO1LhLeot2J/UVqgaa\nS9kkxOVq/4qC7oO/2G2ijQl5ZujEx+TOHvGNlmkaPqX/c0IBLxqXoea/GvwE\nBG3UO1zLVleedHhvhR2sbUCSf1X3d0U9Q7lexdz+kdmaMajEMsagjJOhJ6HP\n4EeXBpzo/mayBm4iVauLCH5trcEgAsU144Qy42FA32WjIVYQHxFl1yg/Agcp\nTkZl0Zw0vflNLlBARHXZ4zQ8PDIlvfCQcP2+WQZPi939qQ/0/ZeC54YNRv+i\nanB9ETEqICWTJx+DqbWfOylckEl77scnpTPFS9HFrWp6NK2hzmbea6AeUCB1\nohBOVu3jGeTrVHQgCr/+BnO4G0/m04/93E5g5tbWGa1a/ajppTD0AqN1B6yo\nNd3h\r\n=zBFi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCKCwJ48ONJRyy+c+CT5cJOnzi5dcb3LEvys7Cjs+uRpgIhAJ9ck0jkVxdWFNhMaAeGGbhUKFu5rHw2r4IvRf7MZM1T"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-8a2939dfd948661808ed28eaf1a3e39c72cc4f49_1591637303646_0.013771269024015709"},"_hasShrinkwrap":false},"0.0.0-30a3e3ec5706528c99a9ae301376cc150fec6760":{"name":"type-route","version":"0.0.0-30a3e3ec5706528c99a9ae301376cc150fec6760","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"gitHead":"30a3e3ec5706528c99a9ae301376cc150fec6760","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/typehero/type-route\">\n    <img src=\"https://www.typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [typehero.org/type-route](https://typehero.org/type-route).**\n","readmeFilename":"README.md","_id":"type-route@0.0.0-30a3e3ec5706528c99a9ae301376cc150fec6760","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-JPJCw0kYViXCO9K3k8r0Dou4vlh4Rn81hS3q0f9DNsSeAizouNh1Se1uvU0MIil68CY1TXYNRdNZnOUqD+cJJg==","shasum":"a9808c10752da4c40081ccc18b052efad88091ed","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-30a3e3ec5706528c99a9ae301376cc150fec6760.tgz","fileCount":46,"unpackedSize":558016,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3nYtCRA9TVsSAnZWagAA3kIP/jTyuYXK0XOd6JM1Sho9\ntMK/9vggjErAmqPiVBl2TAQfb6aB4bBVUr90xpP2cb5zt4IoZYFRYa+qmbsS\nn32oaLSNiTQXJJRtqtwNEamvSjXJaVasHTV5vAJkcYVX4Df7f2naMHM7S4S+\nbm4oFpS3Nm5TWZ7iIgh+gFPHJPWLisDnTXIBFsjHE0IzoBaBWvBioA/bp1ca\n6v2MunxO2REe461S7pP8e+g3Cy29wawcrAGahMZigVQPeur2IcTVN+6peR5J\nU4Ye360B4bKSfzgm+rOWJat8Bz6YCcRptxdyQIqt/6N3Qf3afN9A8lWqtMHY\nBSuYAOHnDOEPOnVCySf2b2BTAUXcr+UBdQ9U1MjYrQRG+d/2nEKiBr5TA+nY\nneQc+W+qnQBDKg9Zr00GVfuzk5l4DrTMe9JOF8TSlsy3Ja5AgOfpq90gJu2f\nlrXooHcnBb+4vLHng2/qSIdAyue5lTGMJJyQX1TZn6nDA6NEpUc1BqTrIb1I\n3LU3MkFZ4Xqw7kjyTBxgZIB/fpKWrq6bTyUbIP5+SrCPYgrmBuvDkddH1I2e\nyq5Cd2luB+ZWzkizwevKsyj3IIKPCSkh/GIvkZwKP3xxzrxa5s/mqQhTwJEP\nPPOZQSMk68RjIjIxvCG1kiHLgog0ISGooDDLAjuvX230DxHrXIMIu2fxe+Ff\nnNoN\r\n=7bS5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEDlXnhVgH3aMDmxNvXivpP/S2iYNtuu0//LpKaaD9AVAiBI02AF1IdDlgf6upSUN7DpczoNz3EmBbOAkpSAVi9OUQ=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-30a3e3ec5706528c99a9ae301376cc150fec6760_1591637548636_0.6953353866394854"},"_hasShrinkwrap":false},"0.0.0-54e294c8a500ec29e74c347041a4ac914d511cbb":{"name":"type-route","version":"0.0.0-54e294c8a500ec29e74c347041a4ac914d511cbb","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"gitHead":"54e294c8a500ec29e74c347041a4ac914d511cbb","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/typehero/type-route\">\n    <img src=\"https://www.typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route · Getting Started\n\n[Type Route](https://typehero.org/type-route) is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> Type Route was designed with excellent React integration in mind but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full runnable version of the below examples on the [Simple React Example](../guides/simple-react-example.md) page.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](../api-reference/router/create-router.md) into the properties you'll be using in your application. The [`createRouter`](../api-reference/router/create-router.md) function accepts an object with route names and route definitions created via [`defineRoute`](../api-reference/route-definition/define-route.md) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n\n  useEffect(() => listen(nextRoute => setRoute(nextRoute)), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](../api-reference/router/session.md) then subscribe to route updates with [`listen`](../api-reference/router/listen.md).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a\n        {...routes.userList({\n          page: 2\n        }).link}\n      >\n        User List Page 2\n      </a>\n      <a\n        {...routes.user({\n          userId: \"abc\"\n        }).link}\n      >\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](../api-reference/route/link.md) property is an object with an `href` property and an `onClick` function. You need both to [properly render](../guides/rendering-links.md) a link for a single page application. Immediately destructing these into the properties of the `<a>` tag allows for ergonomic use. [Programmatic navigation](../guides/programmatic-navigation.md) is possible with the [`push`](../api-reference/route/push.md) and [`replace`](../api-reference/route/replace.md) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above example on the [React](../guides/simple-react-example.md) page. The \"Guides\" section of the [documentation](https://typehero.org/type-route/) has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n","readmeFilename":"README.md","_id":"type-route@0.0.0-54e294c8a500ec29e74c347041a4ac914d511cbb","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-f4MJEvFtzT7pqoBHtaj63Pov6F1JS9NKG5YwuaZ3fsMwV5IwDHS3KtiwxZShum+Fn0RQu9u9ydOyVgDuSpn2lQ==","shasum":"2e050486392d267e79b86523e81cc372a20e22fb","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-54e294c8a500ec29e74c347041a4ac914d511cbb.tgz","fileCount":46,"unpackedSize":562900,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3pJoCRA9TVsSAnZWagAATYgP/j7CC3y6V4TM2cCU2vKC\nagDtmjaC3DM/XrgBdc6Qr4f3zZL7eDK5TcJDOpT+tV2XY0mxqejRML+M76Ry\nu3aL87S4DRkwUzOiElZnkR95tnyTFY09mYQ1LVouXanfrkiinlKNhA0EMDW0\n+LhVor3n6VeF3CyUC5tfNiJUyfCvNEgPldLr+WBU9ZjLbSOPWVG9i47/F8GA\nNR0rgvTY6Bd2vzd5DiTlKahxEK9hw+dY18p/IQLRDUlm6MXPjvukskLZd0/Y\nu4geZUoUsgUvZyofMIJGZZff7w4XVRBdyGQ5khwqXG8CUJc4QLWj69ZksxJm\nD1n2Z8iBBvmUadjpLUL/ty8XP+70RxL2u4PU9sgUkcj/l5I8//gHuN2elhKc\n/Iug0T5g0VDKM1W87KRivHUWTmqtbrmA/t6E4BvbP/mz040+i46Az4nxIvBX\nKdM8EwdavQ8P3EuNJIohCxPo3hj8qbQwNlA2Wx14EVqBZIvimbie2p8pNFQF\nbfWYB/zplh+CunjA2W4b9+nvJQxrzu7TZj5Aq/kITgSF14098rN+DfFYcCtP\nIelmLRRZGqgxy3zrUXqDVdLbz0CkgyDZHyjGU9/Pc5Z375u75r+5mV1bQWuC\nVX5c2GT1CCKQPkWBfnHZywf6nyIyitchobPcAy+wLB/5vsjbT66jj6cNdE1i\nxXfW\r\n=8Kr7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBLoTDMLyk+FkqpHMuvH+luvBb3cyREgd3G8Y5lkAUrdAiBygbuNJ9T26Y25CkRI0jdcZViUsAzi+T+jLntelDJDXg=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-54e294c8a500ec29e74c347041a4ac914d511cbb_1591644776509_0.4189546975201859"},"_hasShrinkwrap":false},"0.0.0-319e95e88b28acbd052f05e0838368b83ba19803":{"name":"type-route","version":"0.0.0-319e95e88b28acbd052f05e0838368b83ba19803","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"gitHead":"319e95e88b28acbd052f05e0838368b83ba19803","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/typehero/type-route\">\n    <img src=\"https://www.typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n<center>\n## Type Route\n</center>\n\n## Getting Started\n\n[Type Route](https://typehero.org/type-route) is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> Type Route was designed with excellent React integration in mind but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full runnable version of the below examples on the [Simple React Example](../guides/simple-react-example.md) page.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](../api-reference/router/create-router.md) into the properties you'll be using in your application. The [`createRouter`](../api-reference/router/create-router.md) function accepts an object with route names and route definitions created via [`defineRoute`](../api-reference/route-definition/define-route.md) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n\n  useEffect(() => listen(nextRoute => setRoute(nextRoute)), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](../api-reference/router/session.md) then subscribe to route updates with [`listen`](../api-reference/router/listen.md).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a\n        {...routes.userList({\n          page: 2\n        }).link}\n      >\n        User List Page 2\n      </a>\n      <a\n        {...routes.user({\n          userId: \"abc\"\n        }).link}\n      >\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](../api-reference/route/link.md) property is an object with an `href` property and an `onClick` function. You need both to [properly render](../guides/rendering-links.md) a link for a single page application. Immediately destructing these into the properties of the `<a>` tag allows for ergonomic use. [Programmatic navigation](../guides/programmatic-navigation.md) is possible with the [`push`](../api-reference/route/push.md) and [`replace`](../api-reference/route/replace.md) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above example on the [React](../guides/simple-react-example.md) page. The \"Guides\" section of the [documentation](https://typehero.org/type-route/) has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n","readmeFilename":"README.md","_id":"type-route@0.0.0-319e95e88b28acbd052f05e0838368b83ba19803","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-RuoWEClhTEDZ+gW69wm0v5tUl87GRzV0SArmw5n8muFO72QJkXJ0IIJh2gPAFlasSNN+HvziRtsC4zShJXwJaA==","shasum":"7614f77381b82371b381e2b91b92de59f2974607","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-319e95e88b28acbd052f05e0838368b83ba19803.tgz","fileCount":46,"unpackedSize":562920,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3pM3CRA9TVsSAnZWagAAw00P/A3FWQpDhoMpwADOZtZ8\ncgzvmSuptiogiaBGYUtkHrG96bJ9kE8j0vklL9AOuhT11tHjEkkzC6OGQZl4\nhCNuc3xWqaS/rFZLD/2ymTLkYfcVLObhI7+kzuIo2R7DF6CSzNVFlzRulAjB\nNkzy6jjnmgT3tcfxPez7+dnCcuB7rZIyTvzdzUax7h3dCAhPeWaXmgt5yTx+\nQCoeyjAjroadT2EwgdcYnPwtnQM9f7DDInzwVgYvi6ohRPtiLxz5fe3XmDJz\nrdZLTr6d7ZlWgboM3uNETOeDTJ8CYcQE74MEQMHer7dmUXlchN4Gi/mwYQTV\n7ZVCJsR6SZ+lEOAIDeiWuS0Kh/2ymoN646N0ArGqni4GWdspqV1bpGAtx0nm\n/jgDcGTeDQv9pIxJ7QvRzFNYookwAGWgEGgDOGHbWRg7opEBmD+B59VC040g\n6A5orGKSVoQdV6rmMFm1j9eopH82nnWqo3krQskRiXItyIgJKZtHgq2U9rLT\n8dOo5WEv62VHuc95YNpRV5y7bvmhnJF1Ju1YJmdVsSU9c2S8iIFQz/1kA3Sz\nhUt1Eta0kT0Fr7Mv0qMib85Z6CTk1Us+gFBRg4hthpAXCKEGC0tN4kFvtfAn\nVZ73bosM+8hp2nUGd8z2a27XgOEpncjgVIm7VVbhorlIrRiLB8Y2TYH5+h5M\nz+6V\r\n=Eb2T\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEO5MwHpv/FFgIfLRhoybWOp4zpFQJrSaG3CxOq8M35RAiBOpsnnVXLzX0iDq5lWTBrxYT5FwuG3/ghrQYkZb2eVRQ=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-319e95e88b28acbd052f05e0838368b83ba19803_1591644982717_0.3674252513697367"},"_hasShrinkwrap":false},"0.0.0-e54a0029ba11b32d0d11a7ef733d65da8a7a2359":{"name":"type-route","version":"0.0.0-e54a0029ba11b32d0d11a7ef733d65da8a7a2359","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"gitHead":"e54a0029ba11b32d0d11a7ef733d65da8a7a2359","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/typehero/type-route\">\n    <img src=\"https://www.typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n<h1 align=\"center\">\nType Route\n</h1>\n\n## Getting Started\n\n[Type Route](https://typehero.org/type-route) is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> Type Route was designed with excellent React integration in mind but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full runnable version of the below examples on the [Simple React Example](../guides/simple-react-example.md) page.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](../api-reference/router/create-router.md) into the properties you'll be using in your application. The [`createRouter`](../api-reference/router/create-router.md) function accepts an object with route names and route definitions created via [`defineRoute`](../api-reference/route-definition/define-route.md) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n\n  useEffect(() => listen(nextRoute => setRoute(nextRoute)), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](../api-reference/router/session.md) then subscribe to route updates with [`listen`](../api-reference/router/listen.md).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a\n        {...routes.userList({\n          page: 2\n        }).link}\n      >\n        User List Page 2\n      </a>\n      <a\n        {...routes.user({\n          userId: \"abc\"\n        }).link}\n      >\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](../api-reference/route/link.md) property is an object with an `href` property and an `onClick` function. You need both to [properly render](../guides/rendering-links.md) a link for a single page application. Immediately destructing these into the properties of the `<a>` tag allows for ergonomic use. [Programmatic navigation](../guides/programmatic-navigation.md) is possible with the [`push`](../api-reference/route/push.md) and [`replace`](../api-reference/route/replace.md) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above example on the [React](../guides/simple-react-example.md) page. The \"Guides\" section of the [documentation](https://typehero.org/type-route/) has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n","readmeFilename":"README.md","_id":"type-route@0.0.0-e54a0029ba11b32d0d11a7ef733d65da8a7a2359","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-+O+C04PVPJinpkKp6fHSQsS1DNV8+D/cf86Fv/UXnaWPe1wkVGh+JM/ae1KkUnMdVXEs44QZSbwIVUaZYaWFEQ==","shasum":"41cf1a73d16579dfdc80b673747f803d0d880dff","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-e54a0029ba11b32d0d11a7ef733d65da8a7a2359.tgz","fileCount":46,"unpackedSize":562923,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3pNTCRA9TVsSAnZWagAAsuUP/0uagUCiNMGdNhuYRdp3\ncTmeD1U0WiNUDN8L9ETsJhFqrzzP6W7mkwbBmFcA7MU2th57lPIj3QoCWcdC\nIrYPV1YrqTppp2/mG8h67hrzuWFQ4gB2NNpWHUx2GUrKiw59RT4jsHVMVVq0\nbvmG5jMpG3PW9aPOPFJmWixkABhJIt+1AN67FPWmDycfEkPhBVElCsitLTuH\nTftASPduFr7UJBPIeyV9v66Sduyb3sySQoqD4tvQz7m8jNoPE6/BaaQr1BKk\nZs+ymYvk/Hn3c5w2thUfn9JR4usx7ENC0nXEOUoCVqwHAihGqh+Jv0M3ZnBr\nJm1bUrG+AtS01FINMqzqORHxKDC9+38HA64FGeHHk/n1SmnYHomKFeBNf8UE\nUb9xZTclGSsWlJ29XEl9kofkH7vBFZ3QIiyhPqMpQrR77euvEIO9XXA4+WbR\nbchCjcsz0qfrsciTFhRIDpAV3T7HnBZyJl1NiPBYa3SCtNlcjweAFPPC1tAI\nPfg/TPV4gSeTwPd1JtAtTNJFho2EscqLSYBw+pcPv1N+1G1j1i5G8ye06lV5\nGBFh28LErGbLtgEeox2C00hqBdJiw6qLMQWLGvpyCLm+Zw5GusNk6CUI8eSY\neVykj8dycAFcvYkoC7Q4QckUFAcOW2FJs2wg2cf7y73I5JJz7KGjPtD3YIC9\nChkH\r\n=33mg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDUsw6Pf3azZhUKZKlrpnrQ1RHieOY/+CeVv3qBTjVAJwIhAIm+9qtfgidKvrFl5W9NGnkNBfP9XCPSQJar8cIbXr6t"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-e54a0029ba11b32d0d11a7ef733d65da8a7a2359_1591645010581_0.2528944466679699"},"_hasShrinkwrap":false},"0.0.0-5e96c5629e87e8abc8311bfec38cce5c3fe7a031":{"name":"type-route","version":"0.0.0-5e96c5629e87e8abc8311bfec38cce5c3fe7a031","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"gitHead":"5e96c5629e87e8abc8311bfec38cce5c3fe7a031","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/typehero/type-route\">\n    <img src=\"https://www.typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n<p align=\"center\" style=\"font-size:30px\">\nType Route\n</p>\n\n## Getting Started\n\n[Type Route](https://typehero.org/type-route) is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> Type Route was designed with excellent React integration in mind but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full runnable version of the below examples on the [Simple React Example](../guides/simple-react-example.md) page.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](../api-reference/router/create-router.md) into the properties you'll be using in your application. The [`createRouter`](../api-reference/router/create-router.md) function accepts an object with route names and route definitions created via [`defineRoute`](../api-reference/route-definition/define-route.md) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n\n  useEffect(() => listen(nextRoute => setRoute(nextRoute)), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](../api-reference/router/session.md) then subscribe to route updates with [`listen`](../api-reference/router/listen.md).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a\n        {...routes.userList({\n          page: 2\n        }).link}\n      >\n        User List Page 2\n      </a>\n      <a\n        {...routes.user({\n          userId: \"abc\"\n        }).link}\n      >\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](../api-reference/route/link.md) property is an object with an `href` property and an `onClick` function. You need both to [properly render](../guides/rendering-links.md) a link for a single page application. Immediately destructing these into the properties of the `<a>` tag allows for ergonomic use. [Programmatic navigation](../guides/programmatic-navigation.md) is possible with the [`push`](../api-reference/route/push.md) and [`replace`](../api-reference/route/replace.md) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above example on the [React](../guides/simple-react-example.md) page. The \"Guides\" section of the [documentation](https://typehero.org/type-route/) has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n","readmeFilename":"README.md","_id":"type-route@0.0.0-5e96c5629e87e8abc8311bfec38cce5c3fe7a031","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-EGo+6OQGgppPQ6YPpSsEucDepE/+HYYwi/MQFO0vBwF7hgXs73SDcXg7gIEWMOle0ocVsqV7LvZcWAFlm4PVhA==","shasum":"e09a8ead4fa6c6688bcfa7ad37450877953b3762","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-5e96c5629e87e8abc8311bfec38cce5c3fe7a031.tgz","fileCount":46,"unpackedSize":562944,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3pN6CRA9TVsSAnZWagAAslwQAIzm79tOwqa4Wgs0GT0f\nvLKgIQ3tCvqCxpVbuLgG2wtuRQiLrqoR6oguK6H04Ze/8DBuwqkjYNFVonpY\n0ki+AM0JEVgm47SyODtJFQWbq9jM2lH/SOZAt0/9HTo8GItnCVcwmxOjic3u\nYuaaxYMLB/eqPbh+oBGASTQnF85zj4cxaw7qv94ZVJo9eqRkqr0+mM0TAGcC\nJc0Vtj5m3buNhod+DS0Hr4wANKfLahmiQQMk4m2kuJ2mkG+R+rDzYPZuYf7t\nKQWMkAG3WaQcsROhmIOq2Pn/8D3vDwLhW6nSjLE7FpPkGxHn+54ikHjhI9s4\nLMYE68MsVN79JFiUez6YfQAIczGjNvIZcb8JpGfmuXXDo/S0pLkvFju0jD0f\nr1xJnUE/BuYKi/TMCtXOxdt3CYwlvh3GY+kfhKKJHmybEMYNs6ZXlCyiZHRQ\nuKdYGopLgDmMm2k3a/hYOIfrLuF7RsmfpsVeWfu/c/mcwF+WrZAfuzIFqeTn\no+dTKLcGqilL1GU8ZQPJWj8uWvKUmKbhEZRcq1w9pJW8IDEIaoibfiTeXzwE\nOMt+ZqOdHpQLHMYYdeWBZ6e+dWvE8zJw4SMDIPDjC4p7jjWDD83CRuAjesZG\nS9J25h4z5q5SyqvXafP5g0+eHPE+TI4hhmzW9D1GtRNKWtaerGfU68kF95iq\n2Mmy\r\n=9yei\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEpdVYopN7cAiDDCxP6gZxROQTK5rI5QgxbzD7O3bVZZAiAiAYtKbYzwqkLrShpOBNIplpyUjoAX/CC+vN5a6qm4xw=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-5e96c5629e87e8abc8311bfec38cce5c3fe7a031_1591645049553_0.5232181889000302"},"_hasShrinkwrap":false},"0.0.0-bfab385405a34dddd229ef5c85bb7f06956f3c64":{"name":"type-route","version":"0.0.0-bfab385405a34dddd229ef5c85bb7f06956f3c64","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"gitHead":"bfab385405a34dddd229ef5c85bb7f06956f3c64","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/typehero/type-route\">\n    <img src=\"https://www.typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n<p align=\"center\" size=\"30\">\nType Route\n</p>\n\n## Getting Started\n\n[Type Route](https://typehero.org/type-route) is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> Type Route was designed with excellent React integration in mind but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full runnable version of the below examples on the [Simple React Example](../guides/simple-react-example.md) page.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](../api-reference/router/create-router.md) into the properties you'll be using in your application. The [`createRouter`](../api-reference/router/create-router.md) function accepts an object with route names and route definitions created via [`defineRoute`](../api-reference/route-definition/define-route.md) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n\n  useEffect(() => listen(nextRoute => setRoute(nextRoute)), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](../api-reference/router/session.md) then subscribe to route updates with [`listen`](../api-reference/router/listen.md).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a\n        {...routes.userList({\n          page: 2\n        }).link}\n      >\n        User List Page 2\n      </a>\n      <a\n        {...routes.user({\n          userId: \"abc\"\n        }).link}\n      >\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](../api-reference/route/link.md) property is an object with an `href` property and an `onClick` function. You need both to [properly render](../guides/rendering-links.md) a link for a single page application. Immediately destructing these into the properties of the `<a>` tag allows for ergonomic use. [Programmatic navigation](../guides/programmatic-navigation.md) is possible with the [`push`](../api-reference/route/push.md) and [`replace`](../api-reference/route/replace.md) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above example on the [React](../guides/simple-react-example.md) page. The \"Guides\" section of the [documentation](https://typehero.org/type-route/) has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n","readmeFilename":"README.md","_id":"type-route@0.0.0-bfab385405a34dddd229ef5c85bb7f06956f3c64","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-8Vshd3UGaE0+6SmKix8VduoC2ez5tAtx2LmVoAamf2LIQSZLsBQInPCygtkRwjcOckCvnuwvFieC9VgWYhxSMg==","shasum":"2afa3ea04d0e2e4518e685d843feafac0c55f85b","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-bfab385405a34dddd229ef5c85bb7f06956f3c64.tgz","fileCount":46,"unpackedSize":562931,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3pPhCRA9TVsSAnZWagAAG8sP/0JUVNAnMlIyPiFenR7S\nraVun84yXEY1KvVvEfye2Ac/nGgfNgXL69fN4A9WRBldbPpHRZQzI6z80pGv\nz3VS5bUyOFwJUyoJNpPVG5zHkDB59XbYpAvlyPECH8a/+5fFh4o9Sw8ymCvr\nkgKYN0wx/6zSt/GqlsTWJhBBS4iDnmZs/HpdfZR5tO1ZzL3Ao8f0z05zc1Q8\n2k8bhpVQjgUtE1AYmdvXTfbupmve+GNpFA0fvVcEpADA1qj8uxALLPWbGII+\nx6+dFCYe9Svkn+R0PEQDsbwwivSfjhPul654p+LhHt2BQQP+QUQq8uT9fMaR\nlUdZViSdny/M8oHutVf9U9ZmxTGfAL3DXf4/LOtaZmxj7+x3Qe2o8ZOQXexc\nic/1DlNURLefBHFtQS95XLRvgkcL+9Qw7SHPlkJlC+BW7ysk9Z3aK8PZu7xu\nlBxDJ51oYNrUl3szq/gYfpVkw9QpS1+zZ651S0mzwqWqMFnKBHHSeCgql60u\nqymTqQlWsYg5rcNkBTdohLVklZO/Dn0MyDCWRDb5CFBEUhuorfOiPD/4iaiC\nnehRaJCkd8yrI10N0zQCdVRka82FPBgkqylAr5KxzsaAa6ktymRFxZdQMFBq\nnJVa3Vl7SV6pISMJLHIUbn7jL9Hvs2Ni9dRE2PX5qr1JKeWf1vwFeP/45Rbc\n+Ys7\r\n=2T58\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHRArypdl3SpXp4VMaQtps7B4gPn0KXHTjWaYic4UPPzAiAl4JXw7c5xYtAU3AOS8lwp/wi0lk5XixoFs9SqucQhWw=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-bfab385405a34dddd229ef5c85bb7f06956f3c64_1591645153324_0.4372153153251248"},"_hasShrinkwrap":false},"0.0.0-cf356245f8a334ce07811367adbb4c5b7250a9a4":{"name":"type-route","version":"0.0.0-cf356245f8a334ce07811367adbb4c5b7250a9a4","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"gitHead":"cf356245f8a334ce07811367adbb4c5b7250a9a4","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/typehero/type-route\">\n    <img src=\"https://www.typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n<p align=\"center\">\n<h1 border=\"none\">Type Route</h1>\n</p>\n\n## Getting Started\n\n[Type Route](https://typehero.org/type-route) is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> Type Route was designed with excellent React integration in mind but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full runnable version of the below examples on the [Simple React Example](../guides/simple-react-example.md) page.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](../api-reference/router/create-router.md) into the properties you'll be using in your application. The [`createRouter`](../api-reference/router/create-router.md) function accepts an object with route names and route definitions created via [`defineRoute`](../api-reference/route-definition/define-route.md) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n\n  useEffect(() => listen(nextRoute => setRoute(nextRoute)), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](../api-reference/router/session.md) then subscribe to route updates with [`listen`](../api-reference/router/listen.md).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a\n        {...routes.userList({\n          page: 2\n        }).link}\n      >\n        User List Page 2\n      </a>\n      <a\n        {...routes.user({\n          userId: \"abc\"\n        }).link}\n      >\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](../api-reference/route/link.md) property is an object with an `href` property and an `onClick` function. You need both to [properly render](../guides/rendering-links.md) a link for a single page application. Immediately destructing these into the properties of the `<a>` tag allows for ergonomic use. [Programmatic navigation](../guides/programmatic-navigation.md) is possible with the [`push`](../api-reference/route/push.md) and [`replace`](../api-reference/route/replace.md) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above example on the [React](../guides/simple-react-example.md) page. The \"Guides\" section of the [documentation](https://typehero.org/type-route/) has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n","readmeFilename":"README.md","_id":"type-route@0.0.0-cf356245f8a334ce07811367adbb4c5b7250a9a4","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-W7N9U9eQSUOEexEEDCRxWrVOUdDcVv3qdVMPAmN/g3tdWcWJHj665OOilQdQb9K15ZkvlTlSSx5A7fGC5YvUGw==","shasum":"d398deb54b7e10f1f8f40bf646195ce1acca7236","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-cf356245f8a334ce07811367adbb4c5b7250a9a4.tgz","fileCount":46,"unpackedSize":562944,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3pSSCRA9TVsSAnZWagAAbHUP/0l6z/nxrTjcTGEaoBCA\n7BRoEBK5JfDJHTCzvyEq1oOb35fvGj/gqHquR7Bv5iAZOCt9U0nmU1yqQ1Kg\nOtRifDGysiBq9UpoRdHPq1/jfjL+/hJ4LXcIkHer0UrFcY0QnUhPWHXHEGj8\nJdTgo3bsvgbRSo1qQruqhFKwMKqmCaXDcpAvc1i4Sl9BxN10JdoeJ50V+qsb\nsl3skAAV5q7eR08CNtuba9aHujca05b9y5nYD7N5/m0ZHGYazQe/B3jefydW\noN4WBLbcM29cFUi4DYSrxrFKvos6w+Cfed5lEki/G2T5mj+7xwoD/tybOOj2\ngwmp05owmgml361Ho0ttHIoAS0wD8kRQFa3jLCQ3Jj1wybAriXZQreuwSoYC\nEb9FF8wqA536d7u0iCB57OwD7RBKsxk9ydyF0j2IOLJRRxXaVPWSSzIJ4Tr1\nyB9twowLPB1ORK32o2+gSCSI4DUaa7Vf9SYi7Qm0WqNd7eZub+jEUAfJ1mLD\nBbZqROkkO9SA/pS0UX+vFnURlh66xdBMQFNSD1Rs83VwxgfA9f6Jv9QvFZoQ\nAQ/p8L3XLLCjNhdG/qFkYu0XSP1095nSEO3s8juMH3Bw2tVVkUQ7Dm1USOEp\n8xlbF0iIq24BJikgMmfTgbEiqSSwWdK9BlpFALnDTt1qIDXs3CiBu73vp9F6\ncVXY\r\n=iO9S\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQChLn8H01/FS2B2DhEmQLB6MVCH4WlvHA/5CfeqpbeXnAIhAOVfJ1AldYYXUa0S1/9tFzczr6i4PLs681fl74hIJJFh"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-cf356245f8a334ce07811367adbb4c5b7250a9a4_1591645330319_0.3384925607370033"},"_hasShrinkwrap":false},"0.0.0-2ceb7a46d203a173e742ed90df8250a9e8aac928":{"name":"type-route","version":"0.0.0-2ceb7a46d203a173e742ed90df8250a9e8aac928","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"gitHead":"2ceb7a46d203a173e742ed90df8250a9e8aac928","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/typehero/type-route\">\n    <img src=\"https://www.typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n<h1 align=\"center\">Type Route</h1>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> Project · <a href=\"https://typehero.org/type-route\">Documentation</a>\n</p>\n\n## Getting Started\n\n[Type Route](https://typehero.org/type-route) is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> Type Route was designed with excellent React integration in mind but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full runnable version of the below examples on the [Simple React Example](../guides/simple-react-example.md) page.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](../api-reference/router/create-router.md) into the properties you'll be using in your application. The [`createRouter`](../api-reference/router/create-router.md) function accepts an object with route names and route definitions created via [`defineRoute`](../api-reference/route-definition/define-route.md) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n\n  useEffect(() => listen(nextRoute => setRoute(nextRoute)), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](../api-reference/router/session.md) then subscribe to route updates with [`listen`](../api-reference/router/listen.md).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a\n        {...routes.userList({\n          page: 2\n        }).link}\n      >\n        User List Page 2\n      </a>\n      <a\n        {...routes.user({\n          userId: \"abc\"\n        }).link}\n      >\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](../api-reference/route/link.md) property is an object with an `href` property and an `onClick` function. You need both to [properly render](../guides/rendering-links.md) a link for a single page application. Immediately destructing these into the properties of the `<a>` tag allows for ergonomic use. [Programmatic navigation](../guides/programmatic-navigation.md) is possible with the [`push`](../api-reference/route/push.md) and [`replace`](../api-reference/route/replace.md) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above example on the [React](../guides/simple-react-example.md) page. The \"Guides\" section of the [documentation](https://typehero.org/type-route/) has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n","readmeFilename":"README.md","_id":"type-route@0.0.0-2ceb7a46d203a173e742ed90df8250a9e8aac928","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-4IhQw09ytPPKAtxGdh868GJcYg75g77xIxwdVqE9yQzd11o09lEgObPxM8Gv9J5C4tm9GwWUhfGaHFXLnrexDQ==","shasum":"92dae196554dafd1850509dbf93477d710082aee","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-2ceb7a46d203a173e742ed90df8250a9e8aac928.tgz","fileCount":46,"unpackedSize":563077,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3pVTCRA9TVsSAnZWagAAsvEP/1jTjwWMlKKymYsDa0wc\nTRKd2eGbuZtUZEvJjS2NhQymq6awk3iFU1G+YL+tRfZpZwqnryzxurUYpo3A\nHmNkrf/fZ9MGO/oZ/lUYzDFpD0IB11aV5w12wVkY7+I5Dn4jnyHwY75Bn7wl\n06Z68CasStCKhEIXbaCrzzo+6cyv9YwizB+xmIwGovUPuKpKPyC0WCwCCGTJ\n9yArwXIya9sU1Uu9jr9MKn39aK4YhRrwdB0Qn6uyu3Zl8EVhG6AAt+JqbwGZ\n6mdbQbxMRQdbDOTXVuj0OSTyaMRfi+toyKaw2kEI3xZcQWjAydnhIa4vzrMF\nLPRvPBpovfoxEd7Toj+lvHcetFBwrf5ZKId9qcqgIojo938c8xT3hSX59UcF\nOAHxMuTA9w2yrJz1Faon3ThMcWPFiQiN7qJM2v2R0hBnrPZb1iZ86uTfaF/O\nJBZN78zyCTiIWng5tZha4w6usSqyDSZhe2MU0Y8d76H3somA1AktD7RN69zK\nE7erhdAkI+9EAgVn//4/JJ6Nni4Hv9m2Z/UwmHulUO2+9xvC+UtyPe1FMO4A\nO+bh6b0XOtBXAJHj494rYCLeEIHSVlMtAo0EDu0d6O2WZFPVn+9Icm8BDYEH\nd2QLxgj2HeaM58241RQ00fZ1KtvnkuAZCiGFQ0bv7alZgIcHuJVsbQe/VcFs\nIiV6\r\n=Dj26\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICWYOiB1A6IAorK97Hn6QvTB8Ez+j7Wy1wpJgu8CeyUuAiAwjIQRHCpeslUmKG7aV6sZASeVdKDopKrFIXLCywxoyA=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-2ceb7a46d203a173e742ed90df8250a9e8aac928_1591645522834_0.865586668591201"},"_hasShrinkwrap":false},"0.0.0-211537638008fa8b9068213694e346c73afb4e65":{"name":"type-route","version":"0.0.0-211537638008fa8b9068213694e346c73afb4e65","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"gitHead":"211537638008fa8b9068213694e346c73afb4e65","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/typehero/type-route\">\n    <img src=\"https://www.typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route</h1>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> Project&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\n[Type Route](https://typehero.org/type-route) is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> Type Route was designed with excellent React integration in mind but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full runnable version of the below examples on the [Simple React Example](../guides/simple-react-example.md) page.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](../api-reference/router/create-router.md) into the properties you'll be using in your application. The [`createRouter`](../api-reference/router/create-router.md) function accepts an object with route names and route definitions created via [`defineRoute`](../api-reference/route-definition/define-route.md) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n\n  useEffect(() => listen(nextRoute => setRoute(nextRoute)), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](../api-reference/router/session.md) then subscribe to route updates with [`listen`](../api-reference/router/listen.md).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a\n        {...routes.userList({\n          page: 2\n        }).link}\n      >\n        User List Page 2\n      </a>\n      <a\n        {...routes.user({\n          userId: \"abc\"\n        }).link}\n      >\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](../api-reference/route/link.md) property is an object with an `href` property and an `onClick` function. You need both to [properly render](../guides/rendering-links.md) a link for a single page application. Immediately destructing these into the properties of the `<a>` tag allows for ergonomic use. [Programmatic navigation](../guides/programmatic-navigation.md) is possible with the [`push`](../api-reference/route/push.md) and [`replace`](../api-reference/route/replace.md) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above example on the [React](../guides/simple-react-example.md) page. The \"Guides\" section of the [documentation](https://typehero.org/type-route/) has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n","readmeFilename":"README.md","_id":"type-route@0.0.0-211537638008fa8b9068213694e346c73afb4e65","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-RFsmWGkcbEDEgo7rzXdRdgUYyrCCSHRqFnhdmeQxpQeQyL4kmA6o240Rlu7bNDTlQyqU1L3uB8qVn2rmAMQzuA==","shasum":"0c5beaefa54ca0e68b380b393683d0d9d4d92a82","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-211537638008fa8b9068213694e346c73afb4e65.tgz","fileCount":46,"unpackedSize":563158,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3pXECRA9TVsSAnZWagAA73AP/050iZm4MTtEsMHVdR4r\nf9tqHzBAD0InlFysPRqsXdLWJ+r+CYdq4TcZ935ZjfIiCM+oZy+l2MYbA19p\nsduO8mWepG/oR9+OCYxpD4lUPYcd9r4hggCf+SXPQVaRsBwnxSFoZtVLQrsd\nimx0ZB88OBLKLfc26dscGXdTnH86sf4ObRl3zHNK1UMozCz+qdTi2D8GNIbu\npn7k+9uRMTJPvizv8JG7CIO0MjvXIGbLn3OM4nhpjjYOI4hJFDyynNe9XIjY\nECm0EvxCws7UjTi0TFnV97SKbgkoMXb7UlfOYnh+hNAoWTHmmrWyGcRWF8/R\nqIOT3NSNBmlFb2e4dITl6AU4ATQN93KPpJTQQAa95Kfrp5/CI8BmvegQeP9B\nvEXgMe+SNcBgH+fFsVv7sI3rxNcdUMBmk5ISUEdY3PnRWE5M4e6u7iZlZh2d\n95m/oRo5QEBNKwO/C9lIQdBHYQMm7uCP09zLHjTH6BgSk1tpM2HAdnf0TGCm\nl8dkWjuO9yEsjZfENRiav7OZ+zwrXU0BIelQLiRcIVDlFHwcua0iCf9tqGqA\nrxyEU4v5rpS27MZaiz4nTrbhWyMABUVSQ1Ge00+QKvtedh9ODN4Q+kIIkHy7\nE921AMpINnpT410TfZj1dCmDlj7qmu+MoPpI3AHpJi6JxqPCRN0zY1zTuSDR\n5PZ7\r\n=NQ5m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCeSo6PcSVvLZU3lEtO+vShe4rW0UAjTXiJHw3euQcKzAIgHph2Qa+r3B2rSl382SHE+p0/odpVVUXAKbJERZE4K/M="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-211537638008fa8b9068213694e346c73afb4e65_1591645635939_0.1712359160577015"},"_hasShrinkwrap":false},"0.0.0-d46abc20bd54317f312aea61375c677cb06a7ccf":{"name":"type-route","version":"0.0.0-d46abc20bd54317f312aea61375c677cb06a7ccf","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"gitHead":"d46abc20bd54317f312aea61375c677cb06a7ccf","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/typehero/type-route\">\n    <img src=\"https://www.typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route</h1>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> Project&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Documentation</a>\n</p>\n<br/>\n<br/>\n\n## Getting Started\n\n[Type Route](https://typehero.org/type-route) is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> Type Route was designed with excellent React integration in mind but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full runnable version of the below examples on the [Simple React Example](../guides/simple-react-example.md) page.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](../api-reference/router/create-router.md) into the properties you'll be using in your application. The [`createRouter`](../api-reference/router/create-router.md) function accepts an object with route names and route definitions created via [`defineRoute`](../api-reference/route-definition/define-route.md) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n\n  useEffect(() => listen(nextRoute => setRoute(nextRoute)), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](../api-reference/router/session.md) then subscribe to route updates with [`listen`](../api-reference/router/listen.md).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a\n        {...routes.userList({\n          page: 2\n        }).link}\n      >\n        User List Page 2\n      </a>\n      <a\n        {...routes.user({\n          userId: \"abc\"\n        }).link}\n      >\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](../api-reference/route/link.md) property is an object with an `href` property and an `onClick` function. You need both to [properly render](../guides/rendering-links.md) a link for a single page application. Immediately destructing these into the properties of the `<a>` tag allows for ergonomic use. [Programmatic navigation](../guides/programmatic-navigation.md) is possible with the [`push`](../api-reference/route/push.md) and [`replace`](../api-reference/route/replace.md) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above example on the [React](../guides/simple-react-example.md) page. The \"Guides\" section of the [documentation](https://typehero.org/type-route/) has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n","readmeFilename":"README.md","_id":"type-route@0.0.0-d46abc20bd54317f312aea61375c677cb06a7ccf","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-wFTQnoaDIl6PEbXD7IW3IU1/eNZKdMsyZdwpkG6owV5Cf1uvUkycoKn9qFN5goA0K+S+W6dTo2O+m6CSfkpx9Q==","shasum":"4174156b879be6ecf316349affc966dd83bde8ba","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-d46abc20bd54317f312aea61375c677cb06a7ccf.tgz","fileCount":46,"unpackedSize":563173,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3pYmCRA9TVsSAnZWagAA9eoP/1/Ly1g7HAMcnJ5TAmE0\nWu9218n0hM5RUnvzbhXDYhZqjqA15mfx8s6O+t+RehmBjcF/iBzP6ZImyKwJ\nU8nkzDgDG29gBjfCGfDefyeisbCQJ25XLZQ4FpwVzkDSvanWWr/UhuCP/uSP\nryWUVCPZtblmGCbNs+35+XI2PUDG5OaJYcjKiULJRDf44QQ33vF2dT+SkwOP\nrMqZl6CIL1zkCrQZm8un/yWCpP8bdzSb1Pz1eO64sQjxYOpIzk9M5wwP2jXj\nRo+M4EaGtGxFlriXLOcNJNK9RTwW4VP9MmHi3bFy5fBPg+K6rmf01xpHOf6d\nAzI1eFrtRxwI36Vt/3c247CpR1h3iD4pF83c97RV95SaGXs5ErkOx8PF/uAf\nwDwU1wf01+wBVbkuiBUEYpo3KA6+sH+cmCHYapXmCzSDL3lkh1SkWS85Cnm7\nvRQqiNObH5w4dpHIQhn8YAOgbJtAPL1i3zuiavBdK7evxLxvISGliU3PFSzr\nZWLvTthumK0+8c9AljSjqcn3PHyjjMa8RQDrIL8B3CPTpOL6REvlnAcRLfUD\nVN/PXwVjp9Mf7r7ExY26EUX2umIq/kgTqmwDfS+gSWQMN/4CZZWRndPJGkKG\ny1hMPzG8/CSNp1Su4uEzrJZHtVTIlGWW5gE2hkGo9xzOuKSFRKwNTMinkISH\nIBpp\r\n=gPkN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDdVdsrGhOwMXuq8Pprs5FVIKJdEt8uy9mMy9+BpRfHkAiEAnMD8hYn9yBwTxutIeXWp52tZlqBNFqzbJu4GnKdl85I="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-d46abc20bd54317f312aea61375c677cb06a7ccf_1591645734431_0.9249808272083899"},"_hasShrinkwrap":false},"0.0.0-420cab3a39e213b728942290fe7e43dd1d79fb02":{"name":"type-route","version":"0.0.0-420cab3a39e213b728942290fe7e43dd1d79fb02","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"gitHead":"420cab3a39e213b728942290fe7e43dd1d79fb02","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/typehero/type-route\">\n    <img src=\"https://www.typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route</h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/ready-for-production-type-route-v1/02\">Introductory Blog Post</a>\n<br/>\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> Project\n</p>\n<br/>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> Type Route was designed with excellent React integration in mind but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full runnable version of the below examples on the [Simple React Example](../guides/simple-react-example.md) page.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](../api-reference/router/create-router.md) into the properties you'll be using in your application. The [`createRouter`](../api-reference/router/create-router.md) function accepts an object with route names and route definitions created via [`defineRoute`](../api-reference/route-definition/define-route.md) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n\n  useEffect(() => listen(nextRoute => setRoute(nextRoute)), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](../api-reference/router/session.md) then subscribe to route updates with [`listen`](../api-reference/router/listen.md).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a\n        {...routes.userList({\n          page: 2\n        }).link}\n      >\n        User List Page 2\n      </a>\n      <a\n        {...routes.user({\n          userId: \"abc\"\n        }).link}\n      >\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](../api-reference/route/link.md) property is an object with an `href` property and an `onClick` function. You need both to [properly render](../guides/rendering-links.md) a link for a single page application. Immediately destructing these into the properties of the `<a>` tag allows for ergonomic use. [Programmatic navigation](../guides/programmatic-navigation.md) is possible with the [`push`](../api-reference/route/push.md) and [`replace`](../api-reference/route/replace.md) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above example on the [React](../guides/simple-react-example.md) page. The \"Guides\" section of the [documentation](https://typehero.org/type-route/) has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n","readmeFilename":"README.md","_id":"type-route@0.0.0-420cab3a39e213b728942290fe7e43dd1d79fb02","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-OcSYuAh8QMRvAZps5+uyoZTPzbewCtxXAzw1XEnRgIozmN2oVlqVHT1NEihFhiKrneHZEthL6I0aqXHr6QVLYw==","shasum":"7593cbb2ef587f802fb1012230a4af15bda62c2b","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-420cab3a39e213b728942290fe7e43dd1d79fb02.tgz","fileCount":46,"unpackedSize":563231,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3pf9CRA9TVsSAnZWagAA0OoQAI3woet0qDSDHkvAVcM6\n3UtY/QLgU3Inmf+BGpb7AwzdFyyQpDIO1AEOB1cRsYeK/4tHfeA11OxlfCWs\n50Ef1EOcYMSQBeLIgz3quUNYBnCOZE4mGuTc4gmCaT0ADsoNAOb4S/xYkv0O\nig1QcJS/fMpHQN5bjweV+thq2lk8RmOKS+rqDgiYuvzLUXXg3p6E2ed847/f\naBvL6WXZARpYem0VsahM1p1lq1YnRarC/aPjUYF12ty+adgOLZsra2XVSM//\nOb7ND35sre4JaxH5FyXDqLN4hutdjbWb6cnFw5ojRzx3IvosIVxaUaOQV0Rp\n2XupTNVRW1al77/TR2r5/quNr+DB9eY7GVohSUzMQ/B50Ofq8iX3WSs7cG8A\nI01ZKRDRhveL9zWL25Pr1nucX/EKW2cobxupgFbtweocUBC8tqJAc3avTG15\nS9hN0+mBIc1OFB19k/VMZMeXz5r9u/I9uE9I6ly9aL11jKRslsh4AKXr242D\nL/+z8rp/6/twFcrdgO3U/PNj4p/AUVO/IzoGjn5kQpqeblU4TV7p1Y9dCg/A\n/RXQ8jSAvf/3Tbn33sg+J3yfyGXiAOMJuzDaM79z6CxjTI0jRAnWMB37Nj0K\nWzKHkOIznOJeczjPxR78jR32B2ad03vxborhCsXcpB98V78y4bXbvvE8AwFQ\n2HvQ\r\n=VtPt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIECFB4nwaHtjmKWqN3spCJrklLC9yZi9sEl0K4k5tKOFAiEA90icDlxuq27iSuFAcojW8FXNgAsat9NezTR8KJig9FI="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-420cab3a39e213b728942290fe7e43dd1d79fb02_1591646205269_0.6762773262145594"},"_hasShrinkwrap":false},"0.0.0-d2c3afb5be65316194d4e38382118a9915920093":{"name":"type-route","version":"0.0.0-d2c3afb5be65316194d4e38382118a9915920093","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"gitHead":"d2c3afb5be65316194d4e38382118a9915920093","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/typehero/type-route\">\n    <img src=\"https://www.typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route</h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/ready-for-production-type-route-v1/02\">Introductory Blog Post</a>\n</p>\n<br/>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> Type Route was designed with excellent React integration in mind but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full runnable version of the below examples on the [Simple React Example](../guides/simple-react-example.md) page.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](../api-reference/router/create-router.md) into the properties you'll be using in your application. The [`createRouter`](../api-reference/router/create-router.md) function accepts an object with route names and route definitions created via [`defineRoute`](../api-reference/route-definition/define-route.md) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n\n  useEffect(() => listen(nextRoute => setRoute(nextRoute)), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](../api-reference/router/session.md) then subscribe to route updates with [`listen`](../api-reference/router/listen.md).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a\n        {...routes.userList({\n          page: 2\n        }).link}\n      >\n        User List Page 2\n      </a>\n      <a\n        {...routes.user({\n          userId: \"abc\"\n        }).link}\n      >\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](../api-reference/route/link.md) property is an object with an `href` property and an `onClick` function. You need both to [properly render](../guides/rendering-links.md) a link for a single page application. Immediately destructing these into the properties of the `<a>` tag allows for ergonomic use. [Programmatic navigation](../guides/programmatic-navigation.md) is possible with the [`push`](../api-reference/route/push.md) and [`replace`](../api-reference/route/replace.md) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above example on the [React](../guides/simple-react-example.md) page. The \"Guides\" section of the [documentation](https://typehero.org/type-route/) has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n---\n\nType Route is a [Type Hero](https://typehero.org) Project","readmeFilename":"README.md","_id":"type-route@0.0.0-d2c3afb5be65316194d4e38382118a9915920093","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-5FCeJ5b6+GBRylcrFtugnmCK6blGawj4ve+XYpE1A6I3cXZCv1xE+BygRGmM6/QHGozVp1fZD97ezXxyo7OIEQ==","shasum":"a3c21f588010397a6dc293252ce07f344869688a","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-d2c3afb5be65316194d4e38382118a9915920093.tgz","fileCount":46,"unpackedSize":563219,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3pi8CRA9TVsSAnZWagAA0x0P/3/eXFcs8EBjunQU6zGV\noLUU8Y8suixSyxLqtxS2apNTEGJnW3th1iwmyQD8xb28biTMWuFvTpY8lEoA\nZH3e483nYDarGaBsu+xonvLdgcxCvZ0ZZgItHZAdU4u4h+QwuXMgO0yep37z\nAPQBsb9szeu9DjRtn/JyoXxrKz2bGxjxJWDYq0A9tz9bNZ8tmAZr5lGr4i1a\nqi4pCtlhnFPlS3CDjpdYyEOP0AxnjBujJ/RECJBefjkNBIiODgYvSPXycMkA\nHm3iPwwFQ6RZpDDyvxR9ya/sEYAo/d+4QGIa4YFZE+/NajcTkz7c8yDwni0t\ncTAJomA/oacgZjstX+3A+tivyqlQVguzRPmGdXQH99RtLICgFaoyOEcPXaT0\nt3jP2vHvSHlOY3dkuWyjIk+rrGksmUlPFSq0nUStI3CVI1qHfZKly5ioX7Gp\nQUnJIjPPNPICBlQGbp4GOKB9xonSeXOiD0p1KwcIjtFdTtZrGjUstf4yeXQ6\nNIE1ZiNFYqZf8pLAY7VIPhkXKHaB4aAgVGAUKT8+TZf1FJ2gMJK22TOOXljo\nI+rsSNbbAPQ3P9k9GrJgy3MPenvYSi/J9TAvM9RMPFa/81JPLYvJeRU4xHoN\n/MsfbrpdGC0xKCITvt3njT700NJYov0U2aa/NcgrzC7beastUSBk+jTi78+N\nPLC5\r\n=18ad\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA4OnUnlttkrMUTd1TYQnk1vpZb8rxpBifBOySIfyUkvAiEAsHf3552FFMpQeIxJJUQ5WEuFSZqeNqL9S5ZcPBJ6iPc="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-d2c3afb5be65316194d4e38382118a9915920093_1591646396570_0.05632513218136137"},"_hasShrinkwrap":false},"0.0.0-a2e38a22373242625bcb908fe407a81f8247e627":{"name":"type-route","version":"0.0.0-a2e38a22373242625bcb908fe407a81f8247e627","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"gitHead":"a2e38a22373242625bcb908fe407a81f8247e627","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/typehero/type-route\">\n    <img src=\"https://www.typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route</h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/ready-for-production-type-route-v1/02\">Introductory Blog Post</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> Type Route was designed with excellent React integration in mind but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full runnable version of the below examples on the [Simple React Example](../guides/simple-react-example.md) page.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](../api-reference/router/create-router.md) into the properties you'll be using in your application. The [`createRouter`](../api-reference/router/create-router.md) function accepts an object with route names and route definitions created via [`defineRoute`](../api-reference/route-definition/define-route.md) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n\n  useEffect(() => listen(nextRoute => setRoute(nextRoute)), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](../api-reference/router/session.md) then subscribe to route updates with [`listen`](../api-reference/router/listen.md).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a\n        {...routes.userList({\n          page: 2\n        }).link}\n      >\n        User List Page 2\n      </a>\n      <a\n        {...routes.user({\n          userId: \"abc\"\n        }).link}\n      >\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](../api-reference/route/link.md) property is an object with an `href` property and an `onClick` function. You need both to [properly render](../guides/rendering-links.md) a link for a single page application. Immediately destructing these into the properties of the `<a>` tag allows for ergonomic use. [Programmatic navigation](../guides/programmatic-navigation.md) is possible with the [`push`](../api-reference/route/push.md) and [`replace`](../api-reference/route/replace.md) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above example on the [React](../guides/simple-react-example.md) page. The \"Guides\" section of the [documentation](https://typehero.org/type-route/) has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n---\n\n_Type Route is a [Type Hero](https://typehero.org) project._","readmeFilename":"README.md","_id":"type-route@0.0.0-a2e38a22373242625bcb908fe407a81f8247e627","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-vpqGSeKTXFitLW8R1w8TJGXSyxkbNJ30V65X0WZuqLYZT54Jk2/oTetvMgRyNu4rfC41WPPbbUm43CeZ3N1iSg==","shasum":"234b2f4706660b01de24c46f581fa9c8662b5463","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-a2e38a22373242625bcb908fe407a81f8247e627.tgz","fileCount":46,"unpackedSize":563216,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3pjiCRA9TVsSAnZWagAAIEYQAKN1WW2L5gpcvYgSrXGw\nUBm8we9Zaawb8j6wLiXk6DKecPqlzFjMsENpdbvnAGayP18ewO+FtnT7IwE5\n0BTkH5dJBJafGXv3QFi/h+Zp7Fb9CSjfz3PGxza7ckANjT1VLD+uzEdBKfGZ\nlTV6T8pDigb6mXFyQTyfPcTfdYnYcuInEuZDZlURak5tYJZSCbfe6Tt8SIeS\n2cfK390aVcugwpPkQvBWyJ7ZZq3K7IJLYLaUf0PSiHSilEITUmjwt/45jpuf\nUelepFUhBixB2EXqaS47+niy8gKAEjXI+CEopuohLb9qnZbkuDwo/Q8BY+Le\nKsNze8ZggAIylrFNuR0Z/cLZ1yQzSWa79K/QC/M0mFlQGG0A0u5J5eDAw1fn\nkinW5UwBtJWio7ayJvK2YV8iOYsavLZnzcvZvTJ9rIZM3QkxgPd340fkc9nW\nQNYINfRhZaWwBDB+VeAlIF+ukNtocnXm2w4BXPToBBGMWqeLrYuwJw8pUV1i\nBQDYt7jtGlFq6+BYY/phVcF3yvxZOEDDROI/klyYk9SE67cQh01Ej2kiWi78\nkWuhTmySvTnU9H9byf8TxaAiouph7ziZhazhgNIMjTTAWs6QZLZwA3bEEKM0\nxlGUJMSVfuBPIdIwAfrr3jkG0yTc4CyIPa+vEitwRrwPnjV2hcSxT6zuL9j6\ncFY4\r\n=N+N3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCAa09lSDbL6J+h9M3ER51pSXQfqgcOVLKe+gL2oUTROwIgKEfnAflAE3DgEosqU4obF5RhT/nESiUta70qoy51cuY="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-a2e38a22373242625bcb908fe407a81f8247e627_1591646433612_0.7970463407635124"},"_hasShrinkwrap":false},"0.0.0-be0c2cc4ca5b469922e0b36e1219bc9e44e63499":{"name":"type-route","version":"0.0.0-be0c2cc4ca5b469922e0b36e1219bc9e44e63499","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"gitHead":"be0c2cc4ca5b469922e0b36e1219bc9e44e63499","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/typehero/type-route\">\n    <img src=\"https://www.typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> Type Route was designed with excellent React integration in mind but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full runnable version of the below examples on the [Simple React Example](../guides/simple-react-example.md) page.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](../api-reference/router/create-router.md) into the properties you'll be using in your application. The [`createRouter`](../api-reference/router/create-router.md) function accepts an object with route names and route definitions created via [`defineRoute`](../api-reference/route-definition/define-route.md) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n\n  useEffect(() => listen(nextRoute => setRoute(nextRoute)), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](../api-reference/router/session.md) then subscribe to route updates with [`listen`](../api-reference/router/listen.md).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a\n        {...routes.userList({\n          page: 2\n        }).link}\n      >\n        User List Page 2\n      </a>\n      <a\n        {...routes.user({\n          userId: \"abc\"\n        }).link}\n      >\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](../api-reference/route/link.md) property is an object with an `href` property and an `onClick` function. You need both to [properly render](../guides/rendering-links.md) a link for a single page application. Immediately destructing these into the properties of the `<a>` tag allows for ergonomic use. [Programmatic navigation](../guides/programmatic-navigation.md) is possible with the [`push`](../api-reference/route/push.md) and [`replace`](../api-reference/route/replace.md) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above example on the [React](../guides/simple-react-example.md) page. The \"Guides\" section of the [documentation](https://typehero.org/type-route/) has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n---\n\n_Type Route is a [Type Hero](https://typehero.org) project._","readmeFilename":"README.md","_id":"type-route@0.0.0-be0c2cc4ca5b469922e0b36e1219bc9e44e63499","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-6xKCcOH9/84FwaFo3KqG6a0FfpLnqgId/NEpjAxN2iT31b/1Rj+k2+F4dswWjUfXDlgaIqnLCyJQdXhRNqCEiw==","shasum":"61092b073342e4fafc1b8fb07731c1598a7b8e3d","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-be0c2cc4ca5b469922e0b36e1219bc9e44e63499.tgz","fileCount":46,"unpackedSize":563479,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3pziCRA9TVsSAnZWagAAGsoP/0jyo696PCefp7sNfQub\nJ2BVKdVdela84oRyPcTCivaz3fAdNusqh7bgsEbjufWO02ES1+2CtFiB1hs0\nHbln0rm9H2gsq1JuZi4kzBeo02zDlYeZgctaMWeqhtMU5xzpbSW08UIDU+a6\nhMOwnd9qqip38eWQMiozzz3Ld2kUl9GmQ6cMOORP8r/BPBT2JcHX7Ji6wRcx\nROtTn77WbTGyb5XvqJwtZwKrC8j6QfuK33vb2I4pFYl7BkmOLuKt8BgDx14D\nNQIyyNBQyEFpa+DPgUaTmiiJwIKd+UYUb5/YRv5z7288c7hthTCuNq4qODxv\npOyqBkb1fHkVB/PMZIq3cYsUaKgLNKtdioKkGYltqlIQyYT4Tn+NYRmXRcKb\nTlrtdNnYLonEJ4XHhPqkTw3anfs/m0OtprQSMOlqm6c8ZE1ZA7tKG2kr48Jx\nliZWvR3U9/aKcGBEtWTCebny9tjOBewI/T389fAf116K0+MMka6k5oNwnTiC\nOhwR6L4T2h8IaJgSjPugLFpsbjSHex2RldkBfjGXPW6fuhDVJySuH1IGXL//\nhwdrLIP08nhXYMhOJcL/cFv1gTnHjDBE5i7bmgcCpbnzw3pQRoN1E5oEIrAH\n4WatjSKeSxaidU5pPvp7oHNluucAxP6NYe42IZzGGMqRUZoisKIj6UPIb869\nxmk1\r\n=oe0O\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICkKYC1KaEmxsSbjMCgiM8gKkUUxsXN5LMpeFEztgaDZAiAen4dHSEFxDDDT0SvcmP8C/b6ZOTwzX8Pofmd6DkhqNQ=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-be0c2cc4ca5b469922e0b36e1219bc9e44e63499_1591647457730_0.5475957092665427"},"_hasShrinkwrap":false},"0.0.0-35dca733bc29a2711700ebc3b61f961981da5704":{"name":"type-route","version":"0.0.0-35dca733bc29a2711700ebc3b61f961981da5704","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"gitHead":"35dca733bc29a2711700ebc3b61f961981da5704","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/typehero/type-route\">\n    <img src=\"https://www.typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> Type Route was designed with excellent React integration in mind but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full runnable version of the below examples on the [Simple React Example](../guides/simple-react-example.md) page.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](../api-reference/router/create-router.md) into the properties you'll be using in your application. The [`createRouter`](../api-reference/router/create-router.md) function accepts an object with route names and route definitions created via [`defineRoute`](../api-reference/route-definition/define-route.md) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n\n  useEffect(() => listen(nextRoute => setRoute(nextRoute)), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](../api-reference/router/session.md) then subscribe to route updates with [`listen`](../api-reference/router/listen.md).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a\n        {...routes.userList({\n          page: 2\n        }).link}\n      >\n        User List Page 2\n      </a>\n      <a\n        {...routes.user({\n          userId: \"abc\"\n        }).link}\n      >\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](../api-reference/route/link.md) property is an object with an `href` property and an `onClick` function. You need both to [properly render](../guides/rendering-links.md) a link for a single page application. Immediately destructing these into the properties of the `<a>` tag allows for ergonomic use. [Programmatic navigation](../guides/programmatic-navigation.md) is possible with the [`push`](../api-reference/route/push.md) and [`replace`](../api-reference/route/replace.md) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above example on the [React](../guides/simple-react-example.md) page. The \"Guides\" section of the [documentation](https://typehero.org/type-route/) has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n---\n\n_Type Route is a [Type Hero](https://typehero.org) project._","readmeFilename":"README.md","_id":"type-route@0.0.0-35dca733bc29a2711700ebc3b61f961981da5704","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-cwJwh87xwaUex20PDkd6ROESAkXqDINXqfHRAOUujGGOFvhneg7aFdLbHlCaKHw7ZQJeKJp86VLbjUqc6qj5cQ==","shasum":"a0d02322a7b46ba6045277555346c138e4f9a376","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-35dca733bc29a2711700ebc3b61f961981da5704.tgz","fileCount":46,"unpackedSize":563477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3p0SCRA9TVsSAnZWagAA5+kP/3btNo/nDj4YAd9g1CUb\noFo57WICtZs8W76OnWpGvUu7Tyg0Et8SRS099vQFmG7Mh0C/D2zZDdTaqwqE\nvp//SJTMsW63sJT1mD4zjJ3ZWIKs3xVO0+BhEZYByOKqUZVxNssLY28peVDe\ntaMXa1KLSeDr9Q1ILQuPmk8LDkWMT7ynbqDp+TPvjhU+UQaiQ+RA/+o2it+M\n5OaXQataLphaHtA9D2zpL39545Oozs+4y0tnLve5JAfQ49xVTsMo05YSEHdm\nil4fzcQCd5HZrRe2d3GQBNzCXxu0PoJcbHvTKuZ7K1M8ZI8ox7/04VtTi1CW\nR0YYL25UbFduxw2f4tLnNlg6e0nzbOco8D5ypYOcj9+Eme3vFsfrV40/K/VQ\nOmIp2jXRzPDmI7ICVMqqWGPZlxLVzL1VOOguq64CRfs/idfhu7gywEyCUgUH\nYBtvDRO8XBb6RKHfvqWSAjIQb//MOMEiLxzsd7+OV5AhHdsDpmObFiNZIF01\nSdYLcAP5DPJNmutJo2UrvBoL9Inc8nGIuWes9pIGXgwM1yEvF4KYrMTusb1r\nvfh3YRg8Dj5o8ltm62YcP6Pg+NoHZnpQLZEXthQ/6wSg24aEAXJuyNbj/HZX\n9b4ULHMLKbBkn95XxIAvPTR0uVrufDw/KxKGehbGFARPSDZWtGSMHnlFzLem\nC8oz\r\n=khFw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD0sBqiR2kH/u3FeqZN4fwg5TVSgHhrYk97at00ocGUhwIhALFRdZmXXD2FV7TEz91aSCGQZsnmnsnfnaPYZrS8HdBE"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-35dca733bc29a2711700ebc3b61f961981da5704_1591647505672_0.9803588305425854"},"_hasShrinkwrap":false},"0.0.0-af822622d8d40ef38b2d8ec99e58f8b9b91cf914":{"name":"type-route","version":"0.0.0-af822622d8d40ef38b2d8ec99e58f8b9b91cf914","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.8.3"},"gitHead":"af822622d8d40ef38b2d8ec99e58f8b9b91cf914","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/typehero/type-route\">\n    <img src=\"https://www.typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n_🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions._\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> Type Route was designed with excellent React integration in mind but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full runnable version of the below examples on the [Simple React Example](../guides/simple-react-example.md) page.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](../api-reference/router/create-router.md) into the properties you'll be using in your application. The [`createRouter`](../api-reference/router/create-router.md) function accepts an object with route names and route definitions created via [`defineRoute`](../api-reference/route-definition/define-route.md) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n\n  useEffect(() => listen(nextRoute => setRoute(nextRoute)), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](../api-reference/router/session.md) then subscribe to route updates with [`listen`](../api-reference/router/listen.md).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a\n        {...routes.userList({\n          page: 2\n        }).link}\n      >\n        User List Page 2\n      </a>\n      <a\n        {...routes.user({\n          userId: \"abc\"\n        }).link}\n      >\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](../api-reference/route/link.md) property is an object with an `href` property and an `onClick` function. You need both to [properly render](../guides/rendering-links.md) a link for a single page application. Immediately destructing these into the properties of the `<a>` tag allows for ergonomic use. [Programmatic navigation](../guides/programmatic-navigation.md) is possible with the [`push`](../api-reference/route/push.md) and [`replace`](../api-reference/route/replace.md) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above example on the [React](../guides/simple-react-example.md) page. The \"Guides\" section of the [documentation](https://typehero.org/type-route/) has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n---\n\n_Type Route is a [Type Hero](https://typehero.org) project._","readmeFilename":"README.md","_id":"type-route@0.0.0-af822622d8d40ef38b2d8ec99e58f8b9b91cf914","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-K/DjUj22N8qnePMhqNAkSXJBPAqxdfGBsWCFGPHpht0YgWKBocs9bPddyvUJoxQs4E09q+MhVSTaXYH0SLbx5w==","shasum":"6721959a6de797ac8705f9379f4585de756119e3","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-af822622d8d40ef38b2d8ec99e58f8b9b91cf914.tgz","fileCount":46,"unpackedSize":563479,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3p4yCRA9TVsSAnZWagAAAYwP/0LgxaNsFN/O2r7QRs+7\nBckvwzMBH7p4flGzcZhXXCvpfWYuyvJujsM915louC/vbBmPQaTBGlNb53N+\nSnCBNHLfjgS1rX0FuUN03WzOKaggU2t/aZ6QYQeFq8/fyJdnUA4FUTK8UK3m\nwa1S+KqlhO7eadzY7FlZvebjavKAcM+okdsxeRqjz4VbcNjTmyQQ9X9k23/M\nieywsbpvw9bIaxJPUtg6hmJ5tSNrvqTfo00s12T1m5Y89dW20brNHlwpGd3D\ngn+12m5/mrHNvpKx/8SJjCK4HkPbUMtpN1HavjzXYkha5kJBrTOBIEofDFIj\nYh2FOpsy8mF0yLwXAriAcByVUv30LSmeQNdEtM8CKWp51K70Ccb//gAFegVn\nKweVwsZZKf5KV/1LvyNqJAX5BXc9VcdcUYjaPyCnwu0PrmpZYMVjRL+ghiz7\nJ+7+J8e3rv881kYe5+p5BdLbviXma0P+RIU82EU8eDEipamRAfbtAtUI4ybb\nYwnOA4CMrT8ugfsl/qOypxAXKi2Y9Hrolqi8yYZI2Mtw3pfTIQEi8kPda8ib\nQNStRQ4SXP4EDk5QfOmTzviNr/x4mbDUMi+kKQP41HvFWk3TNXAqEriMjUTY\nCJlaqjRvKATYS0sXZQOPI8OcUIu+Hwx1T4OrKIoYBA5kRSHgTyS2pVo7GOku\nSx3V\r\n=tWva\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDMowNvHVCyAbxw9RJimea5XVBUno+6feuleCMhxu8tvAiAUX6Eocf5IdeQXHmhBMnxFwwc+eg87xTIs7q2R43MsZw=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-af822622d8d40ef38b2d8ec99e58f8b9b91cf914_1591647793979_0.5448250239387615"},"_hasShrinkwrap":false},"0.0.0-6130f9c57c408e2aad8b4d4c8b9564dc92ac0b2e":{"name":"type-route","version":"0.0.0-6130f9c57c408e2aad8b4d4c8b9564dc92ac0b2e","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.9.5"},"gitHead":"6130f9c57c408e2aad8b4d4c8b9564dc92ac0b2e","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/typehero/type-route\">\n    <img src=\"https://www.typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n_🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions._\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> Type Route was designed with excellent React integration in mind but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full runnable version of the below examples on the [Simple React Example](../guides/simple-react-example.md) page.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](../api-reference/router/create-router.md) into the properties you'll be using in your application. The [`createRouter`](../api-reference/router/create-router.md) function accepts an object with route names and route definitions created via [`defineRoute`](../api-reference/route-definition/define-route.md) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n\n  useEffect(() => listen(nextRoute => setRoute(nextRoute)), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](../api-reference/router/session.md) then subscribe to route updates with [`listen`](../api-reference/router/listen.md).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a\n        {...routes.userList({\n          page: 2\n        }).link}\n      >\n        User List Page 2\n      </a>\n      <a\n        {...routes.user({\n          userId: \"abc\"\n        }).link}\n      >\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](../api-reference/route/link.md) property is an object with an `href` property and an `onClick` function. You need both to [properly render](../guides/rendering-links.md) a link for a single page application. Immediately destructing these into the properties of the `<a>` tag allows for ergonomic use. [Programmatic navigation](../guides/programmatic-navigation.md) is possible with the [`push`](../api-reference/route/push.md) and [`replace`](../api-reference/route/replace.md) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above example on the [React](../guides/simple-react-example.md) page. The \"Guides\" section of the [documentation](https://typehero.org/type-route/) has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n---\n\n_Type Route is a [Type Hero](https://typehero.org) project._","readmeFilename":"README.md","_id":"type-route@0.0.0-6130f9c57c408e2aad8b4d4c8b9564dc92ac0b2e","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-nts+5KryVsyCU5P9nrJl3Nll9o89En0JkqzCLUMf/JR8wxdrPcAuReuk5YLz+bW8NfU710v+702JlHKysjwuRA==","shasum":"0429e5d6f87a7b5e33f1b1ac7168e76a96b03d38","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-6130f9c57c408e2aad8b4d4c8b9564dc92ac0b2e.tgz","fileCount":46,"unpackedSize":563001,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3qXLCRA9TVsSAnZWagAAWAgP/RNjk8nEp1djUDtJ6RHK\n8gV65/dzOBQ3bNpoXD09+iyHdSAYInJzToDy2Txv5HBxR2PAkKIzRDmpz6Z9\nkgast1vi83xuhjqwGM7ZGu5YGtiF0dDV97yxv0bTKshH5q8BO3qvNdg0Atyz\npy6aEEaG4dD0jsaf7bXcQ3xOf36QPoe+bNjseIUWV5clTC/pQ0eoadRujdY9\nw671ie4VxSXCXxDvBhT9jJLRfmy0k2wClxveVUZHQWvdbZwHYaiL3AW/Scc2\ngm8Ngeq+520XE4U6UQBHQHK2GVkoFay4Y6uOiQ2jSQF2EjAgDMotHJy7lD77\ne7bVa6Jm7V6llmC37EknYWyWnQq0fO6mB9VMm7OXZ+TwcmSJXwGSV4L/HamK\njPqvHAYDcEz3Bv/tTY+oWUZx+F1NUyuebpBh6MLYdcWW3eYgbTOR6LS/SOBS\nu3Lu3aUIJvBsyH6uw/cBMIYFiEoR4luNOvDAkPYXcALMSRGMWS9l2lpUePaH\n5oknireksFo0P7qJlhr2aEMcVcPHfgNvZT9QU53ijbq2cjk++11SyBmoQu8b\nqRo8j7YljLqv7+AMAUwMl5IIWzi5kc5AU4SRDvHICJulnoXH3eg4MVuWkBBS\nk9nX9Yr7M38ocNuS9hZT9grQFlSYmnokS5vukmd6onJo7clOTTLiWepRKLhU\nFQoL\r\n=FXYY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQClsvf2XAFaTdtRxdnHR6AY/xJyWVKXaIPyopNOHZvX8gIgJzOe19LYxFlJZQF55dHy/u+pxDgHVU6VlCRVlZxjjL8="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-6130f9c57c408e2aad8b4d4c8b9564dc92ac0b2e_1591649738739_0.032866430823031756"},"_hasShrinkwrap":false},"0.0.0-f43136155b5d478895314c40476b288c8d588fc2":{"name":"type-route","version":"0.0.0-f43136155b5d478895314c40476b288c8d588fc2","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.9.5"},"gitHead":"f43136155b5d478895314c40476b288c8d588fc2","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/typehero/type-route\">\n    <img src=\"https://www.typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n_🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions._\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> Type Route was designed with excellent React integration in mind but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full runnable version of the below examples on the [Simple React Example](../guides/simple-react-example.md) page.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](../api-reference/router/create-router.md) into the properties you'll be using in your application. The [`createRouter`](../api-reference/router/create-router.md) function accepts an object with route names and route definitions created via [`defineRoute`](../api-reference/route-definition/define-route.md) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n\n  useEffect(() => listen(nextRoute => setRoute(nextRoute)), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](../api-reference/router/session.md) then subscribe to route updates with [`listen`](../api-reference/router/listen.md).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a\n        {...routes.userList({\n          page: 2\n        }).link}\n      >\n        User List Page 2\n      </a>\n      <a\n        {...routes.user({\n          userId: \"abc\"\n        }).link}\n      >\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](../api-reference/route/link.md) property is an object with an `href` property and an `onClick` function. You need both to [properly render](../guides/rendering-links.md) a link for a single page application. Immediately destructing these into the properties of the `<a>` tag allows for ergonomic use. [Programmatic navigation](../guides/programmatic-navigation.md) is possible with the [`push`](../api-reference/route/push.md) and [`replace`](../api-reference/route/replace.md) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above example on the [React](../guides/simple-react-example.md) page. The \"Guides\" section of the [documentation](https://typehero.org/type-route/) has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n---\n\n_Type Route is a [Type Hero](https://typehero.org) project._","readmeFilename":"README.md","_id":"type-route@0.0.0-f43136155b5d478895314c40476b288c8d588fc2","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-UPzxU9hYNx+Aj/LBOrtcko6I+tnGLbVOWdevFVBJaie2VXsx8e4yzhhlzqDq2asfhYObSMh4qVc79mFoohEY/Q==","shasum":"523838e35d4219d6205b511ad0ffbde97bcf7771","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-f43136155b5d478895314c40476b288c8d588fc2.tgz","fileCount":46,"unpackedSize":563001,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3qruCRA9TVsSAnZWagAAw1cP/1kB22hL1n72kTubr0Km\nLVygiytH/1OY8a5wmwwiO3NOnzFeAZEMMDqQ7D710JRTxhu5MqGBNq3CmF4y\n8QQXKmvFe3sAeE+xXsONwlp0jO8U5NPHI89PuYpmn54byJfXtpHSRKG6C8tX\nFCB/Cnli2ful1uQfzZdCASLS3RUA6wPe2v36w28DXd2/W8bIS6oCpS5uFbXC\nuLUVpC3txgh0gw1oOPIT65kTiXE5I/Q41VbD+C9LrzMAtq72zB06E6ejbjJU\nWq/qrMNa/lgKG4qnKo4Vb9VI+Kbk96A7QK7Rk0zmY6wxnaLyM1+aZPVQVhuA\nrPbfh1bcDt/iWC1QxjookpgFuIHWYiAHhR57271R3HG8GtLaUAf4NuR9hQXa\nvyvqo5VZnTtmHvGDYVIQFMpGwfPx6wxMsKN9aDhs6vvGkDJwW1d8nMjl8D2X\nwigfnnFb4YgDAY9XUdwe51bbMUirVfrxtB1Ltsp4ODpPCZ57IF93kMFAKPcU\nsSPgs4zrVmNkHAMfHUng+YQXW9lWW0BEYt6kmu4kVBmVkFLl0mGXEIGzKqYY\nzwlFAjmHOSqMyPZH2I1iLu0a27RqhnC3EUk9omTQ6LR5pEHMKTj/84E25S0C\nlfrNqpKxoCE88Z6ekuHcAeiVLpY4a3YUVzcc6HDwA3rkSfAqj4xWHTYSZcrR\nq4Li\r\n=smfo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBeMbU8sOuzMyQndm0NDN+4io3cC67EdYb1wlObsGbOZAiEA0EzFqb+9mBseoOO7T2E11usjrLrykQaHWMN1uOZwXvU="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-f43136155b5d478895314c40476b288c8d588fc2_1591651054079_0.021852801356121443"},"_hasShrinkwrap":false},"0.0.0-e372bb2a9e9c1debfe7238c041d9e3c8b5f267c9":{"name":"type-route","version":"0.0.0-e372bb2a9e9c1debfe7238c041d9e3c8b5f267c9","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.9.5"},"gitHead":"e372bb2a9e9c1debfe7238c041d9e3c8b5f267c9","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/typehero/type-route\">\n    <img src=\"https://www.typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n_🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions._\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> Type Route was designed with excellent React integration in mind but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full runnable version of the below examples on the [Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) page.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n\n  useEffect(() => listen(nextRoute => setRoute(nextRoute)), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](https://typehero.org/type-route/docs/api-reference/router/session) then subscribe to route updates with [`listen`](https://typehero.org/type-route/docs/api-reference/router/listen).\n\n> New Type Route users often wonder why no React components are provided by Type Route. Read the [React Components](https://typehero.org/type-route/docs/guides/react-components) guide for more information on this topic.\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a\n        {...routes.userList({\n          page: 2\n        }).link}\n      >\n        User List Page 2\n      </a>\n      <a\n        {...routes.user({\n          userId: \"abc\"\n        }).link}\n      >\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` property and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link for a single page application. Immediately destructing these into the properties of the `<a>` tag allows for ergonomic use. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above example on the [React](https://typehero.org/type-route/docs/guides/simple-react-example) page. The Guides section of the documentation has detailed overviews and examples for most use cases. Additionally, the API Reference section has descriptions and examples for each part of the API.\n\n---\n\n_Type Route is a [Type Hero](https://typehero.org) project._","readmeFilename":"README.md","_id":"type-route@0.0.0-e372bb2a9e9c1debfe7238c041d9e3c8b5f267c9","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-nmKpLbtAyAhWcUGB/RzEPjonRKOfgEX1XuE0B5eOzmGThHJPkDWdxgzX66V//mJNLvYeuSnrSn6X8uIj9VPahw==","shasum":"48c731029a56703998d1830248b9e2d3e1ac0ef8","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-e372bb2a9e9c1debfe7238c041d9e3c8b5f267c9.tgz","fileCount":46,"unpackedSize":563554,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3wd0CRA9TVsSAnZWagAApqIP/A0HkI24LOLrYSnWO6jb\nPslO7lhXSZV9oCfDpZM1fweiKQPTm6eHNz5TgA8f+to8rHuurRCJcV5rW6RX\nRIjRNgMOOsG0GgItOwN/Jx7GiOClPOtpZMNqLuLSqg9rxrUQHY+9miepvPfK\nKDCAdLxwDHGp049YTPy02f/Fs5UMsXpkJTIQ6YbHufbK3dr2sv91s1Qnak2+\nMGBlI343S4QH7txaQf0ml2yE+b++slB8ykeEaeACsdvMHE4W0gwVoXhjEIxZ\n5MMoWivlXaVFNUyT5TYTnf7DKFyhGl8IALWAGM5dpIGvdlWxL0kr8ZIKAhpH\nfaq/SlDR+M+gKzjiDVZhDfj3OVuEjnubZWbX2gYOgXsaCWI8xjZOIYc4cU3N\ncz9bL55C+CdhLqZP3xUNUEz+N/N/XtgVoR17RlQthM4+fuL1cBCvOERqdLdg\nX0joHhzgkABgrV5+WgC0MO7H4BejmBijwgczPGxuRyxiEllDCooY5GM5i5nD\nR+Po4sFNxKRpoU4y1c0Z5p1oqEiD7e98u36reZ0v5e0Jpm0FPyHyuX6fvrWi\nd5xMM0TJxxbufIXZes8c2KfECJ4z0+/aH1vw4k01xWMQBJfVlPMhh6bXF/Ks\nEHilC8A4NpOG19sY2TW2JhK/wiyhIIqkQbksTpR7gUwSDE713sRzBYS9v/I2\nrH1P\r\n=etjb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCkt9lu/raFEE/WVqGNb4oVaRdhpMhZDRYo8r1pJGwcdAIhAIEaK1KVOc0msZDn79d3kQ6erM8jD5xOZYGtkPPUsf6d"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-e372bb2a9e9c1debfe7238c041d9e3c8b5f267c9_1591674739502_0.2674936519879627"},"_hasShrinkwrap":false},"0.0.0-632bdd3c2bacf96caa23da9fb21a46aba45d8f1b":{"name":"type-route","version":"0.0.0-632bdd3c2bacf96caa23da9fb21a46aba45d8f1b","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"@types/history":"^4.7.2","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/querystringify":"^2.0.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","jest":"^24.5.0","parcel-bundler":"^1.12.4","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.9.5"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"rm -rf ./lib && tsc","lint":"echo \"TODO\"","unit-test":"jest","integration-test":"echo \"TODO\""},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"632bdd3c2bacf96caa23da9fb21a46aba45d8f1b","_id":"type-route@0.0.0-632bdd3c2bacf96caa23da9fb21a46aba45d8f1b","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-VqtfQAKIAcg8RvOvv2V1RY3IixjU2Sh982pKFsPDNDd9jOWao500RWSrhlV/PkD0aC7GpPcuCcDpLCrnVDmdBg==","shasum":"ef6e16dde4eafd8c031a6885df6d98d9d827519f","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-632bdd3c2bacf96caa23da9fb21a46aba45d8f1b.tgz","fileCount":34,"unpackedSize":70959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe333RCRA9TVsSAnZWagAAkjQP/2aF24yixEYjpyFZtK7i\nRy+PtYfsKdd/cE8lUHL+uoQvU1l7E1OmWL19ULqmwJEMvqpfWcc8tXjsDIY7\naGkeDgSfsYo37op+aeRxBkj3url5OV2gJ2Mux9t6412LIYJNKboJ2mPiSX+N\nSD7xRUKPTiKXQ2t6Hf0Sj72PyWgrUA3prssanxEO6WHUKHGudzUjltH9JhWa\nbRQdoNOueoaYnrNmXPg1OWGoFboqzv4iC0g94lt7z67QD90nWsT9U1H9Gadt\nmOaLiMpf+H3+X3Wwwtj6GLTheHA0A4/vC2fNf6WafLW2ARSj2CYunkA/SEVc\n4KmDbePzFluRcMsQW2fwL41FqkgLH2ikr6btMXl78vjz06Ifjqv7KN76RFl8\nrID0OWcuVr7ctHuLFwZ7F1osB4H6jMhUTTh3ZkIzrNumBpw2luYkNkfJgbf/\nfpWssIdfBH9wsPIoyKbHwlXzqds7+kdqF3DuyhCQiSNfJLs6/vjdIS+mYLQW\nSh9l1pAG5rKqw6/44Mpp2FPBj5gERW+QiV2YvtSBCqGxNIfx3XtDPIww8SgZ\nkYaTFJO2K6R8XllyuiCeSAd2xthAUNSKLOSGLvl3fmRyBR5QNO34bpB/J0kq\nqsgg4IkPXBDwzrse6fLYqhnU78B/ISOuVu6MTHLGk5wAK3hmCAoKkkZ73Axa\nWaCh\r\n=aqnJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCGWlyXMer7Hm+MYnY/crFkvXQEeeW0un1jlj/mKMO0WAIhAOdjTPhT/NLQg7vxxzmvI8mqbDXjjBEo0wQVPmpaAeMk"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-632bdd3c2bacf96caa23da9fb21a46aba45d8f1b_1591705041253_0.5752802188331751"},"_hasShrinkwrap":false},"0.3.7":{"name":"type-route","version":"0.3.7","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"@types/history":"^4.7.2","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/querystringify":"^2.0.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","jest":"^24.5.0","parcel-bundler":"^1.12.4","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.9.5"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"rm -rf ./lib && tsc","lint":"echo \"TODO\"","unit-test":"jest","integration-test":"echo \"TODO\""},"gitHead":"632bdd3c2bacf96caa23da9fb21a46aba45d8f1b","_id":"type-route@0.3.7","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-5f0gxxL65Z0Tzlz119dyn914pt34sXEmTL+pgVUQ6DCuf1L3w2FqFqy3LVfeN6n2+7hyoOt2IREvY9yaI1PLVA==","shasum":"1882aba798d93e28b1894a413383ef8ce8def615","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.3.7.tgz","fileCount":34,"unpackedSize":70918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe338nCRA9TVsSAnZWagAAcnoP/R7OgizBHjBw+JAXAhqS\nYhoG6XEjUqronW0gRXSbVgVp/4v2xzkp8C6C+6JGZsGrgASbBaKDi2GDK17z\naUQitn9qcpotDHa+c283N/KkSWmKC3yUnWymexsPV8jTLE+jjVzW+sBOuR+l\nPelyiSlZgcuvz6Aie/3c4E86J/z4sbqXNCsYPNe7UyoczSahSq0iAitegm6b\nOnTCnoSL5/u2Au/mgkr02iOv3ONGi4/ihinjtB5cFLR/ZksMrAWAo29hZBCK\nzrMGsvwAHGQJP1BDSBFGMSXTHysy8Ed46J9oL8lYff5c/OQWUgbdkhZ+4xig\njVg8Ze95MSL8/kpNHusWctFgmzJyG7dHBfBh1wP5mt25ZTYp3Vkae9T/PRML\nbiFcL9DF9nrgcgouRpkfNPskffafCO/7Di2j/aoK2MGlHIjzN6QZJzVJW0Oc\n9+bwvd9w2gjXLt0fmlhcX3Weeyglx9+cU2oevOiWLO/ypVpGN5XdIhA8+j1w\n+btMQOZTcCFMvYYnrd5FHPGfh8UrIi84yuEhPuv7+PHEj9RMK2hHdCJxUfOX\ns6HBvXG1F/JKeqr5cNnw1VQPgwFtg6RsLbBPlEbvzTNkXb+IWfBHbD/usztQ\nsczqNmru+/6ARIDxAn7V24cVg0kXvL52VtLPZ4/1IGAgxVsgKZeWXPgEp1qQ\nOR1k\r\n=t4fC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDXea9yE/wu7+Cohg0W7Atew8gjiV2GfxvSReExLK2VBgIgDzskjX+LnZT0JUX42i80mXJClTXI7sYeRvcrkXRxe6g="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.3.7_1591705382652_0.8904184712434418"},"_hasShrinkwrap":false},"0.0.0-1bf546dbd45734592b33fced8b93492705b11b16":{"name":"type-route","version":"0.0.0-1bf546dbd45734592b33fced8b93492705b11b16","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.9.5"},"gitHead":"1bf546dbd45734592b33fced8b93492705b11b16","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/typehero/type-route\">\n    <img src=\"https://www.typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> Type Route was designed with excellent React integration in mind but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full runnable version of the below examples on the [Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) page.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n\n  useEffect(() => listen(nextRoute => setRoute(nextRoute)), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](https://typehero.org/type-route/docs/api-reference/router/session) then subscribe to route updates with [`listen`](https://typehero.org/type-route/docs/api-reference/router/listen).\n\n> New Type Route users often wonder why React components such as `<Route/>` or `<Link/>` aren't provided by the library. Read the [React Components](https://typehero.org/type-route/docs/guides/react-components) guide for more information on this topic.\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a\n        {...routes.userList({\n          page: 2\n        }).link}\n      >\n        User List Page 2\n      </a>\n      <a\n        {...routes.user({\n          userId: \"abc\"\n        }).link}\n      >\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` property and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link for a single page application. Immediately destructing `link` into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above example on the [React](https://typehero.org/type-route/docs/guides/simple-react-example) page. The \"Guides\" section of the documentation has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n---\n\n_Type Route is a [Type Hero](https://typehero.org) project._","readmeFilename":"README.md","_id":"type-route@0.0.0-1bf546dbd45734592b33fced8b93492705b11b16","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-Q80KkQkTxVHzkfmIqF3kDSBY+9COq+yODfFF4D8b8r6/9Jzn158vCXVPitUTWWakqz+qyyZeAQcSXsoYcbo7Wg==","shasum":"12926d40218f150e4e02dc386d7306a7c2ac494f","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-1bf546dbd45734592b33fced8b93492705b11b16.tgz","fileCount":46,"unpackedSize":563586,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe381WCRA9TVsSAnZWagAA78EP/iEo9k6PeNCz/bFxIr/f\n9mb9oHFFQlkqIFo3RBpi0ubqoJWaJNy/bbRVdnx3KzYZD0wq28b0UlYuLOFM\nrzf1CjVtnIXckLDmSeZ2o/W3VWsA3BR3fl2HtsT8wO38Urg4liCNBzv/0TkT\nu+bi2d2sFgTH6LzT2BwFBs5QX0GFNUfNmjLPZVdOBBswaYvNGDp5Xm4/htXr\n5J9S6pmuD1HuWr8oeGVGNiBDr/7DXUJWLSxDDrvbm2IP5gIwnf8wnAv5PW9G\nVCNT+erSXWR5JwimevDhxxBSHxMXGmVFUvlbAqTvl7PRy2ADmoCjgVRBWSSh\nHUuAf/UQUE4hHWVFvFKLVaWg815KoqOY74zxtUGaZenIxTaRN1bfr/hlq5lb\ngJlFd2KrOZOwAtwCdgF2YHe1tikTZ3NAS1lP5jCQDX2qkdCR0faZQI76IRDV\nls4R6fI+da3WVZheU+htXtuaznMZvBnAYp8ky8ulBQjVs20w4g9b62opRbaA\nn6SzQwWyUSi07mbfxPaGekABjqpYNk05Tj65+W3xQEBcurpvkHKcI9MdGeCJ\nltX7jU8dQlpfN6PK1T08P3uMxSlzL602AttvvZM05rRY56nT0n5tGxMZcntn\nGldyyKPNQYjqdL5OErhXOlQyizYs9vlWiHNqFYjrWVYnpvNrhM8HWK9ryC/q\nFWkM\r\n=8Pqh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDfqo/bJy+NxjfG6VFgwp0qLZVqHfshcWJE9gFXfCn4MwIhAN+NwVnjhLe1LscU5eK4YsHcS3UYhX9s92jnHUTtyy7w"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-1bf546dbd45734592b33fced8b93492705b11b16_1591725398325_0.6747629804708366"},"_hasShrinkwrap":false},"0.0.0-3d1843c53499a9f4d43abf2394e12037a51ec1c6":{"name":"type-route","version":"0.0.0-3d1843c53499a9f4d43abf2394e12037a51ec1c6","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.9.5"},"gitHead":"3d1843c53499a9f4d43abf2394e12037a51ec1c6","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/typehero/type-route\">\n    <img src=\"https://www.typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> Type Route was designed with excellent React integration in mind but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full runnable version of the below examples on the [Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) page.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n\n  useEffect(() => listen(nextRoute => setRoute(nextRoute)), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](https://typehero.org/type-route/docs/api-reference/router/session) then subscribe to route updates with [`listen`](https://typehero.org/type-route/docs/api-reference/router/listen).\n\n> New Type Route users often wonder why React components such as `<Route/>` or `<Link/>` aren't provided by the library. Read the [React Components](https://typehero.org/type-route/docs/guides/react-components) guide for more information on this topic.\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a\n        {...routes.userList({\n          page: 2\n        }).link}\n      >\n        User List Page 2\n      </a>\n      <a\n        {...routes.user({\n          userId: \"abc\"\n        }).link}\n      >\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` property and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link for a single page application. Immediately destructing `link` into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above example on the [React](https://typehero.org/type-route/docs/guides/simple-react-example) page. The \"Guides\" section of the documentation has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n---\n\n_Type Route is a [Type Hero](https://typehero.org) project._","readmeFilename":"README.md","_id":"type-route@0.0.0-3d1843c53499a9f4d43abf2394e12037a51ec1c6","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-Rryd464vpzKXFCdd1HPrqGgfXzMDUzpOITHravGqyYb3DrP9bsQTVPnc72nZTwIjh6+KJADQZGg/TL1trjry2w==","shasum":"75eb2d1f23933ee8403286b0644a9d93d12c4f47","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-3d1843c53499a9f4d43abf2394e12037a51ec1c6.tgz","fileCount":46,"unpackedSize":563996,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3+HfCRA9TVsSAnZWagAAmbsP/AoSHAw78a8CK6L/kmqp\nNRriGW7WcM+pn1cHEuCuyA1AaMDI/i89a1h2voLs/sWMqc3Al3fKKTLJ4l5N\nry0bJ5HyJIYvtgiYPgclfioZD1hBNGA0hUvi0/4V0alttPMkghkDEh0/SamB\nptaoqP8LvN3MwAyVjRpFsK1QVYimKMKhMIT0SEaCmbNKpo3SdX/WooGN+JwJ\n6Sfo0VyrzTPR8PzwDTS8C1BLCskN/sP1LS+ITo/vnx32u8lGrdBlJWo3cLX0\nKJFFLdDuueTOhrsAksVRchY/JmewTWwYnUJ1szKgQQT8ECXVjfu+xJRpeQ3G\ncza3Tn8ZKmPpOgdAEt2dCIy3chveI4OhiwbIYZ3jABfFU/tiY7pzNxRznYsE\nCFk0WPgTO/gsEcoiE4PSVN1f7nIRokJb3lsSWZlZEzlKeEaUtqLzxnWjxPpm\ntpkmv0lBSNu48bBhIbOJMn7IEpR/z1WbWD4WhIAAqz29UYp9W1IAJs5vvtY/\nYOUop3+f+FepJSf6ebnLNjbpAWsP2LauM3jOzLUoaGZfBdPo8c5WI7xTehJ4\niekpGccBRDzIFqwk4rDPvf4iUkxDajl6E5kqNmWSGTu7Bp88qpGfcIbMYxMT\noHon2BEnDz2LPgEYzgWxxtqqnk9CbMokhr+9rTZogn6WRmixHrYEijaG+gSt\nqxE3\r\n=jTQg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDNVOJT5nd2OMffMxyKNNlpSJLXErnrNi9YiXkKURuLDQIgZXeCS+iG0Em+upSMXfISHgFY9W+/u7Yj6BJ/tiAL5Sw="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-3d1843c53499a9f4d43abf2394e12037a51ec1c6_1591730655293_0.1947149610259793"},"_hasShrinkwrap":false},"0.0.0-e801ae201945ac88aedeff6e5615ca7639497eba":{"name":"type-route","version":"0.0.0-e801ae201945ac88aedeff6e5615ca7639497eba","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.9.5"},"gitHead":"e801ae201945ac88aedeff6e5615ca7639497eba","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/typehero/type-route\">\n    <img src=\"https://www.typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full <b>runnable</b> version of the below guide in your framework of choice on any of the following pages:\n\n[Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) · [Simple Vue Example](https://typehero.org/type-route/docs/guides/simple-vue-example) · [Simple Svelte Example](https://typehero.org/type-route/docs/guides/simple-svelte-example) · [Simple Angular Example](https://typehero.org/type-route/docs/guides/simple-angular-example)\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n\n  useEffect(() => listen(nextRoute => setRoute(nextRoute)), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](https://typehero.org/type-route/docs/api-reference/router/session) then subscribe to route updates with [`listen`](https://typehero.org/type-route/docs/api-reference/router/listen).\n\n> New Type Route users often wonder why React components such as `<Route/>` or `<Link/>` aren't provided by the library. Read the [React Components](https://typehero.org/type-route/docs/guides/react-components) guide for more information on this topic.\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a\n        {...routes.userList({\n          page: 2\n        }).link}\n      >\n        User List Page 2\n      </a>\n      <a\n        {...routes.user({\n          userId: \"abc\"\n        }).link}\n      >\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` property and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link for a single page application. Immediately destructing `link` into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more direction there is a full runnable version of the above guide on the [Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) page. The \"Guides\" section of the documentation has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n---\n\n_Type Route is a [Type Hero](https://typehero.org) project._","readmeFilename":"README.md","_id":"type-route@0.0.0-e801ae201945ac88aedeff6e5615ca7639497eba","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-r1/SsXYSXKEpzQgMB86NJg24CK0hkRt96e9dEL2YvEe1qnOMOWUlFLMhCv5vRW0rA33ac6ONA/YXPKp5U6cMVQ==","shasum":"ba831c9715bcc3bb095065f11860209c6d254250","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-e801ae201945ac88aedeff6e5615ca7639497eba.tgz","fileCount":46,"unpackedSize":564343,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3+syCRA9TVsSAnZWagAA+g4QAITDScxSCe2JU8myU69L\n8UHFwgTOQknUuocIVUXOUR4MREnIauUah3Zz/obmrJ8HsE3ro2Am86heHT1G\ndeiA9Nd5qlz3sdZWIaABhhHqdspP1umnKnqpufJg/ek42vjElBJpMMYoz8n4\n1V5N8Wc+BdzZWsZCE8pQsNRHcgy8yCS1chjBNGaSmvc4MZNZZxAO0yqmxc1n\neCm+SWfWCUPsYynVpFB1SbLOyRillzoDGsO42//oNrR6pXqAcjX3AMCqb5gR\nPkQgo3fJ3sg2WcrMey1mFfOC51bSbu4ehy6iYGDP65wWuy+0nhyl5CT25xft\n64HkSrnnHQIPZkd++ZXathqZw1rHXjaXAH9GqdBspc7J9fjUxfsKb2YhLr3g\nXkDFvBifyzQzmnBFI9bApoJmQiFtMXEP1WLTXoYF9zNq1TQVE93y/OKWsKgz\nTtTrAnGW4kUHd3ZvL/sW8WCXYM1E26RqmvuEXg4hmVsmB8TmBsmqJFdPzJom\nYvmnQPxMCGjGZM8EvzyO68rtGcWEM1ZN7nurc4VjnxN0kWF7XTDu17I0qXBX\ncWFy31q2l7smPh9LNpr0G9gnPTWKJwOHwGfDLhoKP++OCyVeHJ/BO0g0Z8KH\nBNLw/zih7h+XWWev/9Kp6CIz5Gv4lzgbBTuCeUbZIxWR+ypOsfEmlXqBJDrF\n2QGJ\r\n=00KJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC83lLJBj6GeUvYD/hgfOZm8ddCIuvXj/nQsbyKvXw+kQIgTUrYE8YnE7n8yqtZjMK70qz0qsy4uGTfL9qIXbGukwc="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-e801ae201945ac88aedeff6e5615ca7639497eba_1591733041741_0.36045368691914503"},"_hasShrinkwrap":false},"0.0.0-2b9fd4e02884bb4c82fde0d4b963e28595adbbbf":{"name":"type-route","version":"0.0.0-2b9fd4e02884bb4c82fde0d4b963e28595adbbbf","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.9.5"},"gitHead":"2b9fd4e02884bb4c82fde0d4b963e28595adbbbf","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full <b>runnable</b> version of the below guide in your framework of choice on any of the following pages:\n\n[Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) · [Simple Vue Example](https://typehero.org/type-route/docs/guides/simple-vue-example) · [Simple Svelte Example](https://typehero.org/type-route/docs/guides/simple-svelte-example) · [Simple Angular Example](https://typehero.org/type-route/docs/guides/simple-angular-example)\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n\n  useEffect(() => listen(nextRoute => setRoute(nextRoute)), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](https://typehero.org/type-route/docs/api-reference/router/session) then subscribe to route updates with [`listen`](https://typehero.org/type-route/docs/api-reference/router/listen).\n\n> New Type Route users often wonder why React components such as `<Route/>` or `<Link/>` aren't provided by the library. Read the [React Components](https://typehero.org/type-route/docs/guides/react-components) guide for more information on this topic.\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a\n        {...routes.userList({\n          page: 2\n        }).link}\n      >\n        User List Page 2\n      </a>\n      <a\n        {...routes.user({\n          userId: \"abc\"\n        }).link}\n      >\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` property and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link for a single page application. Immediately destructing `link` into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more direction there is a full runnable version of the above guide on the [Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) page. The \"Guides\" section of the documentation has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n---\n\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"200\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Hero</h1>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>","readmeFilename":"README.md","_id":"type-route@0.0.0-2b9fd4e02884bb4c82fde0d4b963e28595adbbbf","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-xKVRQIJEnMu8M8z8F0Csu1mgBUIn2a2vGD1gqnX0rYzwMGMZ0TSpT264uIsuSGxCaPZLPaX+brc4hbxbehL8Mw==","shasum":"fbbf51ff63a374973b4509dea62e80ebd54ffd37","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-2b9fd4e02884bb4c82fde0d4b963e28595adbbbf.tgz","fileCount":46,"unpackedSize":564707,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3+zcCRA9TVsSAnZWagAAWJIP/2TnmVdOLJHJCik7IyYQ\nyvZmu+lksOzru0Nf7hwKLhUQrxX890HhoH7c4VynzP20iy1e4Ldvy2P18YwF\nSGvY3jLArvBT1+PWCUj3N8iL1kA0fUSJ+6WcOq76o0+CqCf1x14Zg5W3thTO\nG6vAIrsgN4QmHon9ybYcExzQ4vaaZEhEIbbo5FgxYrFIhqIvlRxwgK8SecNL\nIaOD5HEywTs9q2NpOzd1vOFLSE6y7yPBaEwN2qHZK5Z0TDXLZUxsNRXWXWJX\nPlKEHCyrhOM1PpR2EdK7OrJUoPYwMP1zFb+CzRmnxBZHLOpFblUYV2bX2RTA\nsIFic8qzrhJQQdGMgIJEaBAZTfKo6TJovaq+7RykHno+R7/fk9m+FdXcG8Ei\n2rmRMINxMWM/V6SPZrnY9V7I1vo5lr3i54YPI9SfDRpAj3uHtu6j0T0D86mA\no+wE5uj96qEXbCnHYFM3dW0+Fsxuc4mGLUdTMc1Ty3KXraPls5Gt8jlYhdCJ\ngOCvAmlFJSWsLwpmmdoW3IHX6zyP5fDVUb9F7Vqhme1Byje/qouwegHjagy7\nzKbbxCvfVqA1QcoqsTftEJdYlzDUb0mfZh4ORmuDPcw19yChTZSHA4c80JEl\nbdlCTRzLkF58vr2oA4alPO2BPTwrVgd89SN4DxL52cV1Bcihj0+nsTjnvyX3\nZR3i\r\n=Goqy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF/ADCVW17ZiCMpY97rYPCd4c6PmPrMSyGsz6FB7UeiOAiEA7Srw23FAM0BBlx+iaKTKlZOvH9W1jP8I+vpT7ovdNbg="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-2b9fd4e02884bb4c82fde0d4b963e28595adbbbf_1591733467764_0.07791674994673059"},"_hasShrinkwrap":false},"0.0.0-cc9fcafdd9922f14bb978224bc6b5c8238f487be":{"name":"type-route","version":"0.0.0-cc9fcafdd9922f14bb978224bc6b5c8238f487be","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.9.5"},"gitHead":"cc9fcafdd9922f14bb978224bc6b5c8238f487be","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full <b>runnable</b> version of the below guide in your framework of choice on any of the following pages:\n\n[Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) · [Simple Vue Example](https://typehero.org/type-route/docs/guides/simple-vue-example) · [Simple Svelte Example](https://typehero.org/type-route/docs/guides/simple-svelte-example) · [Simple Angular Example](https://typehero.org/type-route/docs/guides/simple-angular-example)\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n\n  useEffect(() => listen(nextRoute => setRoute(nextRoute)), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](https://typehero.org/type-route/docs/api-reference/router/session) then subscribe to route updates with [`listen`](https://typehero.org/type-route/docs/api-reference/router/listen).\n\n> New Type Route users often wonder why React components such as `<Route/>` or `<Link/>` aren't provided by the library. Read the [React Components](https://typehero.org/type-route/docs/guides/react-components) guide for more information on this topic.\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a\n        {...routes.userList({\n          page: 2\n        }).link}\n      >\n        User List Page 2\n      </a>\n      <a\n        {...routes.user({\n          userId: \"abc\"\n        }).link}\n      >\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` property and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link for a single page application. Immediately destructing `link` into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more direction there is a full runnable version of the above guide on the [Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) page. The \"Guides\" section of the documentation has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n---\n\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"200\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Hero</h1>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>","readmeFilename":"README.md","_id":"type-route@0.0.0-cc9fcafdd9922f14bb978224bc6b5c8238f487be","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-x2+1lCvDp7XEKtjePvnEbo6Wkbb7em4VICJEilm4qSBS79Aj8QBLOez+o0ObKj/6l0n4KC4LW6atCUikav2f0g==","shasum":"6116c7ae509fd864974c40fb56df6a2e41e99d8d","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-cc9fcafdd9922f14bb978224bc6b5c8238f487be.tgz","fileCount":46,"unpackedSize":564588,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3+zjCRA9TVsSAnZWagAAe3UP/j/gs4zlWTBYIxzb82ad\n4GWcQ1/zFGUGYnbQoOL0h36d0sqhkzSqnYqFlB07uDGWqZbBR2WwyL0KhEko\nPTjA0HDbmUnidimxu12i+5dQK1ekoHK9X2dNBAdfLFTCBJAfRz1SPinMIh/F\nItg87zt6JsTN4CdXMBn5VgYtdCHfqbXkHHTlWkD6D8gO7T6HErccW1Z01QOO\njPhtRPzuXwi/5XCIe9f4SvYpB+BJM2YBEYI3YG5FLbnglODm5EGYtqkA/J8c\nzOHUxBYJ2UScC4qhyA93XGFCTNTqkhypNby3/rfWXNUipUyfJF0cTvaCTvji\nJ/QrYp/JHv1jdC4J0pmODGnV3/89/Mlcl91KNTQ5cJinWAOmelxQvT+2B3Rm\nPZ+V2varINbiEvY8YGMxmXZmZ81hLEnpUc+EMX/xM80VcKCDpTAYtdFdOhMh\nChLfRyiBqVUQ9086ZLDqUbf1pw/GO7ztUvjv2hIYL9sQVNYcrLpwHWYZK7cC\nTT9HAGrzmtmYBsA3sWXhzxYsaTzJvZYEXrD52PXJ4mTt834wF9Dwjt6u5Qdg\nPC1V4MRRnXhLqnKoM8kUx4miitG9YXfek192H3+LiRXOlFA0VcMVevqkoDde\nzGB3wwJ/JtAMhig00F3QjMnJPxwzkwWIwJ/b2Sc0sTPT1DuC9FqNrAR3gIo6\ndr7W\r\n=jauX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDGDwgDvQYUJr3+igbhmflJ3fjlqQyEEC/9obQpbOUnAAiEAmWVbwIUaZgaMWidtIkGUUMIUGlRknUQaLtp8UZpzIFI="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-cc9fcafdd9922f14bb978224bc6b5c8238f487be_1591733475007_0.004918362741010096"},"_hasShrinkwrap":false},"0.0.0-582c4d8670c5e02e781572143da0cddb3960662b":{"name":"type-route","version":"0.0.0-582c4d8670c5e02e781572143da0cddb3960662b","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.9.5"},"gitHead":"582c4d8670c5e02e781572143da0cddb3960662b","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full <b>runnable</b> version of the below guide in your framework of choice on any of the following pages:\n\n[Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) · [Simple Vue Example](https://typehero.org/type-route/docs/guides/simple-vue-example) · [Simple Svelte Example](https://typehero.org/type-route/docs/guides/simple-svelte-example) · [Simple Angular Example](https://typehero.org/type-route/docs/guides/simple-angular-example)\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n\n  useEffect(() => listen(nextRoute => setRoute(nextRoute)), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](https://typehero.org/type-route/docs/api-reference/router/session) then subscribe to route updates with [`listen`](https://typehero.org/type-route/docs/api-reference/router/listen).\n\n> New Type Route users often wonder why React components such as `<Route/>` or `<Link/>` aren't provided by the library. Read the [React Components](https://typehero.org/type-route/docs/guides/react-components) guide for more information on this topic.\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a\n        {...routes.userList({\n          page: 2\n        }).link}\n      >\n        User List Page 2\n      </a>\n      <a\n        {...routes.user({\n          userId: \"abc\"\n        }).link}\n      >\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` property and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link for a single page application. Immediately destructing `link` into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more direction there is a full runnable version of the above guide on the [Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) page. The \"Guides\" section of the documentation has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"250\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<br/>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>","readmeFilename":"README.md","_id":"type-route@0.0.0-582c4d8670c5e02e781572143da0cddb3960662b","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-OXDCmnA+bkIaB0rlU8pz+U3ywACOETvxoCX/8sux1t9rl8Z0l6NIEmddjM6Tq/CzNVNGWU2YBF2nogoMSDNiUQ==","shasum":"fd5c3d1eb8d9169713e5adf833eeceffe9bed9a1","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-582c4d8670c5e02e781572143da0cddb3960662b.tgz","fileCount":46,"unpackedSize":564543,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3+1MCRA9TVsSAnZWagAATiQP/jt82Ebfx1zK06eiIHr0\nfLuUrToaUkzP0b/bGG1toYqn4L2tBbc78i9mG6A1t+SCv1LVWP/yyh6eV9lq\nSLRisrVXgNqTPBaim78PwhMfS78I2A11qlZXcGW/qUdWhPN2osoZrvakfKpQ\nJst8mxsoA9O/ABgY8Rj+Xf6Z/uUy+WTy9/eazYIh6QRP3wE4+92y0+8MaP26\nh3LQYgs2XGJ0VoZObpHZHgR7qbV3tw7zMim4XvZ6O1JEW1FeBoMevaY9ZHdw\nQitHsx0XcZmpDzREUoDIomWKa1qbgtk9ncV9RDh8LZyVyM786YhPEg5sK/Sg\nrl+dJVAFo4lWzpJUbs+rioCHKcRieS7eKhnS696O+K5rr8mwo5Nh66Ucr2u8\nLr2Ipm1EwCaOkFs5GG9vbbr0U6iPSHdHSA/oJltj5NVtwUj+Fpa+EHx8/KK9\nP4ouBHt0zG2m+idN9Rz/MLnGBZTiBQyLVD5F9r2rFKnPyXhbDptGIVGVhFs4\nB4kuKaYoqDnErNi1HglqqEEGhlvmvmKHjEm3ppv3+GQQsaBF6zvbHyw3p3Qb\nFAHtjCSpE7uwgNRbgsLadUuw+CpIJA0m5mJhy567Nc7rgCpVepMVoeCsatfx\nNOyIfkoSFsKHSAD7YgJiVxpRuL88PMM4FROTlDbnbLweaheydjzGA9ZXWsMC\nNVJK\r\n=K/V+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHAGMWC9nqVJosqdGwfxUDvDvPBOSOe2Z/T2FwdwHKF7AiBG1ryaCyE2E6vN4iQQaMqlRkNz9q53RVVYYaZQHUx2uQ=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-582c4d8670c5e02e781572143da0cddb3960662b_1591733580011_0.16999815096874316"},"_hasShrinkwrap":false},"0.0.0-f9876a92219144ba305504968012966040cc3ac8":{"name":"type-route","version":"0.0.0-f9876a92219144ba305504968012966040cc3ac8","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.9.5"},"gitHead":"f9876a92219144ba305504968012966040cc3ac8","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full <b>runnable</b> version of the below guide in your framework of choice on any of the following pages:\n\n[Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) · [Simple Vue Example](https://typehero.org/type-route/docs/guides/simple-vue-example) · [Simple Svelte Example](https://typehero.org/type-route/docs/guides/simple-svelte-example) · [Simple Angular Example](https://typehero.org/type-route/docs/guides/simple-angular-example)\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n\n  useEffect(() => listen(nextRoute => setRoute(nextRoute)), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](https://typehero.org/type-route/docs/api-reference/router/session) then subscribe to route updates with [`listen`](https://typehero.org/type-route/docs/api-reference/router/listen).\n\n> New Type Route users often wonder why React components such as `<Route/>` or `<Link/>` aren't provided by the library. Read the [React Components](https://typehero.org/type-route/docs/guides/react-components) guide for more information on this topic.\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a\n        {...routes.userList({\n          page: 2\n        }).link}\n      >\n        User List Page 2\n      </a>\n      <a\n        {...routes.user({\n          userId: \"abc\"\n        }).link}\n      >\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` property and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link for a single page application. Immediately destructing `link` into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more direction there is a full runnable version of the above guide on the [Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) page. The \"Guides\" section of the documentation has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<br/>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","_id":"type-route@0.0.0-f9876a92219144ba305504968012966040cc3ac8","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-mOnXy27QPIwo9XJ7Nja+Q86hM+tdw8Yf9r5JQ5I0WURwxZ9zwiYC0CrYsOI33jlKf23+QBpeSQ0hLtWmeZr+8A==","shasum":"8da2e47914dabee057ff0ca8259d7d1b0aae69e2","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-f9876a92219144ba305504968012966040cc3ac8.tgz","fileCount":46,"unpackedSize":564567,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3+2uCRA9TVsSAnZWagAAoJEP/2Roz28MYuBr2q4VHlSL\n81Ws7xGJWmt/R0GiBC+t4DV9VOlp/rltD9MytbNdjmb0+8Nqw4+I2LMbFOaa\nkkDPTzp2tDaPNJ1mZG+9F1ERSk1H1Cg2o2gYwJWdbWEDPHFXhvKd1G+lvYAu\ngQ9tuZLzr6hHDZvTPtCzqpUti3hLO8cBHh/kcwtBDYtP1sntZUX0vKiUC8XJ\n/+oCRew0CRTZgKSRBjjnqEH8TJR0rfwda+q6ybeFIlUP17lsZX+7lYsUjurF\nJ0g0ekJaU+4lt/jSMvX3ueT1PExgs6UtMuqsxyqMtKzDrP4DdGR5Et0YUjqo\nIhsTNtV2mcssFiribV7xj7Gq4yoSoxP2zQU+8VgyspZCGtxKMf6ZOjEHTOR5\nxw+CG8phVUl4FD1J49u2UbLNVP56/59Bw1Y8szkQt6iBjndOlC/GSw7OZcDT\nXBby+aBGoC+u7w/0O7w/iM5wKjlv6Wlb8pl12krF9QEGZoF5XgEKVXvij3kn\n5IdvbjM9jRW7C+0IbO3It7wf5BaZbunFcJNvI1+/+5N0NbvsZG735Nmoy4yQ\ncRF7EbH2yPLXsrunoITQjm14H2Py9i6QCuV0tJ4kzPWyFrrfTXPW5Am5HKKS\nhkpJKNTlrdYQqajHR94vzFb3wT1lH46DZ9h7hwItS7EiwRQ/EgUcspaAzdOk\njEil\r\n=NKiS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE3Gb1Bn9nIRp5VhRs1i3Dn9TSL0yxG3I9JYt/waFeakAiEAxf+G9S4RhJyzQLqRLTlZrfLbelOJ0Qd8BLwf4upfS0A="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-f9876a92219144ba305504968012966040cc3ac8_1591733678423_0.703011289426017"},"_hasShrinkwrap":false},"0.0.0-27f1e06d5d5c88f140c213efbe5eae06db01c1b5":{"name":"type-route","version":"0.0.0-27f1e06d5d5c88f140c213efbe5eae06db01c1b5","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.9.5"},"gitHead":"27f1e06d5d5c88f140c213efbe5eae06db01c1b5","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full <b>runnable</b> version of the below guide in your framework of choice on any of the following pages:\n\n[Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) · [Simple Vue Example](https://typehero.org/type-route/docs/guides/simple-vue-example) · [Simple Svelte Example](https://typehero.org/type-route/docs/guides/simple-svelte-example) · [Simple Angular Example](https://typehero.org/type-route/docs/guides/simple-angular-example)\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n\n  useEffect(() => listen(nextRoute => setRoute(nextRoute)), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](https://typehero.org/type-route/docs/api-reference/router/session) then subscribe to route updates with [`listen`](https://typehero.org/type-route/docs/api-reference/router/listen).\n\n> New Type Route users often wonder why React components such as `<Route/>` or `<Link/>` aren't provided by the library. Read the [React Components](https://typehero.org/type-route/docs/guides/react-components) guide for more information on this topic.\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a\n        {...routes.userList({\n          page: 2\n        }).link}\n      >\n        User List Page 2\n      </a>\n      <a\n        {...routes.user({\n          userId: \"abc\"\n        }).link}\n      >\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` property and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link for a single page application. Immediately destructing `link` into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more direction there is a full runnable version of the above guide on the [Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) page. The \"Guides\" section of the documentation has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","_id":"type-route@0.0.0-27f1e06d5d5c88f140c213efbe5eae06db01c1b5","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-bQR46QGiee5xnvyCX2Wgsn2MGjXIxegBf+h4yPP01gySNxaSVDcIcIcr8RT/pc9DbMZvB4FMkhGeC909neLOHQ==","shasum":"1954bba32095f4938a50831ef8685a1dedd506c9","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-27f1e06d5d5c88f140c213efbe5eae06db01c1b5.tgz","fileCount":46,"unpackedSize":564555,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3+5YCRA9TVsSAnZWagAA+mIP/jydG46f4TM8yYfsq5Dz\n9DQfaQdJZmbf0SM4KStJ0XqD0C10aXfH5axWRR4+rssd+gN+cLaumc77JJ/F\nGhFNu5cNPCzTdcA8bqmy0eFJ2Ee4s0moVBLDs5rU1XRiIpA9KMnrwU8uL4pQ\nDJoe6www9LBf6GeHUwW0ztNo/0o/PGk7eBOtqHKP6tWs7TeKrKXYTGXevLSP\nOznTOd162VF6j+oggZG4ZfrZi5hPdLl24w3xttMYJp521lJMnmcXmRVY8rTe\nhUJ0d+loDWN3ZVAVn+8q8hbntmbXfEGI1BR1+RtqPymorpYDGy9UoHGDoY2I\n2LjuZh1+CGaVYubBqdcksL8VfcUi1zHt8UI0aqwK1UnUyC6vVVc0Pdop/pUf\nDolDxJSIuJ+iAcfe7k+jfBcqowNzrHbwoyjWADfJhHiRkK5QnMCWdfZ7qN9J\neBSuZMPh00O+1HNCl0TYO1j1bLXWgrdCTHa1OKHkEfUJCK9hmggSbg5bhdzy\nEXyZqc80F4yVJG0RQzFebYUiw15ajuAbpXGPNqkXf0Iyn+HQd2LQ9ERSYSn5\nl9t+UisjiYaxOF7NRWAclxH0WBK1wRMbzbxUx39FDYSKhyfDddACgpLyTu2q\nYl6tY4ZVS3vRNHwCGtCHjqMJTRdpyfJjjxn5r1+RwzSbjP4aKENgx4gEaw4K\nnZhM\r\n=5PjF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDnLAmF0YVZs9UbmDxKzO5n6PLRtzDfELrWa/3jZauaugIhAIqxCRzLncntYUaHjge3QRKk9Gwu0DAGjfkqcPwUflsg"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-27f1e06d5d5c88f140c213efbe5eae06db01c1b5_1591733847720_0.7290356494549537"},"_hasShrinkwrap":false},"0.0.0-e8a496e93158e39111a4271c345d1c1111236ee4":{"name":"type-route","version":"0.0.0-e8a496e93158e39111a4271c345d1c1111236ee4","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^4.10.1"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","prepare":"npm run build"},"devDependencies":{"@types/history":"^4.7.5","@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^1.11.2","typescript":"^3.9.5"},"gitHead":"e8a496e93158e39111a4271c345d1c1111236ee4","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full <b>runnable</b> version of the below guide in your framework of choice on any of the following pages:\n\n[Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) · [Simple Vue Example](https://typehero.org/type-route/docs/guides/simple-vue-example) · [Simple Svelte Example](https://typehero.org/type-route/docs/guides/simple-svelte-example) · [Simple Angular Example](https://typehero.org/type-route/docs/guides/simple-angular-example)\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n\n  useEffect(() => listen(nextRoute => setRoute(nextRoute)), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](https://typehero.org/type-route/docs/api-reference/router/session) then subscribe to route updates with [`listen`](https://typehero.org/type-route/docs/api-reference/router/listen).\n\n> New Type Route users often wonder why React components such as `<Route/>` or `<Link/>` aren't provided by the library. Read the [React Components](https://typehero.org/type-route/docs/guides/react-components) guide for more information on this topic.\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a\n        {...routes.userList({\n          page: 2\n        }).link}\n      >\n        User List Page 2\n      </a>\n      <a\n        {...routes.user({\n          userId: \"abc\"\n        }).link}\n      >\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` property and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link for a single page application. Immediately destructing `link` into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more direction there is a full runnable version of the above guide on the [Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) page. The \"Guides\" section of the documentation has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","_id":"type-route@0.0.0-e8a496e93158e39111a4271c345d1c1111236ee4","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-pQvxC9phgVKOEKYo2otDEmgxvcOrkwgLm2aTOOpvnVlARO4qXQNs/SFa7HBxBDfMxqrtjf7VMqj+15yTPo5rww==","shasum":"ad1edb53fd86a809d6223102c5439b7cbbadc858","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-e8a496e93158e39111a4271c345d1c1111236ee4.tgz","fileCount":46,"unpackedSize":564561,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe3+7ZCRA9TVsSAnZWagAA3HoP/ijw4xJ9abfKYVNMkMkI\nE2H592uVst6MKcteMXrBQAfhXjEYHbFgO8P5RsI9qr8UCzyDYmbv7ipQEFCb\n4lj6Lzo8uukrRN+Vo6puMkR/euXBd8v7+z6TcYFkWo5oSasJpr3FHJmJII0D\nCXO3k8/Xxy2QzToE6STbAn9ig1Cj+6arxx1FAnPtW0Ow66YrA9SJoJG815rM\nBLnzDa7abk35SWObuUlbfbRaqyaZNh4PLAyvXFknp05RsAm1KS3h2wYraA6K\nmotd1CWqoUsTXCJYtmGmHApm9chc9BavAl+QyOeGZZV0CjTtTbLR3yPabspz\nqqznYLoEu/B6ZdC3gtWdJuc2pSvukP/6Mmv7t4HdOC3+8sv3k9Vh39fYQcFz\n+mp6nsDbjyIJkVeLUu2B7slKVGJeJ36E8RR831aF/jSyRXHnmuroyXACsSkC\nrc78l5KEsQjPR+9HK7G26MlShc5y1LLB48CFA805h0OlF5OgEZgr8VCTieaY\n5KsO+cSp0uaStggn/xGqtpIBqubcZA4MDt9/EZsk6JJkZhtoeusWwO4V7Kjr\naNmaXd/pxjEmsvmhKFE7R0VApiIaZ8nbdORbpsgaiHrV74im5MJvbBgTdrsd\n4EJDi8VXftlBSbfSJqbBSpS5dAh6K2/03NmfFFIcQejU0ircT6NfcmWM8YBv\nP91n\r\n=b0Nd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEZY17nXYHsk8L1G5/2dmSnX2/wTcbMiZ0F/9xpo7ed2AiEA4dBZ6iYhwEWzOSc+Y9KgEeNQjYufjwj4mFIaoTosT+I="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-e8a496e93158e39111a4271c345d1c1111236ee4_1591733977302_0.8713401444895661"},"_hasShrinkwrap":false},"0.0.0-72156324d09c61f11edfc39d449887a576e215ff":{"name":"type-route","version":"0.0.0-72156324d09c61f11edfc39d449887a576e215ff","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"@types/history":"^4.7.2","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/querystringify":"^2.0.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","jest":"^24.5.0","parcel-bundler":"^1.12.4","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.9.5"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"rm -rf ./lib && tsc","lint":"echo \"TODO\"","unit-test":"jest","integration-test":"echo \"TODO\""},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"72156324d09c61f11edfc39d449887a576e215ff","_id":"type-route@0.0.0-72156324d09c61f11edfc39d449887a576e215ff","_nodeVersion":"12.18.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-4fcP6loHDhPDtTXoKYzZbp5LR44dRCILIRb1qLDh6fxiNwbOv1M9wrPsHQ48nz54IZToBRenknLqv7mOtBoBZg==","shasum":"709872362709bc7ea39364f86bdb38b603f963ba","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-72156324d09c61f11edfc39d449887a576e215ff.tgz","fileCount":34,"unpackedSize":70959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe5YyXCRA9TVsSAnZWagAACIkP/0A8875R9TAFRvgA7Q+v\nuyIXEFQGXtzirYa78eowCxRvtg4yXEAajCP1MzO3hiGqp73Rj+4YSHNS6eJD\ncC4uUfSzrMj851MRsVE3PXvTPN01anr/ChmKCCSVMawbtN8Gzc7pBA7Vnt/F\n3idsNJnQI1B0Ksxdpi4P3l+i13jqX29M51tT/nkk4dU2dHBGr/BDlSHrs0+E\nnGWhjupNmRLkwjrS80KqWqqg7BERYDFpBZwAUiqzsbZY7D4p+SesP1Gk+WU3\nUW6V93PomW6Zr9pVQVCp0hxpmAC7Pe2ON14prgeBOhJCSg+TRS3uUkRpqrFy\nur0Qcyh5mBH+7R5+ebmxt3LCHeGIo4ZwOH6yWkW49E4/Ktlqu90RT3YwZXWn\n8SAkRTDuAvJDyhkb2vrNe1PeUiwqMhjQ4cydDoIzS6IjUEy7rTQrbYB8ddY3\nHnR//WJK8lSsvzmPnW4BDiHKVnO9NkcgbdmD+awTnYqZAdAA1G3+dCa7d1/R\n8fIudtUsoVxLrd8TLxj6pjcuWGYLhtJBIcBhXcwe28UdpItAP9XaQECYKaGb\nij9bbiVU8iG+gkqBN0f3Sqd1HYIg/F4pBOrLMYwVbR9qs2BWyjetkp/YYS9G\njHANuy1NdlMy8+UFjuA09tecBvR5dTz2SAY9/tF5V/S3TH4Q34qjMLiTZky+\nvrDO\r\n=/4ST\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDt4GgV/WH2teW6uhFhaQ5/euy/MXXLQOozYsk+jW5QdgIhAJvERK4sxOTGm3OtQyHXaMGMmVIRtQbM4DJAZPiAH/OT"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-72156324d09c61f11edfc39d449887a576e215ff_1592102038643_0.5597287168441745"},"_hasShrinkwrap":false},"0.0.0-fecfaf9bc2c28c4679aaf8729a0e3f4b939578c0":{"name":"type-route","version":"0.0.0-fecfaf9bc2c28c4679aaf8729a0e3f4b939578c0","main":"./lib/index.js","types":"./lib/index.d.ts","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/type-route/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/type-route/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.org","dependencies":{"@types/history":"^4.7.2","history":"^4.9.0","querystringify":"^2.1.1"},"devDependencies":{"@types/jest":"^24.0.11","@types/querystringify":"^2.0.0","@types/react":"16.8.8","@types/react-dom":"16.8.2","jest":"^24.5.0","parcel-bundler":"^1.12.4","react":"^16.8.4","react-dom":"^16.8.4","ts-jest":"^24.0.0","typescript":"^3.9.5"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"playground":"parcel ./src/playground.html","build":"rm -rf ./lib && tsc","lint":"echo \"TODO\"","unit-test":"jest","integration-test":"echo \"TODO\""},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://github.com/type-route/type-route\">\n    <img src=\"https://www.type-route.org/img/logo.svg\" width=\"200\" alt=\"type-route\"/>\n  </a>\n</p>\n<br/>\n<br/>\n\n## Type Route\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. **Find out more at [type-route.org](https://type-route.org).**\n","readmeFilename":"README.md","gitHead":"fecfaf9bc2c28c4679aaf8729a0e3f4b939578c0","_id":"type-route@0.0.0-fecfaf9bc2c28c4679aaf8729a0e3f4b939578c0","_nodeVersion":"12.18.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-vnWcIv7ZbMjBk74xnz47vpvXCZhdzoTYUyyjSvqBIjLZgn6CJqKPeug31sz/GPEza0X8O3BO8wPK+WKiBl9Lfw==","shasum":"6a431a2b51f3f44cef7fdfb4ce8ef21e157ef1bf","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-fecfaf9bc2c28c4679aaf8729a0e3f4b939578c0.tgz","fileCount":34,"unpackedSize":70959,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe5Y4vCRA9TVsSAnZWagAAmRUP/12lvtS1YnQpICoBoPyp\nOvJKJAoFlNeSndLJATHJaU7TxCCBrKIKDrTwqPqOJkQmwbMclxvp8UOZZlvX\nJwo9ifv6QRQmvBx+kWtx/ATP0pKVzRFUuoTiOrQi9vfN+sRh0jIzoszlQNio\nRcPoiWcpQbHiyluk/MaVtVOso9D2zyQjqMJ1yfF7FujiKqJLkqQJG8cT6heY\nugUDCESv/a0tXKAwj95pwii1UKOMx+bMzdxz29sBR1Z4tiZXOu9+xeIrhq5Q\ne2jSY4aQ2w0HKNrh33BCMCZI+hV4nVV9v400vb3+2uTRSRgoLjpVrWya2321\nnGnjwxYG53jM5lwMXbWgbRpjbZ3Lz5wb6AlVQThMTDG/aczUDb1gi+BqY29A\n7A5z6BOm4rLKeg8OwAQ4v/pH8f0/Hde/oDGbQeiXCahNQk7QilXsNJkJwxaW\neDgFYzl6KrIiKMlSewHIlBiFrbDMICzm8ZF7riH0tNZfkrLPJKJSXHVRy72l\nwZiB7D6WXTphT26DTEv84ecBx85pxNrGThLb/WVG5NM4JnNsxWdIppPWfFlI\nz0Zi/+kYqjV+UDui1z3VNN8LUeR2QhBvLGbIiunqVJQXuoRe8Zw0vRQ0IS3l\nPTO/pGreIa9ZdqNozHPHyx2mDhGMIYSaNCDuiQgsOdZerZ6AitzuI1f3QV1g\nwyLk\r\n=hqbu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQ6aaymWpIL6smHK887iH84YnaAYxfiahJUFhru+R1pgIhAPY6dAzSf/AdhpAxIgEkxddZ5mk2RfISmmmiv/7Z4Nqa"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-fecfaf9bc2c28c4679aaf8729a0e3f4b939578c0_1592102447596_0.4608849177631915"},"_hasShrinkwrap":false},"0.0.0-3b5379ac89cdb090b3035648713a13db3c84d67b":{"name":"type-route","version":"0.0.0-3b5379ac89cdb090b3035648713a13db3c84d67b","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n> ## @next\n>\n> These are the docs for the `@next` release which includes some major differences from the current release. Go to [type-route.org](https://www.type-route.org) to view the docs for the current release.\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full <b>runnable</b> version of the below guide in your framework of choice on any of the following pages:\n\n[Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) · [Simple Vue Example](https://typehero.org/type-route/docs/guides/simple-vue-example) · [Simple Svelte Example](https://typehero.org/type-route/docs/guides/simple-svelte-example) · [Simple Angular Example](https://typehero.org/type-route/docs/guides/simple-angular-example)\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route@next\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx {7-8}\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n  useEffect(() => listen(setRoute), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](https://typehero.org/type-route/docs/api-reference/router/session) then subscribe to route updates with [`listen`](https://typehero.org/type-route/docs/api-reference/router/listen).\n\n> New Type Route users often wonder why React components such as `<Route/>` or `<Link/>` aren't provided by the library. Read the [React Components](https://typehero.org/type-route/docs/guides/react-components) guide for more information on this topic.\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` property and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link for a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more direction there is a full runnable version of the above guide on the [Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) page. The \"Guides\" section of the documentation has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"3b5379ac89cdb090b3035648713a13db3c84d67b","_id":"type-route@0.0.0-3b5379ac89cdb090b3035648713a13db3c84d67b","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-rwyraoBKVOIgnvKaw0dZeSDna+1Vuzop5wlNJFkIBrlzgmoQI89gDZC3gTbecOLb7xBeARcbYoi6UWI0HANnBQ==","shasum":"8aadb9d3c0b14d69993ba62b1a388c0b9a0b5fdc","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-3b5379ac89cdb090b3035648713a13db3c84d67b.tgz","fileCount":44,"unpackedSize":576884,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6CC7CRA9TVsSAnZWagAAEBgP/R+izKYFq42HCFzAL233\nZmEOFWCat2a0FXeO/8EnMTypwmtSMRg4mAgOlj7VGDs8ToUnrTTEF5XWFdsl\nqrPvQS6pHFwRsEMJz1yAArvUyUE8CWr3EN4lT4SdwIG6KKi5DV43EGTfz+tj\nW7wo5n8DJ944IETPrejbQsj6ia4pKUCq9pITIeEV1fc/E6TJtaXwviu63FWi\nFjxURMj1HxcS+hWnGhtYC0Hb3wGNJmv2y5HJrS7+qHJMRYtYV0swHCFFbDVl\nMKPV952WqofhWV/HHiZoynFmpzJYRkM8pB+SX4f6No9p0jRXMtoRcl3drXw4\n9CFjejdskNv38TCJ/jyGnADj8k66nvRBQVWzDGVsA9C7gYZ8Ism3ArOlo1/E\njmPIFYK1TilTqD5Z6RPgNh334rHl1GIWPFX0wzUhitt+QFlj/XlCKDPuKV7k\nNPXw6kww3iLGwV49xoLR7CuqyxKB4JVb2TSqRV0T7aQBv7n4O4EmvZVdQaTV\nkH2zQrjE6J2nhpXSHe1opWd09azGHjazWa0TuBzbdVLNMUqTzU/CL7Z+bS2w\nY9zZ++T1WN0FPs1t6QxkEgaAV+QD3tklPRa5Cozh4vXvTFvVwgoxcpa7es8a\nd4ygVopFxTav1Ii2aqcfOtvS3j0/BBxRLherMO/DxVl/X7/rrp8ygTn7iT1M\nPQEt\r\n=j9i+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCxFNn814PHdno22vKJwPlXeQVzsbwkxq7of+7KLrAYFwIgH+U23KyUrcXe5UWRM8KxL/5kp62YfFu6h0RGCYZQ/i0="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-3b5379ac89cdb090b3035648713a13db3c84d67b_1592271034948_0.25182479863014695"},"_hasShrinkwrap":false},"0.0.0-c11016a49b96744e091a54b296f877825f4d48a2":{"name":"type-route","version":"0.0.0-c11016a49b96744e091a54b296f877825f4d48a2","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n> ## @next\n>\n> These are the docs for the `@next` release which includes some major differences from the current release. Go to [type-route.org](https://www.type-route.org) to view the docs for the current release.\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full <b>runnable</b> version of the below guide in your framework of choice on any of the following pages:\n\n[Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) · [Simple Vue Example](https://typehero.org/type-route/docs/guides/simple-vue-example) · [Simple Svelte Example](https://typehero.org/type-route/docs/guides/simple-svelte-example) · [Simple Angular Example](https://typehero.org/type-route/docs/guides/simple-angular-example)\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route@next\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx {7-8}\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n  useEffect(() => listen(setRoute), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](https://typehero.org/type-route/docs/api-reference/router/session) then subscribe to route updates with [`listen`](https://typehero.org/type-route/docs/api-reference/router/listen).\n\n> New Type Route users often wonder why React components such as `<Route/>` or `<Link/>` aren't provided by the library. Read the [React Components](https://typehero.org/type-route/docs/guides/react-components) guide for more information on this topic.\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` property and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link for a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more direction there is a full runnable version of the above guide on the [Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) page. The \"Guides\" section of the documentation has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"c11016a49b96744e091a54b296f877825f4d48a2","_id":"type-route@0.0.0-c11016a49b96744e091a54b296f877825f4d48a2","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-y1Sfw2dyaehSugjZsPARuQynaKo4WUr35rCL9D7tSMs+ci2ghXnfpuHDkB5c4KQqNfU9w3CvFu0sDL2FgzCwQQ==","shasum":"9b09908c0e61009c4845a2f11385ffcc65dbdeee","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-c11016a49b96744e091a54b296f877825f4d48a2.tgz","fileCount":44,"unpackedSize":576884,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6CJ/CRA9TVsSAnZWagAASBMQAIqh74Htl5m54SUVd72F\nyRvCFtNt/BWbT+ks0zS3MIdbtpa09cvuJEr7qhfC8g9EttlKzN3YQBKssOs5\njQ5heXqF2YxO+/h5MbXzGEa7lUjqIiT5RQHFIVvIvbgrrcoKiwOhlNKPAyNm\nn/4oR+KMc/8g4u2VUMR2slvmHq9gGYHzeS8vsiEYRLwQi9WHgp9KwP8Q2q+K\nsaTi539rUfaNKuB3Z4t65/2zwwFEiD4ICDtQUOo/e7g4uBISr0SdIafC4a8/\nLdcO/1RLOhsAqWUA0B/lkzQUPZvoyoY5oYnMajSLadYo0WmygDhtG6PBt3lK\n/w+zDr34TbAGZ5Wy6yW3cYT+TUtXkinmIQ7bmLvdG5ygZiNiqMzuHWZo0ntY\nX41azj1BphZHJkuN3K3ZOlgVpM0vXT5zcL7vuG8/WsT/2kYRPaxtYTVvWPRf\nBRbWCVPautINTqe2UurLPIKX2VzsOh9CtbuMf+c2fpSg089UR0Df6FUIOYoq\nuY4U502rAsTIhMeMYHpzS7xItR44hLtWRPbINkEtAhhAeD61M8TaBo81gm+p\n3Kt2ypRXJcQ/zmt1WzVm5ddxhEj/xBch7jFCIUKHKCU8abEWueC+0avOCHQY\nXO8izw8LjCtJgo1Ll6V3vkRC10d6wauTnlGExVXzuJEQ7mIIRj0q++iO5vxr\n/suz\r\n=PqgT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHyz1Abr6WbHQ61VjPfZSGC4fQqfSSqwY94uDf3/QKWUAiEA1W+0pZCOKb8uEiGrONwHMGOYuo53E7u9ryDhG3xvqr4="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-c11016a49b96744e091a54b296f877825f4d48a2_1592271487172_0.37890324678437803"},"_hasShrinkwrap":false},"0.0.0-6ddd6a0c0b724b97edab9862ad737257fb1ee67a":{"name":"type-route","version":"0.0.0-6ddd6a0c0b724b97edab9862ad737257fb1ee67a","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n> ## @next\n>\n> These are the docs for the `@next` release which includes some major differences from the current release. Go to [type-route.org](https://www.type-route.org) to view the docs for the current release.\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full <b>runnable</b> version of the below guide in your framework of choice on any of the following pages:\n\n[Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) · [Simple Vue Example](https://typehero.org/type-route/docs/guides/simple-vue-example) · [Simple Svelte Example](https://typehero.org/type-route/docs/guides/simple-svelte-example) · [Simple Angular Example](https://typehero.org/type-route/docs/guides/simple-angular-example)\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route@next\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx {7-8}\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n  useEffect(() => listen(setRoute), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](https://typehero.org/type-route/docs/api-reference/router/session) then subscribe to route updates with [`listen`](https://typehero.org/type-route/docs/api-reference/router/listen).\n\n> New Type Route users often wonder why React components such as `<Route/>` or `<Link/>` aren't provided by the library. Read the [React Components](https://typehero.org/type-route/docs/guides/react-components) guide for more information on this topic.\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` property and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link for a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more direction there is a full runnable version of the above guide on the [Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) page. The \"Guides\" section of the documentation has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"6ddd6a0c0b724b97edab9862ad737257fb1ee67a","_id":"type-route@0.0.0-6ddd6a0c0b724b97edab9862ad737257fb1ee67a","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-affYp9cBno6PnrLWfAPCOUAFgz/OTOdXMi5TioHW3dNehUq1uSf18nUhbCGoZ+a4HdDNiZ9gC6e6IjLZZSYDoQ==","shasum":"4a86bba4f8521746cd123fdad99eb6e22ca83316","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-6ddd6a0c0b724b97edab9862ad737257fb1ee67a.tgz","fileCount":44,"unpackedSize":576884,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6CRXCRA9TVsSAnZWagAAfI4P/R5S8wYxde1NJwokWCk+\nYaUAwOyv5XibGY07miV6J/AR6nBmHEYS/R0Y6vdf87hu24i8VQY9Rn9d2DLI\nv2t2JewyNtLFiQNzieCKEgE4TUNOckonj+m2FLD7ckuHfHJ3IKjVjUjRzShy\nGEGLPJBjd9BW0Z8k38hNPEzrjtsPjvwHiiIBXEKnXXG47pBikF/ykuBMTtYw\nTnMhQpsGTKMs8acBXabHEBYmicG9Z5itEVQoXpJ/grG+MQLLdhPQawzZGFEK\nkFCBeZ87kcdXq7E7BFg6Z3Uq6c7JQS384bx3qpTmBN3St2KRJW16RG6yefbm\narzLUdAqjYdyE8kCwQQtpY1UDyB3U3RBs2IB7KhRFOjrYPBp/PVvUtiJf3ty\nN3BQXxbWRGsaKsuYjDgTWbJnqSoajvzaK2O87iT0BJ5+nhTr04ZP8zs1KM+J\nSoK1LKORX9zXx03TTjtS4nHy5qYbKKkyK7zDC+scob9jO/uu9AS21mFBsWlx\nDA9LQjYXnPh5bE7ibTOZZNzz8bCuXa7Xf1AyuaX+jYdHNcq1IUKaKSX4/WHQ\n+G3hQEY/VNSrMOtt4y0KhkjNk8octoGM7RKWCP7OctLtx0FwXsMv3+2rYrU2\nM9czLCQXbdXV2Bb+fEY007I91nU21xJGD7bPI4pjOl7YNo8EgC+7UqhvkR5y\nYJIj\r\n=J1pu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICmsIQgJ8gHzGnGvtJFsTAx5hrYf5Z0YNpfcRwt8LL8nAiEA+kruwuokubv0jn6BIGctVQWLfAPiWRI6C/u56iXa6Ew="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-6ddd6a0c0b724b97edab9862ad737257fb1ee67a_1592271959585_0.6046314450375367"},"_hasShrinkwrap":false},"0.0.0-d6caa8f04915101e48ecf15d767e04522fbb3443":{"name":"type-route","version":"0.0.0-d6caa8f04915101e48ecf15d767e04522fbb3443","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"gitHead":"d6caa8f04915101e48ecf15d767e04522fbb3443","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n> ## @next\n>\n> These are the docs for the `@next` release which includes some major differences from the current release. Go to [type-route.org](https://www.type-route.org) to view the docs for the current release.\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full <b>runnable</b> version of the below guide in your framework of choice on any of the following pages:\n\n[Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) · [Simple Vue Example](https://typehero.org/type-route/docs/guides/simple-vue-example) · [Simple Svelte Example](https://typehero.org/type-route/docs/guides/simple-svelte-example) · [Simple Angular Example](https://typehero.org/type-route/docs/guides/simple-angular-example)\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route@next\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx {7-8}\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n  useEffect(() => listen(setRoute), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](https://typehero.org/type-route/docs/api-reference/router/session) then subscribe to route updates with [`listen`](https://typehero.org/type-route/docs/api-reference/router/listen).\n\n> New Type Route users often wonder why React components such as `<Route/>` or `<Link/>` aren't provided by the library. Read the [React Components](https://typehero.org/type-route/docs/guides/react-components) guide for more information on this topic.\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` property and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link for a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more direction there is a full runnable version of the above guide on the [Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) page. The \"Guides\" section of the documentation has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","_id":"type-route@0.0.0-d6caa8f04915101e48ecf15d767e04522fbb3443","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-VEsBKPEcQgDELloYgnw7naIu4SPGldLf7Z4g9AooqW3M4UD75q9Wijc3oZwifj3GFlRaKhTM+Weprm/vv/3H+A==","shasum":"910b63e7d97e90a0dfd50971a2df65a19e1fa8d3","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-d6caa8f04915101e48ecf15d767e04522fbb3443.tgz","fileCount":44,"unpackedSize":576884,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6CRsCRA9TVsSAnZWagAA7m8QAJClWB6OqlOQvEDcK6c6\nAzdSOYmTpKQdDbyQowE0SmasbWtcdGc5SdifLVaSNeX/K4bT2Kpt60vUd4IU\nJNkUfpbnNTKJDCzjvApMnobFosmmM0zdltHhgbXfoHELWGob3Ex3QCf7FD4g\n8IJjHFqOsOXmUmWIZeOyS+kXegvsP5HTA1CiBEROCwVGfpXEue0JLQGcQcTC\n53jYvD6mT6VOgBDHdg+6Jtt5GtOIil3IXrpOmy/heEhfL0Mm1Jum/gbHtBZn\nC/3NMYY7x2YMK8V60AdsMgUdy93SigNAFPGbEVQztR1rpCXOI2YqvUmEVJQG\ngfpc9Tswj5xfVZT0acLBmOZ+V6hpEVTWEgtuAPmgJ8k5K4JdS7xjmEW9hyMi\nUu6g/GdN9IKqGfCTegshd2PGBJjUzS8+ylhabjCBsYnoehOyk7oFaJvhy/WZ\nbK9Edah3sUNqbmON4LYOnm/BUcZe8DhL+WqsFZcJcGfhw9HfnOmNTVGEZoJi\nhpzZ3jMlhPzOKDgGGTMkMh/khAx4aD0hAjM0eAGAmjdnjmbhMfK/FyFPGGjX\nugu+ZFpnU2MV8t9jcGITesOuX4kHwonKf6rcXNP3galhb0hR0X7gX2RUIqtR\nsP1yLAqCHd0N+EDQ9P73WL498dniVk90/keVUt+FUBHgFWmneBoqCqtKe3iL\nVxo/\r\n=vruc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCjI3/iu/p6+4stuIfFbPdU6R9MyeyMyh237InLSdZCoAIhAPjXo6q4fgcMfWj2GC28GkoY64H2cG5iZ0hHYakfoplK"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-d6caa8f04915101e48ecf15d767e04522fbb3443_1592271980400_0.8989863037847794"},"_hasShrinkwrap":false},"0.0.0-d4e9637e05fbcb9d5ed353b06819f8d01396f814":{"name":"type-route","version":"0.0.0-d4e9637e05fbcb9d5ed353b06819f8d01396f814","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n> ## @next\n>\n> These are the docs for the `@next` release which includes some major differences from the current release. Go to [type-route.org](https://www.type-route.org) to view the docs for the current release.\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full <b>runnable</b> version of the below guide in your framework of choice on any of the following pages:\n\n[Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) · [Simple Vue Example](https://typehero.org/type-route/docs/guides/simple-vue-example) · [Simple Svelte Example](https://typehero.org/type-route/docs/guides/simple-svelte-example) · [Simple Angular Example](https://typehero.org/type-route/docs/guides/simple-angular-example)\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route@next\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx {7-8}\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n  useEffect(() => listen(setRoute), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](https://typehero.org/type-route/docs/api-reference/router/session) then subscribe to route updates with [`listen`](https://typehero.org/type-route/docs/api-reference/router/listen).\n\n> New Type Route users often wonder why React components such as `<Route/>` or `<Link/>` aren't provided by the library. Read the [React Components](https://typehero.org/type-route/docs/guides/react-components) guide for more information on this topic.\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` property and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link for a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more direction there is a full runnable version of the above guide on the [Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) page. The \"Guides\" section of the documentation has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"d4e9637e05fbcb9d5ed353b06819f8d01396f814","_id":"type-route@0.0.0-d4e9637e05fbcb9d5ed353b06819f8d01396f814","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-p+rG/OPdOzfxHNBb1OLE9oXWPGTs4Is7jh+a4bHtSbVirEVhNMYjK5tUXXtnnWkk4Sju8P/A8ausKH3rgqfqow==","shasum":"d4386e8a7b2e5a9c4b7da82bdf440b22f1e5e0f4","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-d4e9637e05fbcb9d5ed353b06819f8d01396f814.tgz","fileCount":44,"unpackedSize":576884,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6CT4CRA9TVsSAnZWagAAYhEQAIhDoGv8f/8JK/kIQW4J\nTfLBY4jWVWns4wCoYCCWjP/QYVyhZ3GuHFWmqg1zB4zh0e/l14g0kTLxbCnz\nI02Lhjalv7sV2jWr1tws2bljIOZqv2MXhoyoeUwMWtg67btGeQs5rUnDPQXA\noGn9xT6OtXTjMZOZEHYjcBwOYJ9rSJxgtQiYfvdmJeJzK53TJDoOTVEiuoCS\nzkBN62TEFNkYPP5e765FP+KKmvIPwarZKCS2qwFPRWcPPbMGsJsXXoPBPStL\n8oxmQChUFtcTe2FMu5upAhSCwJajcuDEZPe4otTcJ7R+1oNcxlRU8PMyRcM7\n14U1massw7CpXtP9DrgWqoYkrhyaBoVeYdgg9AX8dX0I7HxmS08sd65KSf9w\nFQk68hPlgCW7NG4E6VdE1Cls28GG044JahHHkaOPm4mGQpkGP918Jxxu2lzt\ngUwAJyerFBSxMrYa7tjnESq4wrzooFtH0WXhDLiib8N079r6WcEEKi9uMYLP\nx46ktxKF1HYnedEvehXzytflrDKIomEeC+nFw0r6lUE8baEyILl/x+u2OlG/\nQUDKkqdjX/LWNpW2yy5fP+kHXKNt+0uY0H6JYXUD8xmLRMzqCBQigkwXvkUg\nqa7JB0hfBCUGwP+Tyy3/j8SRL6ckf09G7vbdoULjZmQrHpOcoWaUYuo0DMJY\n0oEv\r\n=XHsV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBrMRVdHpeTbKNLtCA+I14n9+Pb9T2gxa8eIulLDFNK0AiB3rlD0AWoznvA/fZn3fs9DRfDM8Wq/HurDRoxkwnsr3Q=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-d4e9637e05fbcb9d5ed353b06819f8d01396f814_1592272119691_0.8410181535416492"},"_hasShrinkwrap":false},"0.0.0-6c6b62a374aa9138f66f44db791c8b0c4f25b42f":{"name":"type-route","version":"0.0.0-6c6b62a374aa9138f66f44db791c8b0c4f25b42f","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"gitHead":"6c6b62a374aa9138f66f44db791c8b0c4f25b42f","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n> ## @next\n>\n> These are the docs for the `@next` release which includes some major differences from the current release. Go to [type-route.org](https://www.type-route.org) to view the docs for the current release.\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full <b>runnable</b> version of the below guide in your framework of choice on any of the following pages:\n\n[Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) · [Simple Vue Example](https://typehero.org/type-route/docs/guides/simple-vue-example) · [Simple Svelte Example](https://typehero.org/type-route/docs/guides/simple-svelte-example) · [Simple Angular Example](https://typehero.org/type-route/docs/guides/simple-angular-example)\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route@next\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx {7-8}\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n  useEffect(() => listen(setRoute), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](https://typehero.org/type-route/docs/api-reference/router/session) then subscribe to route updates with [`listen`](https://typehero.org/type-route/docs/api-reference/router/listen).\n\n> New Type Route users often wonder why React components such as `<Route/>` or `<Link/>` aren't provided by the library. Read the [React Components](https://typehero.org/type-route/docs/guides/react-components) guide for more information on this topic.\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` property and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link for a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more direction there is a full runnable version of the above guide on the [Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) page. The \"Guides\" section of the documentation has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","_id":"type-route@0.0.0-6c6b62a374aa9138f66f44db791c8b0c4f25b42f","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-UfFh5IEm9z4uqsjTLps8bb2maKUGKKTkZNiPMn4zlhUAekq5WaIBwj7DIXOtyKIkWFy3UILzV1xADjgeLednDA==","shasum":"24c9c37968b2f757112b7652fa9349e818b3cd0d","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-6c6b62a374aa9138f66f44db791c8b0c4f25b42f.tgz","fileCount":44,"unpackedSize":576884,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6CUHCRA9TVsSAnZWagAApSoP/3kOh1X50kQzPILl2cPs\ng4ywnlu1EQbjLl+UsJHbSRSaozYC+7SbBo6d48UYWVitQE3YE9CVdhIEMCRL\nWxrc1ihBmppT4rQokAcmDU4JU/Hgk/qDNzvNKpkYNLEyTxbM3SNECg7Sba3j\n0VeyXAn9RgFlX4UJiyB7ck4vCe0BPNz4KNXnuquK8ExsHqyTVC/riAAlO19l\nxtTPfvJy14uWX+g/yZ4SeFBnyUBYp0PRUf9joYxKGaxbCLvQxxfF+ZtHY4lU\nae4K/aej9flGpiaVT6RyYDpZEqAoPfb3gpERnHUsW5dKxx9ox6wYg+seEy/t\nvbSkYprpCgZ8sOqgptLgNLuHjWLsIsIEcwElitFlbhAbUsSpzsPYG64jy0JK\nMfSOjjbIP3RQPwD7AgOq5x67SBlZPqEAwPL2S1jpekpY7mARNJiynH+T4758\nMHkY6MajeXW/yUPhEmwQEAfY5EfmxywyTaeX/4CGCT6ZKMl1YliLsAyn8C25\nDZWO7+3MtUf5pLoAC4ykg0nfxrYKou98TFK5KJJdyITPUOSJQszWuESno+W7\nn6AWx4J9P5smywmOd74knP+/eW/YMmZy2TzcWTdJO24YcQZnjrypmYI/iuq0\nr8WxECN1Dy4yRygKTaB/HrSk9C3PgAGmHU8FeXB1p+wJqzy44waLH6MxwW91\ncQLW\r\n=QJO1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDBrSsilawjoBbW+gbHKBS2iCMIhUkH7vBS9Ra/Hxqz/QIhAK8W9M3V/+ylG9iW/VZORQmWzK19B9oqVJfxn7mAmU9S"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-6c6b62a374aa9138f66f44db791c8b0c4f25b42f_1592272135409_0.33284867576422394"},"_hasShrinkwrap":false},"0.0.0-f6c6130f90cd593a8e434ae426df342990eea9e0":{"name":"type-route","version":"0.0.0-f6c6130f90cd593a8e434ae426df342990eea9e0","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"gitHead":"f6c6130f90cd593a8e434ae426df342990eea9e0","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n> ## @next\n>\n> These are the docs for the `@next` release which includes some major differences from the current release. Go to [type-route.org](https://www.type-route.org) to view the docs for the current release.\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full <b>runnable</b> version of the below guide in your framework of choice on any of the following pages:\n\n[Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) · [Simple Vue Example](https://typehero.org/type-route/docs/guides/simple-vue-example) · [Simple Svelte Example](https://typehero.org/type-route/docs/guides/simple-svelte-example) · [Simple Angular Example](https://typehero.org/type-route/docs/guides/simple-angular-example)\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route@next\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx {7-8}\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n  useEffect(() => listen(setRoute), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](https://typehero.org/type-route/docs/api-reference/router/session) then subscribe to route updates with [`listen`](https://typehero.org/type-route/docs/api-reference/router/listen).\n\n> New Type Route users often wonder why React components such as `<Route/>` or `<Link/>` aren't provided by the library. Read the [React Components](https://typehero.org/type-route/docs/guides/react-components) guide for more information on this topic.\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` property and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link for a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more direction there is a full runnable version of the above guide on the [Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) page. The \"Guides\" section of the documentation has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","_id":"type-route@0.0.0-f6c6130f90cd593a8e434ae426df342990eea9e0","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-+L58B4UBR9qNk6pJcRq+zj1CKgSqMq6AYqudKuQVreA2wGYYw1IEegVbZ02t5M71xDnjFJkDVLpO3z/hVwZwhg==","shasum":"0d34ad623e24c28706a7673206ef419e24844b8d","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-f6c6130f90cd593a8e434ae426df342990eea9e0.tgz","fileCount":44,"unpackedSize":576874,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6Mz/CRA9TVsSAnZWagAARuUP/iOafn/Ri783I/79FYCD\nSzo34mgTN3qLhGawuoEnqiafpp6UZOWhJDL6FsNF3GOOaTg792MJE0ej7qAt\ntJFPyfR3lEf2Nl0V2kGIdx0vacJ0yHsnSvxqFw2CHgj/DNVlbafBKC2GxAvO\n1iR6a2z+M6xSFvvgjyR2p/7LtN6mh3F+wXakPHl4qX9QClybcY1BXBdgRf9D\n6eCxHYHaBgMWVbQpXUSUEEz89gB5WDTxy13AJmPGT160qZ6QtAKBGIbWfEuj\nFDyI1DmAVIGX41T9VUoTUXp7NOqAcDD4Uyuv29FFvMpJioBrXDKMKqKKxRkI\nMpalDeb9XIQ5W7ky1XqgyeiVY3EBW2ABSqgAnAd4pRLRYWJESNVvgxhthyVR\ngO2wrTOkuk+LZvig2fwLfYADtZSQxjQbET4Zcb/Ldl0RysKfJ9nHMw4HVAiK\nlrGHpKJ1MRNGIN7EZTy16GIm3DW+/1REaoCnQU8blkT9VQA3J03WoLqeRkxH\nP09dQRO93Y9vvCymy+QyodzHK6/917oF0kZF3L+0UWGeiU9vZDkaBCjAkt5T\n5lZv54qzzN8XFYzSsPAeGBMMnJ01NH+EbHeDi9Fr5gd/8bRKgV6O7/COcsDo\nvslnKSS3QNziAiLo1fXu6icbzb5cYNaDyWDcSYWuk//sD5HgRxQLNs2EJRz3\nxlpO\r\n=Pwk+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAzxw41/iHIpd27pG8NwZXPjG81HOHu7XzzvNgMBySciAiEA7kJ/MAvLPMqu3X6xpeD8ytzKw8ZAU8Ma+7nFe+Cbj1Q="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-f6c6130f90cd593a8e434ae426df342990eea9e0_1592315135287_0.9339990915068206"},"_hasShrinkwrap":false},"0.0.0-b8e4efa5b7a3158a396f3b26d4719b00b74ebadb":{"name":"type-route","version":"0.0.0-b8e4efa5b7a3158a396f3b26d4719b00b74ebadb","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n> ## @next\n>\n> These are the docs for the `@next` release which includes some major differences from the current release. Go to [type-route.org](https://www.type-route.org) to view the docs for the current release.\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full <b>runnable</b> version of the below guide in your framework of choice on any of the following pages:\n\n[Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) · [Simple Vue Example](https://typehero.org/type-route/docs/guides/simple-vue-example) · [Simple Svelte Example](https://typehero.org/type-route/docs/guides/simple-svelte-example) · [Simple Angular Example](https://typehero.org/type-route/docs/guides/simple-angular-example)\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route@next\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx {7-8}\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n  useEffect(() => listen(setRoute), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](https://typehero.org/type-route/docs/api-reference/router/session) then subscribe to route updates with [`listen`](https://typehero.org/type-route/docs/api-reference/router/listen).\n\n> New Type Route users often wonder why React components such as `<Route/>` or `<Link/>` aren't provided by the library. Read the [React Components](https://typehero.org/type-route/docs/guides/react-components) guide for more information on this topic.\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` property and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link for a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more direction there is a full runnable version of the above guide on the [Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) page. The \"Guides\" section of the documentation has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"b8e4efa5b7a3158a396f3b26d4719b00b74ebadb","_id":"type-route@0.0.0-b8e4efa5b7a3158a396f3b26d4719b00b74ebadb","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-ujyvWNF710KmFLbtuc8pPAHinCu4+RI7398i6OpsEWgf6SUoSY6cMjGo5rSBtRfoKWxa47HuinfcxWj9T3a3EQ==","shasum":"5f50131a80f461f5c5982d9871418120e6d3ae80","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-b8e4efa5b7a3158a396f3b26d4719b00b74ebadb.tgz","fileCount":44,"unpackedSize":576874,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6M0OCRA9TVsSAnZWagAAx/YP/15IlU4zSx2q3s5KRgJw\nCMjcnWCTjfRWeGG5XRU6tOvGC6n/w45EJEMthp5+fiEa9BamDQrxgRwOV3Um\nPlIUhqwTwrjMb6Eqy9DZDPC1g3dqEuiRPv6+Gs669NEUCkJ4/iOIzPzH4fVQ\nyPlOfVwnrbenHysEkbqT58cSFZBEXnEgUcToWAakkqN4W9AjK4S8pyR4mDrV\n1CyYVsXUxjapCtHS4yhjZ6KcD99kEmY9RJWmQ2ShDNDLhR8dO7GjHwm0UpMS\nATvxZDFl74rhdvy0ChIvZzb8qwh+qbONbJmHR2kSt4X4NI0a5y4ynkQMZ8vW\nRhFv+NLM2bNjyhUee6PlOLSgl73jkqXafTIuAoGoRdIGUrMjbASEedbAm9Ic\n3qPu8NpXR3MX2+ilTUWfInyw1S8DFMXlubYTfk11PEoIVM/hRisozy7QKNCg\nk/5UqWt4K9b0pdRV7BOYATl+vK7Zj3mufPuzQYEY30kZbL4PpV3FKs2P6dE4\nsvnPWZwuyLQIBVgdNnNaerdUAN7WH3E+2DCoooiwokgW1c2nzQEWOHVm+ZFP\nKWeje8G4HxglbyflWR+F1HQQp/Dwwjv/R+n9LVqWaOBHWSvHDbLm2CK+kWsS\n4btals3q8cMQrT/0gpm8tHK1V/A/uWIMxRwBblX8423IJohf4M+ua+t9T3bw\nm9FG\r\n=iB80\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDFDI/Rb/htl+2vdCDCeBio9FbSuMTxS84soR0kkFDGDAIhAIBekx+j9NaM+96cAflgu8Wr6eTG4KS4btL6IMWyabQl"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-b8e4efa5b7a3158a396f3b26d4719b00b74ebadb_1592315150359_0.4327839947262233"},"_hasShrinkwrap":false},"0.0.0-953635c84e2bb1e4b518c8d56d455a7bf80ea23d":{"name":"type-route","version":"0.0.0-953635c84e2bb1e4b518c8d56d455a7bf80ea23d","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n> ## @next\n>\n> These are the docs for the `@next` release which includes some major differences from the current release. Go to [type-route.org](https://www.type-route.org) to view the docs for the current release.\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full <b>runnable</b> version of the below guide in your framework of choice on any of the following pages:\n\n[Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) · [Simple Vue Example](https://typehero.org/type-route/docs/guides/simple-vue-example) · [Simple Svelte Example](https://typehero.org/type-route/docs/guides/simple-svelte-example) · [Simple Angular Example](https://typehero.org/type-route/docs/guides/simple-angular-example)\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route@next\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx {7-8}\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n  useEffect(() => listen(setRoute), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](https://typehero.org/type-route/docs/api-reference/router/session) then subscribe to route updates with [`listen`](https://typehero.org/type-route/docs/api-reference/router/listen).\n\n> New Type Route users often wonder why React components such as `<Route/>` or `<Link/>` aren't provided by the library. Read the [React Components](https://typehero.org/type-route/docs/guides/react-components) guide for more information on this topic.\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` property and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link for a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more direction there is a full runnable version of the above guide on the [Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) page. The \"Guides\" section of the documentation has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"953635c84e2bb1e4b518c8d56d455a7bf80ea23d","_id":"type-route@0.0.0-953635c84e2bb1e4b518c8d56d455a7bf80ea23d","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-8PvGB+7m/4Qu6k/1DvLZhOrozSIQJRcDmRZIFyJS/8hiRWc6CoFm+iDZZ2NvWkOtfCU4ltvYNc3A4P4s9ak9cQ==","shasum":"edfdd1666aebd9898c0d000ac5a518ff5bf444f6","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-953635c84e2bb1e4b518c8d56d455a7bf80ea23d.tgz","fileCount":44,"unpackedSize":577224,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6WgtCRA9TVsSAnZWagAAXzIP/i5WvojkzhJW0wiaeGHP\n6zYEunXx7jrrTipppPEFyoh93HYdewdIUCuCtpuensnjZfjIO8+n5ChOJk4W\nc7Vstm3jzRb2X/T7nbjyG8o+VccfIy1VHeskMT/Xo3q7IP94W6CjpS5ppCeO\n5CDCXBNj+AIXWwIy6XbStjJO8h9M/k8LwqY2+ClzY9mrFbm/wYQkA9nXgDMM\nc+pF9Di8AT3W6EH9G9rYXsmBhnl60j0UD5eHRMMDNnmto5mD7sQvD7vuB4TR\nVcD0qmlubA68SnQG/aYOaXZEQSzL66s2W1TnP0Mf2FSi9msJn3YmsXoXByCQ\nXa1YIO1CDTMx78zPbcOY0DXcTNCfbIm8ex53ATCb7jFz4cNu1csw3jZV3bKx\n4SZqeNNDTKLVHkVriJlJcfu1OiNnz1PsGDYsufX+03otZSI5Xr0c30SvdPID\n6Duj2f9EiwEegqDb1htGK1teSh9CfQxLxCVvummUkABiT3tfqrBO0Tv20ulN\n5QlCgA/MuLfQ5XBG7peFcqc3crN2+6bPagqpstHy2UsFCe6ifwsJOh40/P4j\nbuJp47w8vE3CPWf6cnmb9wphin+/fUtUNYycgtygUnJe1uC3vGSpI1M3+K+R\n2Aq9CMBZdQ+rI5c76OJ1Knh70IMwKM2J2Gpv17NPCDCxetz1So4mcKLz11nu\ntq0m\r\n=G4kW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDzgxJI9fMKEdN+g7RIacEoBc7geaeNMopzXacSvMGY6AiEA4Pp3l6pmVSuYP74M97TOFVxki1iSihKVmmcFrdhPN1c="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-953635c84e2bb1e4b518c8d56d455a7bf80ea23d_1592354860986_0.05717117617465939"},"_hasShrinkwrap":false},"0.0.0-2301155b822f6d7ad443d49af4efc77d1abef7c5":{"name":"type-route","version":"0.0.0-2301155b822f6d7ad443d49af4efc77d1abef7c5","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"gitHead":"2301155b822f6d7ad443d49af4efc77d1abef7c5","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n> ## @next\n>\n> These are the docs for the `@next` release which includes some major differences from the current release. Go to [type-route.org](https://www.type-route.org) to view the docs for the current release.\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full <b>runnable</b> version of the below guide in your framework of choice on any of the following pages:\n\n[Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) · [Simple Vue Example](https://typehero.org/type-route/docs/guides/simple-vue-example) · [Simple Svelte Example](https://typehero.org/type-route/docs/guides/simple-svelte-example) · [Simple Angular Example](https://typehero.org/type-route/docs/guides/simple-angular-example)\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route@next\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx {7-8}\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n  useEffect(() => listen(setRoute), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](https://typehero.org/type-route/docs/api-reference/router/session) then subscribe to route updates with [`listen`](https://typehero.org/type-route/docs/api-reference/router/listen).\n\n> New Type Route users often wonder why React components such as `<Route/>` or `<Link/>` aren't provided by the library. Read the [React Components](https://typehero.org/type-route/docs/guides/react-components) guide for more information on this topic.\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` property and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link for a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more direction there is a full runnable version of the above guide on the [Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) page. The \"Guides\" section of the documentation has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","_id":"type-route@0.0.0-2301155b822f6d7ad443d49af4efc77d1abef7c5","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-Y1AvC3MHteiUwpJpPNFFnOvYycVENPQaHL3GApZy6oBGFrCp4KiWov+DMv0bL4u5A9tRtoxIam41WE1EEsw2jA==","shasum":"d58a469f11da8e42c3f3c29d97bf54094016c89e","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-2301155b822f6d7ad443d49af4efc77d1abef7c5.tgz","fileCount":44,"unpackedSize":577224,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6WgzCRA9TVsSAnZWagAATU0P/3DI5Hxf+4nlvnUg1fFn\nAd384iNcM2HCnKTfOxlov1tlPuGl2JocjTNJGvl+JocNMRhpYmRBy+B33BzI\nc51L0yypD+j5ULMUDVpoTChyF3o54Dz/Y+qDmnUGR1bfmTWFliXSNSGLQwxm\n+0lZVbDIFjh6k5r2/6V6ValcBgb74U7yjV6lcnWCSHDRXnj3lUOpQAQywfWS\nBYJap1RsfDpz+MVJdoyxUc8lHa5mAVZIJJBtMSvHmceiRjueD2WshOF4uCRB\nzevlfv9I+wcIWg1bM72VRQY2phmtswbJQGZZAzY4MLJurt6L8sZX+Ert0YMC\njxRxHqKIKmRfw0vqgOL2gRfJWbfa9EIn94plVgQBp1IKzIp+G8chpP20kybE\nyuFWdqBJgeUmfBiMK9fiwvQ0LT7+5UzyZVnpzk01R0njchubMi3SnDvPFuDi\nclSQcDO7Eei0es8nPioD0KLLVYVDotLug4cf+9ehJ9YDlstxzbL193EXx5+U\nH5ySQabNyN8ZAQzBXgkeG8rgppkXWaiuM0VN1Hf2EvQXvm/Rm+OswbX8Di/v\npJ7K9PNiMPV+Eu00n4vjqrclHIYtLWwzQmiDPgopWu8S9/zB6dmcKs9vAY9g\nr3wv5XILE8VxqGxCz2cSqBoFwTnZXRWyddPffzI47TAvCJayw7UZnGgv1ybu\nJpYe\r\n=nNah\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF9aZy5vtstuHVZPcTvOf9mmHhbg/0IU4fcRdXbSjD3YAiEAsNLOx0hQk7HX++cMlreiG1/6KhPyckA84rYtxoKEV0Q="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-2301155b822f6d7ad443d49af4efc77d1abef7c5_1592354867014_0.34354214104057523"},"_hasShrinkwrap":false},"0.0.0-6b734b73ec2c1382427b91e0fb4dc1adfe002783":{"name":"type-route","version":"0.0.0-6b734b73ec2c1382427b91e0fb4dc1adfe002783","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"gitHead":"6b734b73ec2c1382427b91e0fb4dc1adfe002783","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n> ## @next\n>\n> These are the docs for the `@next` release which includes some major differences from the current release. Go to [type-route.org](https://www.type-route.org) to view the docs for the current release.\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full <b>runnable</b> version of the below guide in your framework of choice on any of the following pages:\n\n[Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) · [Simple Vue Example](https://typehero.org/type-route/docs/guides/simple-vue-example) · [Simple Svelte Example](https://typehero.org/type-route/docs/guides/simple-svelte-example) · [Simple Angular Example](https://typehero.org/type-route/docs/guides/simple-angular-example)\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route@next\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx {7-8}\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n  useEffect(() => listen(setRoute), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](https://typehero.org/type-route/docs/api-reference/router/session) then subscribe to route updates with [`listen`](https://typehero.org/type-route/docs/api-reference/router/listen).\n\n> New Type Route users often wonder why React components such as `<Route/>` or `<Link/>` aren't provided by the library. Read the [React Components](https://typehero.org/type-route/docs/guides/react-components) guide for more information on this topic.\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` property and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link for a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more direction there is a full runnable version of the above guide on the [Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) page. The \"Guides\" section of the documentation has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","_id":"type-route@0.0.0-6b734b73ec2c1382427b91e0fb4dc1adfe002783","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-ezHQpMI1PEkTm2Q+/pZiCsz4EKsvh0UPfWuq4SQflN5hLd1Ewgr8Ud69O0pDGxUibl0nTRsG/vkjuLsIjpjXow==","shasum":"f9834e1a00388188940e0bdfdcc3fbd43530a9da","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-6b734b73ec2c1382427b91e0fb4dc1adfe002783.tgz","fileCount":44,"unpackedSize":578946,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6XkzCRA9TVsSAnZWagAAIpgQAIaO3Tl/bft8nHhWAGi8\nFqBpXI6XU496dMQZ5btLo8kv/5OGka55GEakyL8rF/OZVal7CgpwUDhtV4or\nMh8N5/4NDRdjwYE3xYsEk3fcEgVR0mzDXz7LV6SKdF/vnqGxoi6zzrhVTiA1\n3U7boMK12GwsClALz7pf4FC0wg3mi1+QPYJT0+0BNXkRtaEaP4UmTQU5MQ0T\nrGHWc5Yop/CZ1e9lxFG9Gcu7wxFPKHdQEBk4PPXIeW0ldV8EM3cDryvhZHmX\nhVinUSGF/SZLNQhMuexbFwegsdxIlknLBVxbLM0+cSChSwSqlTiMnuU5onS4\nicslDhmb23CKLxjIoNCyMcLVZac6Ff2ocsGX5z+Ve9WFdx+hIzav5CRaaX1r\nlrtHUxVzMk7QELnzdZcuRbV8nwogG1ePhzbcezgjUy6LB5QZw1C0msLgjlUX\nd5rBwX2X9RjWxay37F1mub4z8QHYjk4qgdWg6PLM68vV9VnTtva84Oq4brrA\nhoMdxx5ZBI8ZFqO5UDw4xNikelZCNh+aHjWj2FHtKB0oii9lzdgfNdb2HccN\niK/wXyhxAGJoyPr/Ajz3XGqwaDHk4A4WglkkylkZIIJfogXrSeT8O/YwEEdo\nHHw5/6M86KUz+ihyi6TuyoJmspD+rnkkgX/E1tCmZVfQObQ2OXLMWC2Ox7QN\nkuYG\r\n=OYa8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCqdfCSdEs3+8tBLG8x234T+7TrJgwjud8w/YcND5jeCAIgBYrIHi/u9GwWuW54E1SOL+ADgFDuH14qiPKr2kVbk5U="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-6b734b73ec2c1382427b91e0fb4dc1adfe002783_1592359218747_0.24997929127514107"},"_hasShrinkwrap":false},"0.0.0-89256a87d182206ba6e6aa4c06f9ed2ca6fccbb8":{"name":"type-route","version":"0.0.0-89256a87d182206ba6e6aa4c06f9ed2ca6fccbb8","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n> ## @next\n>\n> These are the docs for the `@next` release which includes some major differences from the current release. Go to [type-route.org](https://www.type-route.org) to view the docs for the current release.\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full <b>runnable</b> version of the below guide in your framework of choice on any of the following pages:\n\n[Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) · [Simple Vue Example](https://typehero.org/type-route/docs/guides/simple-vue-example) · [Simple Svelte Example](https://typehero.org/type-route/docs/guides/simple-svelte-example) · [Simple Angular Example](https://typehero.org/type-route/docs/guides/simple-angular-example)\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route@next\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx {7-8}\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n  useEffect(() => listen(setRoute), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](https://typehero.org/type-route/docs/api-reference/router/session) then subscribe to route updates with [`listen`](https://typehero.org/type-route/docs/api-reference/router/listen).\n\n> New Type Route users often wonder why React components such as `<Route/>` or `<Link/>` aren't provided by the library. Read the [React Components](https://typehero.org/type-route/docs/guides/react-components) guide for more information on this topic.\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` property and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link for a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more direction there is a full runnable version of the above guide on the [Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) page. The \"Guides\" section of the documentation has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"89256a87d182206ba6e6aa4c06f9ed2ca6fccbb8","_id":"type-route@0.0.0-89256a87d182206ba6e6aa4c06f9ed2ca6fccbb8","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-kmDQNVssI1BbsUkwmTCV5p3PZiwzdo4b2kmBjSo6v952LxRccB3Ga3X/MqgvGJm3nVssRj2MBpspx0b0j39jKQ==","shasum":"85e604839e0eccdc5600fa5b20d12fd0883ec901","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-89256a87d182206ba6e6aa4c06f9ed2ca6fccbb8.tgz","fileCount":44,"unpackedSize":578946,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6Xk3CRA9TVsSAnZWagAA9BAQAKN/k5QzsLA4BxPmTakN\nNtrkYl7g9oZjyYbi20l5G3YbCtpWmuqEaZ3smEDtu3Jyj2ZHhr4CwvzeDTES\nDnJdYoH1ICK4wk8RcS8FcBuk4u8r2IgU2xTl8uFdteIJx927mLxO++v6YIPC\nGBjWUl58647aapBWTiV2TqDKyt5etXosVoDQ41bTX++ejYXJf/omI2bO5+12\np3tjfuTBvZ7SFc0n2qkHnqkzcLzDh22orIhbh6+mOkkyCIIlFhQ8bgnCA/TQ\nJhXnvgXPS85KZCiJ/XkzyxchF8pv6edDulX/QbkNYslBTD531iKlhWliFRVj\nLeihRIgr1v/c5+bf8YECkLZW+WMVaq8djV6KkbRXPJAAZCbj4lglyu6aARmq\noF8EDmAnxdFyrVjoWnNwl6L8TGfTrcR1sm3sRes+PT7VxbJpUhHPbtvYS5GJ\npml0aGNrkgnXmscgDHyHwF3vQv0nbmNufSYYAuc96KBBFaC5GmxxPadrZXd6\n4amyYZKF6nK1Z/KLGxTqYxyvZav2rryzVFegU9Lihqh/yxElD9fxVFCyi5E2\n/GZqS8fAYcBGboh9tkUAHOPvxxjbrrAB+TEunG5KsHco6NfzNt2vIal8GO2S\nQ8eWJnP5AHUYOZ2TUpzV2yZag2tnnjxqqb28yKssVCyv73SVuL8r1CaNEaNZ\nfplr\r\n=cn9w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCDA8YidPk/DdMcdsz92wfqZXNWjEJdAMkCpLwGSKG28QIhAKcYDkz6iGlNlNwHk1jJG55D6oo6HdNGxw2LLkTcRzot"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-89256a87d182206ba6e6aa4c06f9ed2ca6fccbb8_1592359223209_0.2583265368326926"},"_hasShrinkwrap":false},"0.0.0-81d3a31f055d8ffad21742525f18e8324bae775e":{"name":"type-route","version":"0.0.0-81d3a31f055d8ffad21742525f18e8324bae775e","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n> ## @next\n>\n> These are the docs for the `@next` release which includes some major differences from the current release. Go to [type-route.org](https://www.type-route.org) to view the docs for the current release.\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full <b>runnable</b> version of the below guide in your framework of choice on any of the following pages:\n\n[Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) · [Simple Vue Example](https://typehero.org/type-route/docs/guides/simple-vue-example) · [Simple Svelte Example](https://typehero.org/type-route/docs/guides/simple-svelte-example) · [Simple Angular Example](https://typehero.org/type-route/docs/guides/simple-angular-example)\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route@next\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx {7-8}\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n  useEffect(() => listen(setRoute), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](https://typehero.org/type-route/docs/api-reference/router/session) then subscribe to route updates with [`listen`](https://typehero.org/type-route/docs/api-reference/router/listen).\n\n> New Type Route users often wonder why React components such as `<Route/>` or `<Link/>` aren't provided by the library. Read the [React Components](https://typehero.org/type-route/docs/guides/react-components) guide for more information on this topic.\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` property and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link for a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more direction there is a full runnable version of the above guide on the [Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) page. The \"Guides\" section of the documentation has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"81d3a31f055d8ffad21742525f18e8324bae775e","_id":"type-route@0.0.0-81d3a31f055d8ffad21742525f18e8324bae775e","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-4CzCgDjBcEhkYCt4KWShEctO5zfoNZJp185eQQ9ESgPuCiXH9IWe1pzZ29J6W/kKz+szH8L02PyxLyeZ9X4vQw==","shasum":"3d6a2c0b8dea778d53599ee23d9efeb014c51fa5","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-81d3a31f055d8ffad21742525f18e8324bae775e.tgz","fileCount":43,"unpackedSize":604933,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe7YCtCRA9TVsSAnZWagAAoFcP+QFk+5RcPXqxBIakV74M\neIBYlHUY+6koEpDp/GREQywz852rdDdnUuP88oVV1nGFou5+dqdGaxdBIeCQ\n/oiqod5rGizbYwoPZbnroYvENXSFh9eri1GEYYOmtmB/LpUKaDqJUSFFDl8s\nB3QD7CxfD6KgkoFJGMi+ufc8gQKePzs/tBwGkuPBk/dHC2uk735Uok0A0N8q\ngR5iVB/obopRPekJ8noLnogSN2m0SYDl0xnD6s7AlydKNc2DW2eAQWz6PmZO\nXVMbJ9ilJ77cg52uF6pUBU9KDDExoNoh4FXosQTMbAHozlmmKsahbJDMdk+8\nwSqepkfyKL+/Vs1j/LnXZjHOQyLgn3pfWa7tDEv76jeRFA2DkLbnpbLbAaiM\nP1wJYgbrZJ32NgKl+jz1YN5rm77TvVjEnCYwIGUaWpn/iN8qQiT8m2WYXtNV\n0+UExq8gn0F2E5X3+fPf5qDAa77BBgcBfFa2hZ6UsEwjJrDeu80VtQVDpWEi\nGizBBXqzW+YwC+2tUNkh/g0YbvVbn+qncrmHnFIuOrkQLtyNwf4xK8eA7hkO\nl1827V8EbHwWm89uEqBIv9l8ca6XuMxInSS19WThhkq0C13nVg/IIgDKr5zU\nQif1nq0SYaFkH9GCK6BM8QSFAw4XsczgexadK6F0IQgDsRIQW2VKHXlhI2Td\nNyUy\r\n=O4rU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEiU3FTl9pw23E232xrRSbJz5HB8wQEVnRBaPcvVM6tHAiBwE5uUD62aRMg6quBV67kk/essuZqXCIE/1mMPPvB0oQ=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-81d3a31f055d8ffad21742525f18e8324bae775e_1592623277039_0.21822447521506905"},"_hasShrinkwrap":false},"0.0.0-b8759b2199d709686561eae1f8f4eb0fe275c900":{"name":"type-route","version":"0.0.0-b8759b2199d709686561eae1f8f4eb0fe275c900","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"gitHead":"b8759b2199d709686561eae1f8f4eb0fe275c900","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n> ## @next\n>\n> These are the docs for the `@next` release which includes some major differences from the current release. Go to [type-route.org](https://www.type-route.org) to view the docs for the current release.\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full <b>runnable</b> version of the below guide in your framework of choice on any of the following pages:\n\n[Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) · [Simple Vue Example](https://typehero.org/type-route/docs/guides/simple-vue-example) · [Simple Svelte Example](https://typehero.org/type-route/docs/guides/simple-svelte-example) · [Simple Angular Example](https://typehero.org/type-route/docs/guides/simple-angular-example)\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route@next\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx {7-8}\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n  useEffect(() => listen(setRoute), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](https://typehero.org/type-route/docs/api-reference/router/session) then subscribe to route updates with [`listen`](https://typehero.org/type-route/docs/api-reference/router/listen).\n\n> New Type Route users often wonder why React components such as `<Route/>` or `<Link/>` aren't provided by the library. Read the [React Components](https://typehero.org/type-route/docs/guides/react-components) guide for more information on this topic.\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` property and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link for a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more direction there is a full runnable version of the above guide on the [Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) page. The \"Guides\" section of the documentation has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","_id":"type-route@0.0.0-b8759b2199d709686561eae1f8f4eb0fe275c900","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-+Ptdj/1ez7PthZAT9+D4rWdM8YLem78TnQEHpu6r7UWZejL8R04zWLMtpIPdfdrpU2heTq6nwVtSxAJz1eMjIg==","shasum":"aba0981154083597988e2178dca48242239f9cfd","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-b8759b2199d709686561eae1f8f4eb0fe275c900.tgz","fileCount":43,"unpackedSize":604933,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe7YC2CRA9TVsSAnZWagAA7KwP/33gKw2mzZRDo7pVqYOh\nOwtp+eWdEH7dsKeIAH07jhxGCdAQ+zkOttb7YtYdbzA/jy4WoKriMA/itZRi\nhVtE4FkPajxIecCOQAT/Hy9iyGwOLk5R/mbHRCElOTi06mduN0SZiHR+9tRC\ngz2pImU/5qBgS/Qp1YWfpme3TkgNJZKq63qIFyFdkDV4sBpreAv1V9uqEGep\nrBXwGzo0Oa8Ym1rA4ARestZq9vj9/ENvjinhknOsISiT7Ifeq/acZ+HhdW59\n4XzoBF3I14r8SUajl4qHy5WDy0+Qgmd3uDCOJ1sGJEi48OYnJJlirrqWucWd\nwWyaPIkJTN72zvEzoTg1RmQV3Tx/7fWa/mlZmwzL95Lbedt5w1fW29Ix3Gd/\n0fTApPX1SqCG+QYDHVOpjKkY1UTWEAEzz9bx9T6N+AaPngDWRfjZ9B84929+\nu718c8UvQrdabn5nAE17rDi+ni4TTfcxKFO1PtO3lqqjzKUUTnEZY8lKrL8e\nbblQxxwRuq7+24JXMej+EJNNk19LdLumZOXrZzpb0WS/D5wzaQKEXvYs+5e+\nn7ELT8klyG62F+L9t7Gi3vowg8MewXUJN3MdNAwrOidVbd44mIZNqKyYFElJ\nWWhA8KweFaTrTeh/vhSVmrd3i4b2Df46t30qZhz/H44n+W8e85llwZaBnE8z\nq6WE\r\n=H48Q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBZ+X0nQjwIANqdHDYtEmcFxXipHc5e+drm+CmyJexsnAiBfjGPrqpztK/41Rmy7zdKX8EcyCo/XUa0sN53vD9jKSg=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-b8759b2199d709686561eae1f8f4eb0fe275c900_1592623285896_0.4828498207880614"},"_hasShrinkwrap":false},"0.0.0-a90439f6d09592aaad6ef3a9636f7ac9fd8b816c":{"name":"type-route","version":"0.0.0-a90439f6d09592aaad6ef3a9636f7ac9fd8b816c","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n> ## @next\n>\n> These are the docs for the `@next` release which includes some major differences from the current release. Go to [type-route.org](https://www.type-route.org) to view the docs for the current release.\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full <b>runnable</b> version of the below guide in your framework of choice on any of the following pages:\n\n[Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) · [Simple Vue Example](https://typehero.org/type-route/docs/guides/simple-vue-example) · [Simple Svelte Example](https://typehero.org/type-route/docs/guides/simple-svelte-example) · [Simple Angular Example](https://typehero.org/type-route/docs/guides/simple-angular-example)\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route@next\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx {7-8}\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n  useEffect(() => listen(setRoute), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](https://typehero.org/type-route/docs/api-reference/router/session) then subscribe to route updates with [`listen`](https://typehero.org/type-route/docs/api-reference/router/listen).\n\n> New Type Route users often wonder why React components such as `<Route/>` or `<Link/>` aren't provided by the library. Read the [React Components](https://typehero.org/type-route/docs/guides/react-components) guide for more information on this topic.\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` property and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link for a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more direction there is a full runnable version of the above guide on the [Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) page. The \"Guides\" section of the documentation has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"a90439f6d09592aaad6ef3a9636f7ac9fd8b816c","_id":"type-route@0.0.0-a90439f6d09592aaad6ef3a9636f7ac9fd8b816c","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-yRE4noBgfF8qmsHKbLKwiaeajKOy6X049P7I6fiSOaD1dnCpBUXcUA00wFh2bDCkbxHVGMDYe1o8VgZqfn+qeA==","shasum":"55798f86a5c7103c4b4e273566c97cb764290fa3","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-a90439f6d09592aaad6ef3a9636f7ac9fd8b816c.tgz","fileCount":43,"unpackedSize":604933,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe7YGbCRA9TVsSAnZWagAA0d4P/iEbNDTeM//7GFf++qMp\nMHZCpRl776DTHorT50xTpx5a73g5GePiYys4kdXLWLUUVo8o2CHuSxI7aDag\nsrBrijQTM5RJfD5Bn9LYvYB3pzrrNP67tj5Rgri+JYPp9X5svIYneZX8rD+u\n5qwVWXpmkfHGoVWaVWZ+sJuLJT6Spm3ylJKTZWe9Fq+1/d998xqKkjAkFDED\nPrWic8Hbno2Fyili8CSSVBW8NtMHqm2xZ4eVYPEr0z8IT8bGJ0UnVp+TJtGk\nsMU4ae/f+fpuLGq9YrFJv2KkYqbnhNFGjHMrac27o6k9SAoWbPzPpT9af9Jr\nEVoOo4RSQwJ4Vjc32g9b3MpuzGM9sPGbnQc4d2mU4AZdJPb+KfEhn+jpCWJO\nN2xhzVDH8j1Kpz0FjXP1m9WyxBSuSQIJid9f75NvzeBn+tpfD75vVsgVfe2V\ngxzBFYlbYWvKfYoLsNXm59XX19WxwFVwv/H1Lsatuq7AbY6Xc3dTHcuOkglo\nC8j5CZgWEC59QQX/jaeIIU5dBwfT7qcMK7uzHW16B60IpfZDi4lAGJ2zGIM+\nCvK8mBiftpBXz9xN3kJUwmBchHU20V4c6OB94eEKlurshZitnaxoEbwmeh5n\n1Q0iOwJjdHtz3d7X6u5bfMP+peyZYDmPSZ/AVICNqaOPu1m+0lDBKL2i0MTi\nQOQI\r\n=diE0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCNT5IvpWm44msXAvYXdgLJE4nLrMCet8n7hZE+9ppePQIhANrITZPSixDABD/rXYKfHco7i4x12T8Ls9xb3LTYaS4O"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-a90439f6d09592aaad6ef3a9636f7ac9fd8b816c_1592623515468_0.9797451637233716"},"_hasShrinkwrap":false},"0.0.0-e4a0c9bdf45223503cf715320009baa5fd2a9797":{"name":"type-route","version":"0.0.0-e4a0c9bdf45223503cf715320009baa5fd2a9797","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full <b>runnable</b> version of the below guide in your framework of choice on any of the following pages:\n\n[Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) · [Simple Vue Example](https://typehero.org/type-route/docs/guides/simple-vue-example) · [Simple Svelte Example](https://typehero.org/type-route/docs/guides/simple-svelte-example) · [Simple Angular Example](https://typehero.org/type-route/docs/guides/simple-angular-example)\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx {7-8}\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n  useEffect(() => listen(setRoute), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](https://typehero.org/type-route/docs/api-reference/router/session) then subscribe to route updates with [`listen`](https://typehero.org/type-route/docs/api-reference/router/listen).\n\n> New Type Route users often wonder why React components such as `<Route/>` or `<Link/>` aren't provided by the library. Read the [React Components](https://typehero.org/type-route/docs/guides/react-components) guide for more information on this topic.\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` property and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link for a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more direction there is a full runnable version of the above guide on the [Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) page. The \"Guides\" section of the documentation has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"e4a0c9bdf45223503cf715320009baa5fd2a9797","_id":"type-route@0.0.0-e4a0c9bdf45223503cf715320009baa5fd2a9797","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-lKsj/N39AOUWaSllQRJEE14e1HoQEE+xwfqqDt9xYRWxtdcvPYPRNb/8KqekYwQ4+e5rgyfmyH/bhdJQyWIHYg==","shasum":"be8675b2734bcc4786ebf269ba6e86ebdbd5a4d5","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-e4a0c9bdf45223503cf715320009baa5fd2a9797.tgz","fileCount":43,"unpackedSize":606834,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8sj+CRA9TVsSAnZWagAACLgP/3gR+4GPfG2hgZci0qqT\nM0UbaYWBlCouljCf9QiL95H0LU67d9wXHJVw26Fk0Q6R4GEOMD6GxTiVL4eP\nwcFdY6X7kiXSulb8y3raG77wL2MuvDJ+Cq56XhtsL3g6ecXxfdUt4UYBUaYK\nzvrXbU+OfsSHS/msHJVetUxlCiWY2IUhzRLF43WG0ulDTfxU7/CBKsPVPSSC\n8NuMOlWBe9QeQUZ9fCAbhdzchEzS2BkfI9E3qQpVN1QTaP0eom5T8WpoZ7os\nWSzIEB1IQIwK30Dnr45qKTzBwRHFtvpJxY6qX8ILoUZYG4gtkxYwxO1G6eon\n51oj0gBCPWS+yu40VTynBZgruOSJhBKox1z/L4IZG4lYe9QaZZ7IshJ2CwCm\n1J1hAv4avkl1HmoAynlYRQm0oN1kC1uyY06lzPMMCWAOxahLEooD1dYMji3+\nt1gPpmkWTpmMKTBFg2E3yPI9dNfU3gyj30EyOLgPhSYu+2UA+I4DsmXN6INi\nb2kI+4evF5QjXN6S3XEsGKqZeg2H6B/IUuDD3ElrfORSSYj7aKvUzYD9RcVV\n0DEj3cG5mzc0C8nZ4xVd9CxWiSqgB0Lc+UneDDnKxNcvhz6YXQHNdl4a2SyI\nzCa2l4fPb9XtwzWHKd8ZRsiD2Nol3/ngEDY9efYqRbCx4lrvKLJoxums2fqN\nRdrr\r\n=X/3R\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDljiztUyot2dse7mLyRzqGVr9NsQnl/vx95G92YOklBgIhALXftqWjCofZDYIb09J0KwnLaLYheinlwNK93bPcxQw+"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-e4a0c9bdf45223503cf715320009baa5fd2a9797_1592969469661_0.09368334291213509"},"_hasShrinkwrap":false},"0.0.0-31300e6c768b5e8aa0efafb3e021019101b6c231":{"name":"type-route","version":"0.0.0-31300e6c768b5e8aa0efafb3e021019101b6c231","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full <b>runnable</b> version of the below guide in your framework of choice on any of the following pages:\n\n[Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) · [Simple Vue Example](https://typehero.org/type-route/docs/guides/simple-vue-example) · [Simple Svelte Example](https://typehero.org/type-route/docs/guides/simple-svelte-example) · [Simple Angular Example](https://typehero.org/type-route/docs/guides/simple-angular-example)\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx {7-8}\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n  useEffect(() => listen(setRoute), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](https://typehero.org/type-route/docs/api-reference/router/session) then subscribe to route updates with [`listen`](https://typehero.org/type-route/docs/api-reference/router/listen).\n\n> New Type Route users often wonder why React components such as `<Route/>` or `<Link/>` aren't provided by the library. Read the [React Components](https://typehero.org/type-route/docs/guides/react-components) guide for more information on this topic.\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` property and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link for a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more direction there is a full runnable version of the above guide on the [Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) page. The \"Guides\" section of the documentation has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"31300e6c768b5e8aa0efafb3e021019101b6c231","_id":"type-route@0.0.0-31300e6c768b5e8aa0efafb3e021019101b6c231","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-aMrFONV4fJcKWdy69uCQvTQMQyUdy5QffEoqt1vk6MtriqoRnvD+X3gmyUBMYKY59WhRkRPsSSWX9Pe4v1GI2Q==","shasum":"93553e8e9f795c5f49b0b2c646860acaf49a5d57","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-31300e6c768b5e8aa0efafb3e021019101b6c231.tgz","fileCount":43,"unpackedSize":606834,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8smuCRA9TVsSAnZWagAAWpsP/1doO/wx56RxUHdF+ww6\nnXLhuRQONwJ7+7jKTXLQkwXa08i/Mk1kNk9h+rm1hfn1FYKPb/9Pq6mfrjSP\nUzOe5mldp8o6i9/vFTzqtir9jSUPspehPPHtCcfxg41OyFySwKvCtyfMVCCa\nNmBLEZWbuY9pYPUj8FJ8AXLDFOobwZzuUYRCBuZ2XyHYJBP7PzxdlB182/bu\nDKm0S4dWmAZZYrFom48Dcx5YLodtAAPnXjiXcfnTBLx+3pAO1z06RjYu2zkm\nHz5SU869CzFSoSlSqTC6BHTkInv7TYyni4VtE5CHkZCzwbGusQ5QON+E/N/x\nD2LHfcbvSPx8t2HHXPd2MFFdZpORTvJ0c/KVPXuCDWjeTcthvraz8BxkptQM\nxM9DQpcon4mRiP9ZaKjCxbiCTVFQ6ukL7Ddq59aUvWk8Vm9C8y7AeszWKRfN\nz/TWx0af4S3pCT95z8MmRRNcs7BC6GDQtyIjDl7f3fUr8l7ABWOWlrYiZu3v\n8ClTWmjWTAExMatdPFMpCYVBj2NhzCUDFz+zNqODzGfuIz9DLQFFXes10F7x\na5o23QHnfuQqyC5nMQvo5wBN38ebRdl85yp3MSK9pLWQyKi9gEu9rAZp9oQE\n+zAxclXNZ3mRsRLGsheJyySg1t/GiUrTHLBv2nc1ClOTHNYC3iPX5scUd8+E\nzlC+\r\n=ZRC4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHuhp4EdHz61657OpJXzQty0i/+r9i+wScfbnlYX1rPHAiEAuFqP9aQlB7iLMr+2GL6AmkggKkLPon3AJeA1A5tFr6w="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-31300e6c768b5e8aa0efafb3e021019101b6c231_1592969645838_0.12100265571861524"},"_hasShrinkwrap":false},"0.0.0-938a76e19b084410ea4e9f4c7fc2118d3638a0d1":{"name":"type-route","version":"0.0.0-938a76e19b084410ea4e9f4c7fc2118d3638a0d1","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full <b>runnable</b> version of the below guide in your framework of choice on any of the following pages:\n\n[Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) · [Simple Vue Example](https://typehero.org/type-route/docs/guides/simple-vue-example) · [Simple Svelte Example](https://typehero.org/type-route/docs/guides/simple-svelte-example) · [Simple Angular Example](https://typehero.org/type-route/docs/guides/simple-angular-example)\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx {7-8}\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n  useEffect(() => listen(setRoute), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](https://typehero.org/type-route/docs/api-reference/router/session) then subscribe to route updates with [`listen`](https://typehero.org/type-route/docs/api-reference/router/listen).\n\n> New Type Route users often wonder why React components such as `<Route/>` or `<Link/>` aren't provided by the library. Read the [React Components](https://typehero.org/type-route/docs/guides/react-components) guide for more information on this topic.\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` property and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link for a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more direction there is a full runnable version of the above guide on the [Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) page. The \"Guides\" section of the documentation has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"938a76e19b084410ea4e9f4c7fc2118d3638a0d1","_id":"type-route@0.0.0-938a76e19b084410ea4e9f4c7fc2118d3638a0d1","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-2dXxJlV5c8ir8Uqlph2zO+weUIU9RY9mggk4otrenxe69GqZNSMBZTkP9nDCkkzQgZ95lVpwgMDH5HP1makB1Q==","shasum":"0625a5d881e48eb95c22e7937324ea06d2d2d3f5","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-938a76e19b084410ea4e9f4c7fc2118d3638a0d1.tgz","fileCount":43,"unpackedSize":606834,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8sqACRA9TVsSAnZWagAAEbcP/ib8lOrABMk2iCw75Z1Q\naZ99oxtGLfztsjJrHNV+xZHq5vvW/8S1Wh9hXG9q5nG6a/bupDeDu9h/l7GO\n3J4h5GCqaoOQXHIAxtvw6UIWZOO3s0PLisXg6wp0Y+oYwuNTr40zSR1iM8mU\n9rE4DjHJkZ84pLbfuGzD49oOZjCiN0SP9mtmsbfwr6l7+ykgB0dxa2bSK+8b\npbpvr9ecFanUdriRtZ+BkmXTDcjXoF/iijETfDymGuGSdJGoWtqOj74lIKnH\nBGK09yjb4WcTsNQVJAComJnsUx5yZZG3GIoes/N9Lz1arc0xg1ewGowWUK2W\nzknI7X2zAEHWmbKZiHrItJ5OHyEEf3l2nvvnTVzPXP2BraRT5XuCgQg82Zv9\nxzbtJfXKFNrGBy4KUlNnhWEzddAw/XxYWOwjpAF7OLb6TKEUmSH+LRPvzucU\n9sjZOuliMScxtxoj+NGweG0yhxKUORcrbIgyTTxST8ok14EguyAy/yYV/NQa\nyTLo4IsJMclEwgXEg22Eo8v/yq6fwrq5cFWw1qqvWc79uN9/o2u06nVNTSSO\nvUdSwQhPcvaOQRG4zoRh3v9kUX/xGHu9prHaSYJseV6ZtCl9MsvhfmuKy9ZF\n7l4PKtnXkntrs4yTy7rBIHBleGFjmD3KqGX1OKtwN4Io2pb2eL3Ah9JKog3A\nBdqG\r\n=jVDP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0ohhPEINbJu9lOoT0HUz19rflnOg+gBdIcjsZ2NyJ7wIgVLypu3j9egno/mXSJ6x7gKHVFnvBju141v4G07GJ/Io="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-938a76e19b084410ea4e9f4c7fc2118d3638a0d1_1592969856147_0.40884884995187587"},"_hasShrinkwrap":false},"0.4.0":{"name":"type-route","version":"0.4.0","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"gitHead":"938a76e19b084410ea4e9f4c7fc2118d3638a0d1","_id":"type-route@0.4.0","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-iVrGVkHqgpS/xcQNFAYTMaZe9kNGrpkRkA8wePHrOiHJl3Xwb7SDI5mR+3ezvF8+VEV8RaUTwUS3HoAxut9R7A==","shasum":"f956c4332b6e33a6513f0b62fdab8219c0d76a10","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.4.0.tgz","fileCount":43,"unpackedSize":606793,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8s47CRA9TVsSAnZWagAAjEEQAJ6gPKgPzsxJmLXhjOhX\n0b31qgG77ZFjG4O7IAckdR/KH39D9oaX6frR+gRwHJVMytyamJfvE3x/IKiF\nNJWn/wBC0+/rubSLBJea7M6MOkwit55trvkszlpVF/TYB0c9CWNm6Gc4baHE\nYYHkFUF9UShavx7kOJYreRNvQxSnjwuqWaJI4ZV/VI6mkL58Ac2RNWu5kzhr\nhbuI2rasRurckQfXtAPDUt+q0mcK1Dx2OLG7hBm1VcGErGQzTPeCxk8ANwhK\nPEzLbY6gKTIzMEups+8BPUN7+F+TPY+Ijndlt6yf/LXjWfxS0qD+T/XlFv41\n0b8srGoCqexlPEnuvtrw0lz80L+HGMuzoYvBkDjUaHRQhqvv5QKN3V539Sn7\n5F1swIeA5Uiv0fW8+yIfoE5Xaef4/kiEkyGTmLNFt3KLjKDAlC+1whQ+W2VP\nTplHvZWzXQ8BW77aCOACV74sLRKWQFZZ1wCp/U9/8DC7D7OTS7fWR36e+ZL6\nIt3I/dfkWk8Wvh6Ht3NrW0mcLiwQr4gebcC7ZbWHzmPFHTPqH3xQI+PO9v9F\nq22VdRF5jx4SD9TEiUyasJfiphJf8Sp+PfO98W+mS3qW4ELRG/Cp+Gp2hiej\n+He0LjrpuxZL6oZ0REwwbTaqwOUI2/FkqQdE4BklxVDYKP8mUYjvZF/5mx4X\nvJhT\r\n=I8rU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+eWwJFmw/8cAwXSv9e94i6lEA93fU8NwGAU0HblJZxwIhAJWVSjAfLX3rZDIvlD9a4OGYR8C8EcmiuwBb+dp0RQa9"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.4.0_1592970811411_0.5600577592038276"},"_hasShrinkwrap":false},"0.0.0-7cbe2ede108b1190508c1ef3d37c3252f47d3bd0":{"name":"type-route","version":"0.0.0-7cbe2ede108b1190508c1ef3d37c3252f47d3bd0","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full <b>runnable</b> version of the below guide in your framework of choice on any of the following pages:\n\n[Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) · [Simple Vue Example](https://typehero.org/type-route/docs/guides/simple-vue-example) · [Simple Svelte Example](https://typehero.org/type-route/docs/guides/simple-svelte-example) · [Simple Angular Example](https://typehero.org/type-route/docs/guides/simple-angular-example)\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx {7-8}\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n  useEffect(() => listen(setRoute), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](https://typehero.org/type-route/docs/api-reference/router/session) then subscribe to route updates with [`listen`](https://typehero.org/type-route/docs/api-reference/router/listen).\n\n> New Type Route users often wonder why React components such as `<Route/>` or `<Link/>` aren't provided by the library. Read the [React Components](https://typehero.org/type-route/docs/guides/react-components) guide for more information on this topic.\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` property and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link for a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more direction there is a full runnable version of the above guide on the [Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) page. The \"Guides\" section of the documentation has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"7cbe2ede108b1190508c1ef3d37c3252f47d3bd0","_id":"type-route@0.0.0-7cbe2ede108b1190508c1ef3d37c3252f47d3bd0","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-C32FbkyqO+AAGn4Gmxv2yZYRKOXt/KZqTcQQXZ5f63DvwNZRI/9CDFiIIbfxXUrceH7EiQ+49iI8jyz4iEGpVw==","shasum":"a6325c00ee2c7db9c83fb31583dc7debce98f29a","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-7cbe2ede108b1190508c1ef3d37c3252f47d3bd0.tgz","fileCount":43,"unpackedSize":606834,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8tRYCRA9TVsSAnZWagAA6JkP/iOnuZGGheWlwpbGU2zS\nbU22IZ9/DEfg5GPdug2R8RHPiI8nhdc8FBf+7O+M/5JzXoqFOZPZ5zXYPu2X\nJjOJEkC2UFbAs7xm1EBD33rhfMrpzXh2Nk24WqC3IaLr6TEKY+GmGtEtg20N\nH5fFAr1GlfU+siP/amEsSvpMfLFzfjBn1spHRX0ybmlsCy769TysbVRusnYl\nvZ82MTrDbc2y4vLj5GtJiKJ3NuA/J2bbHSGzZv1Si22vcqWKn+DT+jL+bZD1\nOSDZmk5gx6l7/Mg9z0DEskRCovKFHr5fLFqPgLTSKuIparvkSr5UjGRoI5GB\nQnuOUKhT3ODiQZKROgiJKY1eqAZOPR3D/8CYN126onTT1N/Ag0a3LWt/qFUT\nM+7FNPdxyCNWD0mKj/zFNr+kQ/bmUWIHYEaI7rAYhOOFHVYjqh1oi5hg7kXA\n9AlVhxCmUO0m0/CHL8R7KDMY4dM2OMGKJQsVtVEyRz/ahS8T3gErygx5k4lO\njLmDmy0Xo+DkO0pmJaRpyaeAj+QGr6H1DJBjnjOfOVVGZ+Nu5Ms/UO5DQd5A\n0aPPhVbwg50ndcLNzI25T9bmnpN/3HOBKZAe/eyT/AEkW85T5NIKa1nb08T6\nGcCHMu06JznMM7FcaansDD009PHcK+M2kcolt70llP3XYyC58O2hDz71JkSn\nS4sL\r\n=N7fL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGOPQSDizCG2MHWFui4xtmXBDUktiJOUK+YGy0FYXm5MAiAd+szGIAIK2odhgQDmNHSaUKr+mb477QDGnGDkvWg95A=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-7cbe2ede108b1190508c1ef3d37c3252f47d3bd0_1592972375898_0.020168468510959325"},"_hasShrinkwrap":false},"0.0.0-81aa0247970a340d184f0dc41609b6fa7d0ea778":{"name":"type-route","version":"0.0.0-81aa0247970a340d184f0dc41609b6fa7d0ea778","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full <b>runnable</b> version of the below guide in your framework of choice on any of the following pages:\n\n[Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) · [Simple Vue Example](https://typehero.org/type-route/docs/guides/simple-vue-example) · [Simple Svelte Example](https://typehero.org/type-route/docs/guides/simple-svelte-example) · [Simple Angular Example](https://typehero.org/type-route/docs/guides/simple-angular-example)\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx {7-8}\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n  useEffect(() => listen(setRoute), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](https://typehero.org/type-route/docs/api-reference/router/session) then subscribe to route updates with [`listen`](https://typehero.org/type-route/docs/api-reference/router/listen).\n\n> New Type Route users often wonder why React components such as `<Route/>` or `<Link/>` aren't provided by the library. Read the [React Components](https://typehero.org/type-route/docs/guides/react-components) guide for more information on this topic.\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` property and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link for a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more direction there is a full runnable version of the above guide on the [Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) page. The \"Guides\" section of the documentation has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"81aa0247970a340d184f0dc41609b6fa7d0ea778","_id":"type-route@0.0.0-81aa0247970a340d184f0dc41609b6fa7d0ea778","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-8gwDXguYlu/UrTJWh4FfkBxiaM9roClRo+RnPCYz+syFmut5gIctX7w2bvgVkZWcwLMFCn1CCJNewC1g2uthbg==","shasum":"90541b1fc5467fc7177f1a9460a5294e33eb1cb7","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-81aa0247970a340d184f0dc41609b6fa7d0ea778.tgz","fileCount":43,"unpackedSize":606834,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8tV/CRA9TVsSAnZWagAABEcQAI6eo3OqprzTBDMM15ib\nqkOwOpvG1ySm9WywMxcU871Dup3ySkhv7Wl/pMmbM+iPyqLZDscOhE7oxmVr\nfDSrMmzbJ/zXILMUWcWACn+qK1OTXr5nkPnir/qCO9HfHMz3Aye2UFhM37Nd\n1Idgi3kDL/esxSNAl9C1p0Y3OV2iEhEznUlgYIKE21QfjgDPEq+ewlFqy4D1\nBAOjNbNfFseagLs70euAuI4ctF2QlcBRSGSbDAd0x3h1Acv587m+iTq+5xqz\nD2k7Ad++qlfC/OOBxg9D17d1jAT2oRAzKV3/V352alLP+wqtC9dJUOUEBE1Q\n2EdUv19rVodxAXIkl2oC8artffAipHBNfzugNuKGFlpkIjYZOkrWM1Dd7uEY\njk/Ka/eu2RCfWJmVmZOO4NU4Gm8o1os+wNnsvQpV8xSEcSgCwF9bK0gQei2h\njD05S1ZJwI1uC2320BIMvb001UqMuaQ5uHM/nlAJ5j3D7EkXZEiKPzqxmvLO\nMCh7qvkpWXkj/Nfxq1XncsXPj1CoWfVWl/sK8A0VkkOMBa4J0gpiopXAgpNZ\ngfncV9Gok6yyL2MbbpZ1yPU/MyIh+S0FXRXJZGLfLMlmBjmLVJ13Bfe72r6N\ndBhClaOemLltvRwCgo8m3R6BcrJ1ApxUU6Ig1f6bEjVAJZOIuaF5Brana1ux\nfHHp\r\n=k4qO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFzrxVLFvmUuAwelLb9XIf0797+ctjqTXXNocLKOAfCPAiBjVBbyLagiJbS+ro79MNsOXtDAzKGNWRwKACdnJ5hJAg=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-81aa0247970a340d184f0dc41609b6fa7d0ea778_1592972671200_0.6162957668022659"},"_hasShrinkwrap":false},"0.0.0-b47f4215b2b29e139f864b1e012c7d2010ea1368":{"name":"type-route","version":"0.0.0-b47f4215b2b29e139f864b1e012c7d2010ea1368","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full <b>runnable</b> version of the below guide in your framework of choice on any of the following pages:\n\n[Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) · [Simple Vue Example](https://typehero.org/type-route/docs/guides/simple-vue-example) · [Simple Svelte Example](https://typehero.org/type-route/docs/guides/simple-svelte-example) · [Simple Angular Example](https://typehero.org/type-route/docs/guides/simple-angular-example)\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx {7-8}\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n  useEffect(() => listen(setRoute), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](https://typehero.org/type-route/docs/api-reference/router/session) then subscribe to route updates with [`listen`](https://typehero.org/type-route/docs/api-reference/router/listen).\n\n> New Type Route users often wonder why React components such as `<Route/>` or `<Link/>` aren't provided by the library. Read the [React Components](https://typehero.org/type-route/docs/guides/react-components) guide for more information on this topic.\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` property and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link for a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more direction there is a full runnable version of the above guide on the [Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) page. The \"Guides\" section of the documentation has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"b47f4215b2b29e139f864b1e012c7d2010ea1368","_id":"type-route@0.0.0-b47f4215b2b29e139f864b1e012c7d2010ea1368","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-0jq+ORCdBoW3VvhcGFs9qMc6LIGph1Pl1yF0TLOlN8An/t1Zfey40eBXf77n0t3EkhTS8cQmENVWMW0wpANHPw==","shasum":"8a2d18c120aac0641ef7078d3e49298036bfa600","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-b47f4215b2b29e139f864b1e012c7d2010ea1368.tgz","fileCount":43,"unpackedSize":606834,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe8/GQCRA9TVsSAnZWagAATZQP/1o0Kek9snxG38UNRxOs\nmP67Efiqvw3nBv4Z7zHUFBt8mTFGgESyEZjVGV35KzLi6cwqKZyPZW9IINOg\neg1YZXv/t/cyfu1rxkq9VnDurl/XvrZgAYVH7Xmic7iV+7lyehGxMB536kqm\nMzNTU3dDP4UJ02naZdF7KyXOmgtIKsYnD6fXoS/N4qyLzFVORiwrFt/1crTi\nxKyWQf7+AkaEjVZzIFQGFqfzffDlSr/lJTNpS5XqWGbKJqI7zOBDJ58L69jT\nVZWv7B0PLbaAaekVoV4oSniK0XHc+0/lDO9CLmgJhvzuHNGsBmIVsWoebHRT\nOukJo/j40284SaFkPC73aAehxgYsSOSy2ezYvoenJLemFagBgTvtpeb2BPwn\nX/j6mv2JP/Nd/go2r9r/92mEIa0MKiYC0qJ+q/4k7UBjZj6pJ7sZkt/ZQnm9\nAqhILAXMmNbZ+vmuy1mSipzZD3XyDnQue/6i4Q0F6AW/xlhKgQzGQa+POAjI\nViWy30lWX6hmygWTkidTw8ec8hDfqwNC2RN3qAhy9YxxdL8pCVPphhejimDD\ncyKst8lRnlkg/adE2bW7P5hPpGfxY1dcKz97DrskIbXbbIS83vgmUa8uhZYF\nHyF+/pFleqKDdU4kzgibJHGwcElFsDoydlsAkEp2weLexK+jNAcVEceQCwBQ\nfQtV\r\n=bUZg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB5dcnh1bsitCRdwgcLP0IqfscVw/EbaZupXxQHK5rUEAiEAx9kr0v1ip/Qwn4p25n2B35YXBouhcq9c9C4z7CTwB8s="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-b47f4215b2b29e139f864b1e012c7d2010ea1368_1593045392264_0.712795540060668"},"_hasShrinkwrap":false},"0.0.0-26bcf5c72259ab4dd9f9d8d3942ad95f1d738563":{"name":"type-route","version":"0.0.0-26bcf5c72259ab4dd9f9d8d3942ad95f1d738563","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"peerDependencies":{"react":">=16.8"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full <b>runnable</b> version of the below guide in your framework of choice on any of the following pages:\n\n[Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) · [Simple Vue Example](https://typehero.org/type-route/docs/guides/simple-vue-example) · [Simple Svelte Example](https://typehero.org/type-route/docs/guides/simple-svelte-example) · [Simple Angular Example](https://typehero.org/type-route/docs/guides/simple-angular-example)\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx {7-8}\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n  useEffect(() => listen(setRoute), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](https://typehero.org/type-route/docs/api-reference/router/session) then subscribe to route updates with [`listen`](https://typehero.org/type-route/docs/api-reference/router/listen).\n\n> New Type Route users often wonder why React components such as `<Route/>` or `<Link/>` aren't provided by the library. Read the [React Components](https://typehero.org/type-route/docs/guides/react-components) guide for more information on this topic.\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` property and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link for a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more direction there is a full runnable version of the above guide on the [Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) page. The \"Guides\" section of the documentation has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"26bcf5c72259ab4dd9f9d8d3942ad95f1d738563","_id":"type-route@0.0.0-26bcf5c72259ab4dd9f9d8d3942ad95f1d738563","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-MCJYJVU4Z3dSnyjlUeOERV46EvwdNYiFv4wm7bm0YopvFkjz6hIFN7iIygC0xYSdhE4aEdYmIJSrZZyLEJJQPw==","shasum":"16f4dd437f1013712b592a38eaf7c308a6bc654f","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-26bcf5c72259ab4dd9f9d8d3942ad95f1d738563.tgz","fileCount":43,"unpackedSize":640332,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe9CtICRA9TVsSAnZWagAAHwoQAIPeX/4muofuMijYi3cf\niMNCKIZNOCvfqy/Q46GJ8aVvwz1fJoWny6UV05IfjG/kYVcJX5cblKANNVAk\n+QzIj9AkHcJ4H6gbgQT6L+Tn82FExgZ7xDZaHp5cwj/iM5smYHOvMZsWToVl\n3N+1RN/x0hBfkRimynYiE8utwLAGm5A3u8Gv+dns6oEZHpHt8XB2dZ2UxV/0\nBQKJXYalHCIZ993vRHYwUr7qYZsjCr/DVaCy14wWz4V1pTGXctnwisqtRGuu\nf7aZQzbTryb/3InbvbSfCF2xtlyKNQNXrv7rurlZ2ZlqOgWzjyLLHNh2T3JK\nZIsYhV3tyuHlEgkm5NJY8dOyHMrDQEneanagRHrW0zDMb0k/Ch0da7ZKs63R\niou4DelsiTYc8My+4iSfn9ZWvcLjQC9DEM8uQ1tnSI4H9d2TlN/WS3EqBO91\nNK1J11ET19sRhxczo2xbdor1B6BgEEi79IAuu0GtIME3G6NrCzy2Ei+esuWl\nZgHAoCw3wSArNwVnQ229fVZlh+zval1X056Bomosw98mg8ktJmx2jc1jXU8h\n8OEuNLbMQZki2ErSwBCou0sPykfqJea1KfGZS43i70kleBTnzhMJgnT3W34I\nPXPTFnenP3u96kYTBOHO2CpR7vxa3Mnu89cE7dbSrzvrWvPC1FdR7dmbsguo\nxcT9\r\n=d0Yw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHbzamdSj96MthG6Y7wcAHlkt2pXpqE5FN0vjs0/H3lwAiAvm4TCVzZsoAKiipkhTkEaj9jXDuGSvaPNh+2HtJPUPg=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-26bcf5c72259ab4dd9f9d8d3942ad95f1d738563_1593060167706_0.3693115691164963"},"_hasShrinkwrap":false},"0.0.0-76a9fa9bec9b42f9a647ae3dd4ce47baba35169e":{"name":"type-route","version":"0.0.0-76a9fa9bec9b42f9a647ae3dd4ce47baba35169e","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"peerDependencies":{"react":">=16.8"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"tsdx build --tsconfig ./tsconfig.build.json && rollup -c rollup.dts.config.js && rm dist/*.d.ts && mv dist/index.temp dist/index.d.ts && ls -lhS dist","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full <b>runnable</b> version of the below guide in your framework of choice on any of the following pages:\n\n[Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) · [Simple Vue Example](https://typehero.org/type-route/docs/guides/simple-vue-example) · [Simple Svelte Example](https://typehero.org/type-route/docs/guides/simple-svelte-example) · [Simple Angular Example](https://typehero.org/type-route/docs/guides/simple-angular-example)\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx {7-8}\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n  useEffect(() => listen(setRoute), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](https://typehero.org/type-route/docs/api-reference/router/session) then subscribe to route updates with [`listen`](https://typehero.org/type-route/docs/api-reference/router/listen).\n\n> New Type Route users often wonder why React components such as `<Route/>` or `<Link/>` aren't provided by the library. Read the [React Components](https://typehero.org/type-route/docs/guides/react-components) guide for more information on this topic.\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` property and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link for a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more direction there is a full runnable version of the above guide on the [Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) page. The \"Guides\" section of the documentation has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"76a9fa9bec9b42f9a647ae3dd4ce47baba35169e","_id":"type-route@0.0.0-76a9fa9bec9b42f9a647ae3dd4ce47baba35169e","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-A1K5mkluQN2rBJ8LsA5sIP133sUv1ira9rtf8B7g2igeG15G6WYa35wyNuR7nU8tqJ19Wx5MWLgOKCGgH+WJsQ==","shasum":"073b658ae73a32a062f26060aa11df1cda2e61eb","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-76a9fa9bec9b42f9a647ae3dd4ce47baba35169e.tgz","fileCount":43,"unpackedSize":640332,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe9DKRCRA9TVsSAnZWagAAAEEP/jECKWoU4j+Il/ZOcSHg\nbAi0DBfQ3GMRwEINiannukoxA4Daljx63CfvLw2UGw4dYxTxRIXCPVjgt2mm\n9RJhZkmmKcb2RTRV6FDbMiKie3ICZFPZ/pcTfo7Q+B72mFQB8+Z3X93RWm6l\nrjBrM8O2oCsVj+SlJ3LhYrYtkF+kn0dVnQpsh2LnbeEGtQ4oBSbakvO3V6Fv\nWmr3cdD++H9rmh4eXkcfz0jSf7+HMyY319nRmavu2GVCn1A1vQBlNQXzJczx\non+LZcW9oK7G0xoaYX5kI0QeNHMQXqkq24UkloeBAVNjnkqYv353io1witAQ\n9bU18kyT4V/iNyV66BNACduPOArNi3mcJqnViG/iwc8N/CUExaubun3QFsEM\nibAjpZ+Z8y1NXOkSVq9HbkzMsZ8WdA2EQEblxkYP5PWsoyzLlO2BejHj82IG\nu4IcNuDPHxweDj6JLeVwDMiLW7/Wow5x87bpLPef7sGCXfoAR/usc/QhZk6x\nYFA0TUFAV1cMd5irFfrgJ6mklM5UE2aFBip4pr7OATzIhGScfU+Ub1MHsQsz\n1htJjWAnwChBiWNYytezc1t8oOTC9tv1dBU4GfJj3jX6P6ZXapEeokkhyBvJ\nVRbN+Fwj0li0AWRsqaytnLCMGxxzETQoIQweMnH083XhlPlp15DR0mBtrAqj\nfAOq\r\n=d0zh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDIoWTeI6o/d5mDcDjUFKo+HfxpcbsJxg/4PvaXZq/6QgIgdF7Y4xlTpb/uAfy8L1/ZtEZI7s+MBI9TY8T3rlJAInk="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-76a9fa9bec9b42f9a647ae3dd4ce47baba35169e_1593062032500_0.38540518863805584"},"_hasShrinkwrap":false},"0.0.0-dfa6b35063884847337fd617da2693e0bd7b558b":{"name":"type-route","version":"0.0.0-dfa6b35063884847337fd617da2693e0bd7b558b","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full <b>runnable</b> version of the below guide in your framework of choice on any of the following pages:\n\n[Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) · [Simple Vue Example](https://typehero.org/type-route/docs/guides/simple-vue-example) · [Simple Svelte Example](https://typehero.org/type-route/docs/guides/simple-svelte-example) · [Simple Angular Example](https://typehero.org/type-route/docs/guides/simple-angular-example)\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx {7-8}\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n  useEffect(() => listen(setRoute), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](https://typehero.org/type-route/docs/api-reference/router/session) then subscribe to route updates with [`listen`](https://typehero.org/type-route/docs/api-reference/router/listen).\n\n> New Type Route users often wonder why React components such as `<Route/>` or `<Link/>` aren't provided by the library. Read the [React Components](https://typehero.org/type-route/docs/guides/react-components) guide for more information on this topic.\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` property and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link for a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more direction there is a full runnable version of the above guide on the [Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) page. The \"Guides\" section of the documentation has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"dfa6b35063884847337fd617da2693e0bd7b558b","_id":"type-route@0.0.0-dfa6b35063884847337fd617da2693e0bd7b558b","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-dSJttH/7EPY5K1TnX7mVnAO/TnR8K4hK6fNub/tXQW0SFo+YDY66+UzVYIslhxnPhAgYWP6F10GJafRzLcuxsQ==","shasum":"85f53682975e2fbcbb9f2b1c4d7a87d41fc8b3ac","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-dfa6b35063884847337fd617da2693e0bd7b558b.tgz","fileCount":44,"unpackedSize":632208,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/QWBCRA9TVsSAnZWagAA9MQQAIMfSdrbGcvQjaLqwLXu\nA011QBLPTQRH21gmGP0uXDInjzbq9BU2gWcy4TN08DrxpH9is35YNl3cIEZ6\nY5ELF3np7nzvHBBwqiMzehUWQT1+TJv28sVClycATPLozmzkFDIWxPajyl5C\nE4cPKzZUS+VR2HJZK8zU20MycuKdpRlIVveVzSlZHxwagJzhxSzhEyqb0VkZ\ngQzv3AKssY9+muvKwVm1qf+7jvSYWOknvO2s7eFC3PG9G3vTeYl3/ft3wKQT\nF/dTPj5T4Ew2gOTK1OsNk62CRDja3kUU3Tu9QiuJ1NQaGthXXBR/og4R7MpB\nmNgfGllI9LM2VTKYtRfmQHVBGQ+TpqLb9LWfLny76UMNy/nrig7eA9E0Ronv\nZaCgMCT3qQ5gp2qMMNPDgBL2K5chJEMkJkOo3JRECMcB3s2JK3xZL0o2Snqz\nKwysMipfjxXcPUKXJ5b7SRI37jEwrQxoSaWh+NhskaJruo+8vda6X71WNFI3\nqwwWZ0dKX5phmWE8mChz6PokJp+ChrhGkM0MxHpon6LIfY1IYjQSyqzmCQul\nswvbmvhqV8MI3t+FB/IabWgJKkGQHbg9roinad4Yz5/qFAKCn7mY0WLYWjGI\nQUFPeJ5tgxZpM3ADiM4dtdi9+n2/OYn5vsxWWFL8x4mrpEW+fe/vIrrL3hbJ\nMwNB\r\n=TP4l\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICM8rURn5sb2U/KLzW8QLwxzCsMS2OyXkteXqYdfC1XCAiBrnjQLm3/OoeFTq3Sg9g7O6g5RfANHPc4XvEPK/ptXqA=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-dfa6b35063884847337fd617da2693e0bd7b558b_1593640321220_0.5810490783368272"},"_hasShrinkwrap":false},"0.0.0-2b15a77d525bb985a3e3dcc4739853be14aefb79":{"name":"type-route","version":"0.0.0-2b15a77d525bb985a3e3dcc4739853be14aefb79","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your project. Find a full <b>runnable</b> version of the below guide in your framework of choice on any of the following pages:\n\n[Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) · [Simple Vue Example](https://typehero.org/type-route/docs/guides/simple-vue-example) · [Simple Svelte Example](https://typehero.org/type-route/docs/guides/simple-svelte-example) · [Simple Angular Example](https://typehero.org/type-route/docs/guides/simple-angular-example)\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route).\n\n```bash\nnpm install type-route\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { routes, listen, session } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect to Application State\n\n`App.tsx`\n\n```tsx {7-8}\nimport React, { useState, useEffect } from \"react\";\nimport { listen, session } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  const [route, setRoute] = useState(session.getInitialRoute());\n  useEffect(() => listen(setRoute), []);\n\n  return (\n    <>\n      <Navigation />\n      <Page route={route} />\n    </>\n  );\n}\n```\n\nRetrieve the initial route via [`session.getInitialRoute()`](https://typehero.org/type-route/docs/api-reference/router/session) then subscribe to route updates with [`listen`](https://typehero.org/type-route/docs/api-reference/router/listen).\n\n> New Type Route users often wonder why React components such as `<Route/>` or `<Link/>` aren't provided by the library. Read the [React Components](https://typehero.org/type-route/docs/guides/react-components) guide for more information on this topic.\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { Route } from \"type-route\";\nimport { routes } from \"./router\";\n\ntype Props = {\n  route: Route<typeof routes>;\n};\n\nexport function Page(props: Props) {\n  const { route } = props;\n\n  if (route.name === \"home\") {\n    return <div>Home</div>;\n  }\n\n  if (route.name === \"userList\") {\n    return (\n      <div>\n        User List\n        <br />\n        Page: {route.params.page || \"-\"}\n      </div>\n    );\n  }\n\n  if (route.name === \"user\") {\n    return <div>User {route.params.userId}</div>;\n  }\n\n  return <div>Not Found</div>;\n}\n```\n\nPass the `route` object from your application's state to your view and check the route's name to determine which component to display. Inside the code blocks above the TypeScript compiler (and your editor) should be able to correctly infer the type of `route.params`. This allows you, for instance, to access the `userId` param with confidence in code blocks where it will definitely exist and warn you when accessing it in code blocks where it may not exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` property and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link for a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more direction there is a full runnable version of the above guide on the [Simple React Example](https://typehero.org/type-route/docs/guides/simple-react-example) page. The \"Guides\" section of the documentation has detailed overviews and examples for most use cases. Additionally, the \"API Reference\" section has descriptions and examples for each part of the API.\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"2b15a77d525bb985a3e3dcc4739853be14aefb79","_id":"type-route@0.0.0-2b15a77d525bb985a3e3dcc4739853be14aefb79","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-/8+n0zy+l5Q+cpbZphBWJk9CXGTgXxx9RgD9RpznGeiE7a1wvqRUDtk0EmyTfaPPfTOrus0Hc/SokLQvPqnppA==","shasum":"529de367f73c4100b23b05716331fabfbf99ad3f","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-2b15a77d525bb985a3e3dcc4739853be14aefb79.tgz","fileCount":53,"unpackedSize":1158321,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/QgmCRA9TVsSAnZWagAA2roP+wcqev34k0DFOHG5a9wf\nRnmDqSWsC+XkqwmPn/Ac4mAHyDfNVAYC9rGcWgrk7OxbmYJ3DaiLdbwBTViN\nPDoCVnJX7A4BpuGP0bHO1wuQG40o7aqnzVi3YW4nNgqTjOROc3GaJdPtEf9b\nzPGC4EGVdxUB382QnxTzn7C9JFvLTl6wxp8D/Mf+RMZmqV5EGHnWR+fAs3WA\nPTqqq8CUPcMo9cmLbiu7gHMeVUdbI7RJ47xdqnulw38GiSv7CiwUDVneMTcY\n3s+JZOg4QzZ0ojbLiHcHobK1ZPSPYQk/TcDQ7Oj3uif0uctEsRpEwBpCBsYA\nvBL4I8L0f2aP7xjm2rYu4hkAbehjrMvotJEOfcU91HAAOf0xdUneNVw0fRMj\nRP6nEAw91xC1J4SdDGhI6zcor77BD9Y7TstZ0ymfroAo0qJpFXCDl7KUcgBU\nmkYC2vXKXFhQtDsKeJKFY6QXXMv/L6st3h9Kqmc1SxzDz3goxuI0sY+JeOnH\n08oiCtNm2Ry7vzKWKZlFe3zSydvR3zN1StMGQNI8sb3No9lvkH4uAMfYoifa\npJMBAZhs3x27qybcqB/BqsI5mUdF+Q8UUQPLczv/R35tV4aqeXFlEW8Sk5xp\nj1ONwHi9JQJJgOpj5fv8rPQPQYhaNj/bx2JsluA/5ayAMNwxeEHdqKoqanry\nffpq\r\n=U/91\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHNyp+4lllGUTbsCrRN3wFd5TP+Q9n6LBDPRhgc1QMIpAiBCWm5t+OGXV6noYlK2gj824VCFnYBkfIKyiATUhGL0Kw=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-2b15a77d525bb985a3e3dcc4739853be14aefb79_1593640997803_0.6980202502770438"},"_hasShrinkwrap":false},"0.0.0-7b03819123196de81db602fd6086a269bf75821d":{"name":"type-route","version":"0.0.0-7b03819123196de81db602fd6086a269bf75821d","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"7b03819123196de81db602fd6086a269bf75821d","_id":"type-route@0.0.0-7b03819123196de81db602fd6086a269bf75821d","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-cE87kCAVtbtAPUMVnzDcI/W8OmXl+oaQWfLtRYX33tLp9u7I3A4Z5ckHbw8apoSKdBb4PuNppBTvDOMu9DWR4Q==","shasum":"95a89f9520ebf33bb84cd1601b9e33f32040a895","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-7b03819123196de81db602fd6086a269bf75821d.tgz","fileCount":53,"unpackedSize":1160014,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/gW9CRA9TVsSAnZWagAABQUP/A1cLvatthnZ68IPrLq4\nnTWqZ+ZHUlVX+jxo8UY5AuxXdxtgZBpeqL7k/+X55NrskWGWJzaZgrxs7ghl\nZ/CRX7+87h1IR9n6mpTFKu5RTMKJPeShp4RRlRZeQSsIoXtGs/4y7zS5qDei\nZ5bnCwbQKV70pLBHHaUfCpInO7xoyDJPguRJMmCzIfghy+XL/4PRjHKJHnPQ\nF1iEU5QGiRwMh4pG/H5LS0ezH412uSu3GMHuI43Z7a5GAi0umVn2cwfzew94\nv5vAgFUEqujp1uXHK5asy9d/32bmwW09jeyXzEdB8y3Tuf0FZXl+sLdh4phb\nwQLfryrUq2+7TXdOf2xJEfgEsszD2+KfxOC8Nl4aLf2MCIb07yVA4kSXJ4e/\n19d7cObqVmdp/Ai3+AXxw/rD4zz6EGzQkoj8ki8ciUzyG5cZrv3Glc4YBFQL\nWeOo0mogdk5O53nlGRYilD08rb62JPS/Uo2mBtlDgwq7oT5ORp4MH+do8SCf\nce5UVGvvspv7NlKOKnOBy/BlSsr/YPnhdNXmSkNbd+CDt+kYHDxivVOOwphF\nljTi41L1F5+b0BLkbYEOobgnsl3qokaw9btHPQwbANcUWk5AWqWwD6SutBq2\nZPKsZ1Gp2k9ak2PI5+kNw+jUD6iZzo0Yl4kCGubusCrDrnYrj9+E/CMq+7KS\nota5\r\n=kKPG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC4PVGGYWjOekjmIocWISVkFgHDvSLVI/R9WsIetlX71AIgdfm3rqb891Nm1hX5DLks6v/lEHPRywdRhtDKnKIXZRw="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-7b03819123196de81db602fd6086a269bf75821d_1593705916988_0.11608414378352983"},"_hasShrinkwrap":false},"0.0.0-402fb3979df7649995ba477d5ee6a06ec828849d":{"name":"type-route","version":"0.0.0-402fb3979df7649995ba477d5ee6a06ec828849d","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"402fb3979df7649995ba477d5ee6a06ec828849d","_id":"type-route@0.0.0-402fb3979df7649995ba477d5ee6a06ec828849d","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-3JWj1Xc8SMUu99iTX9kmjmcpJ4sXe0A0H3XfW18wz6cb+Zm8Dx2uDq8UynH2ISFVP1stddcvXTffu1ZnAG5FEA==","shasum":"79f4c379d2ee0962b46063f2a30cdb3f652091d7","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-402fb3979df7649995ba477d5ee6a06ec828849d.tgz","fileCount":53,"unpackedSize":1160666,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/iPxCRA9TVsSAnZWagAAIxQP/3m/+ZQGhSzaKix5riLA\nFWGVvlgvLmf2l1/B36Easy9PiWneUUElnw3XCW3vVBoNMplFnZ3d4cMIPqaY\nG8xohkI8KaMPfz68n2tqzFZ5gsCZ8oWh4KXBry8p/AEFnsW6U354C9Si1C73\nNbgI28wsO+MJBOAL4gEFAyWnRLMRcNqAHUdJpGdFta8tmvq2OnqdNE0y3VbR\nLMMCOLkWQ87yGM/NMgmEEWDBTdL5Y06ziN4IJUGs4CfU84CgnMO0Q115C2Nq\nIWiTrtQntclRCx+ayJdzkFcnZd1klfACVJQoRLKBu6vsOrGEV4WM5CBTHYvU\nFOn6b3PsUPGx/oqvrYQBZXNnRtsoVVvtuAbuXJM3PC/VkEcl8kXZfXseyHPd\nla/jRgslUaBXlkDP9QuQfjQqH/XDynVEby28hKKd43vyLG56AAV4brKUdW3M\nuqFUQwjywdWDsHubLzNNrccrkf4kU2oN5ObrHHN7gNY+HBv3oT3Wqrht2vXR\nYq38mbHPR9igvLTceZaU3rlk83c8vv1ocknAaLmWysK6dqcLGee6uDr2LVS4\nizCGLHb3FC1X6XA/sIp0gNTCZif/QwB+BC1CFpYC+tqvu5wDHW65PiBUcLyK\nzr8/xK17zUjBAimLgLH4KJ3zEu7IZeY5a7fRLaKFqUS2kcJ47j4MFky1sjjX\nKQny\r\n=34Xo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCgEyehnuDy+fdJktkQNP7OIZmS6XJTsx3069mi1W339AIgLL3YflleekAA6pZ6hr5G/hjZIyyhmmF9cUZGW1FIlxM="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-402fb3979df7649995ba477d5ee6a06ec828849d_1593713649060_0.05958338601815827"},"_hasShrinkwrap":false},"0.0.0-da9207cb2a91830ad8b869627116d1d1476ebf33":{"name":"type-route","version":"0.0.0-da9207cb2a91830ad8b869627116d1d1476ebf33","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"da9207cb2a91830ad8b869627116d1d1476ebf33","_id":"type-route@0.0.0-da9207cb2a91830ad8b869627116d1d1476ebf33","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-nMK7rjhBnI5jHbF8BlEvDSaCTKmyOzqSnnCHH0LG7sYoVdGoZ4kgYH7+ogXZpRCeJIrfRFXvV3ywUuUUjFtaCg==","shasum":"d3a5b9546389890b0e5f4c0158217ef803b45a1c","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-da9207cb2a91830ad8b869627116d1d1476ebf33.tgz","fileCount":53,"unpackedSize":1160666,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/jIUCRA9TVsSAnZWagAAMAkP/jP4zvgiS2Tbdk/W7d5M\n1EF4vX1IdW6Y28YVmhVtcc73wRlnttaVcJ+ypiTgZM34Cay8iwtwJChCF7J9\nhI/5hP+8WYaxLnxPGtzvkuu2MMC6iUbMNkjXVxophV4I2RsJhNH/Fk7Je3xV\nw1Kw/Hb+GBMgrrtZBivZ//AzjNDqQXTncUJn325/2EJhZN9HXWYT3Hm+xzI4\ncEwoE4TCXLJJHs9fEvxaUOPF+MLP8HDSEjMcBmUfBJv/poL/9jGw7yvKmDkl\ntw9XHN8+wN5Q/rSSazGNxag4lMCwnNBtli/oIFuA1BzrPUAP0UFkzNoKc6z6\nDzJ5RuFesSZaW5lIfk2HHhBCaJhYzZR8kvNkfRMXX/b5gci2et4WsBCk54AE\n1hf69k3/y87KkuO1aHeEhWBnqvNcDi7yIwL7TLHdqiGpOMwvrNJ8FE29GCct\nqb/q6O5R/aTzml09wysHkP6DLfTniCucNX6oyHHHTYWR7hZvDE1L2lMu10HH\ndz1Uc/MghLftkCv7gji60N0xg5z2+xqZTlOQiwfjomsReAfc47LB14tSjNPL\n6eMV32wD2FaRuhjP+uS4aL+REvmNVN08V3ofxKW1HUqRhl+ba8FaW0xR6Awq\nvULGG8Y5hbq++K3r+poxq/04nCAmEcI8XFD/jN5I7zO+FEweYu9h3p6hPfBP\njYov\r\n=d5gX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAFNsMZzdkjSyqJlmGFKq1r94qMtqQ6iGYC/lJfXIFMHAiEAnakive1W5nhOcKCHlmgsxEYChJI8I1T47GhN+hyuXYE="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-da9207cb2a91830ad8b869627116d1d1476ebf33_1593717267713_0.6170163582082862"},"_hasShrinkwrap":false},"0.0.0-3eae256a49415d7f78ad502b948083d2564f2608":{"name":"type-route","version":"0.0.0-3eae256a49415d7f78ad502b948083d2564f2608","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"3eae256a49415d7f78ad502b948083d2564f2608","_id":"type-route@0.0.0-3eae256a49415d7f78ad502b948083d2564f2608","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-I8NqIizGWkk/AQuT2SvxoBwpQVBFO6t/siEqGyTuNtnigLIiXbDbtY6xpJI6BSTl7OF0jaSBsHeE4NwM4PqGVg==","shasum":"acff470ba136c4d52760a2d72e318c382a59e4f2","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-3eae256a49415d7f78ad502b948083d2564f2608.tgz","fileCount":53,"unpackedSize":1160666,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/lD0CRA9TVsSAnZWagAAdQsP+wfJz5nA8wumVSwWv+l5\nzpXPEimAo8Sd0g68g9PYwOEH1gh0yPZ3KXRFP2htuu5l364GnMlGUmTi0Sfl\nz0JE7rt96kDTX2mUpBCSUgz8QBCphdc5lj2yYuJ4DZ1+2R4JDw0+mOd5ztU1\nZYaHfH309SNBkq5vANbrX/+2R7kYRZ0BApyrg5ngG+nO3jIsGpf8MRtsqAp8\nBEWqaI2s8tXc7PhW0FhwVgD4QUsFSJiG4i9RmYupIVvGrMban0vm3KMQfV/L\nHg/uMYsJ61gsKaZl2U2HhPLW1vVarY5NuLFA0HPRc58WIpg4yYfDr2u0EsEK\ngoCM3pSA9zdErTOnpHg3y6H7ve6cAoPYp7EySpbGIq62l9E/J7weCAyUKZBb\nItD04noXQihF9J7XZa3cYEsYB6Aq1kkVVgVLpT8x2uHKGdOxqBF5aWzU2zHQ\nnQgIOdHMZ6Ajreu0bljxmZDHSao84CwjK4RFYfTtCVw8LuWNdPrRrSrjrULs\nkk3ZUwHk4KwFA1b40k81WFCzneOOz2B6dE1BPRiIeWRNNYy1URwcRWXxhGxu\npeuV7xu4qjfMNL3akcyS9BPDHRS7QO+4h0urpkZYlSUXzXwb2uk1HU8QkvFk\nMh4yUfZAvVmvX3ERnr8Xl25BxBY29ekI5T6McvoSmpABJ4uIPNuB1FJI2vu3\nJHHF\r\n=L2j3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA9E4db7sQIafmtB3WhlbKthQxmBT53ALdHU858eVdZ0AiEA5VlT/1ymZ0eQFc0eMewucqW0k9EL2nlQQ/3oETmfUZo="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-3eae256a49415d7f78ad502b948083d2564f2608_1593725172310_0.6512505667726156"},"_hasShrinkwrap":false},"0.5.0":{"name":"type-route","version":"0.5.0","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"gitHead":"3eae256a49415d7f78ad502b948083d2564f2608","_id":"type-route@0.5.0","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-BIIQ9b3Uke5rbXlxOcEy1GsiXNJieXdJsGXIV2VJ2NKqA8puwSkkdG2rGTkn+fYrJHdnSga7s2Qhu+5k7sqEvA==","shasum":"ced76147b2c2c73498b067893bb3575b76945ceb","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.5.0.tgz","fileCount":53,"unpackedSize":1160625,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/lEmCRA9TVsSAnZWagAAnZMP/jc9dwSqeKaok3Sf93Py\nDAaNHaZiCuYyji/0auXzlJyz2Uod4ToStwuE4zPNZdVExazS2rF2X71uRpdo\n0c1KNgHWk0Zx6GY5Vwl+H/mvRtPgnweYGYi/yTx9jKkpumfKdCjEBMLeo1Gt\nndAWxGJ7e2KtFDDyxABG3bofvSpx65iFqCCLLu6c+5fYOsdVa/3h6VHkv0hu\nU7rCBbX76pDWZgAQinWH/3s6wWjydWwWfgVwFsJs4a6440Uk/cuX30Yfj49y\nBLhzFpNBv5QlYl5Tg15s8iLhruz9gZl84WxEKSLe1+AXJI/RtO5zgZvoRcFV\n98N3y/mCxLHqiKxNTbO5jRDXBb4FX4uZdofzPpsvBw11qcSMfTG4l917oDmM\nMghjOArgc5dmdQrQ74mjHEl8/6ZW+gnvEIeIQWLFCqpcKojwBMFVyuFlIZ5W\nYEAwsAET5EFExKEblg3AtuVZlUBjPXqQNPdgD4v6SSpK1NIe8YDOBK7uNdWp\ncGMlRkkT8UiCVxzTGJkB51NezEYy0sEEVbEaAgq/r9JTf2H3GCx6LfS28TYG\np73V3Aaaoxy2vnz1TUThTcuO5ftVO/wWIBikn1IgkjBBEBFAhWWcZXhqlMZt\nYZHPTWbIpF5XWQMAeLJjTZ0hmjUAJEfjc/W//iiQIS41TzC9AvWdz28m+WPI\nEDSW\r\n=CQfT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF4GmoQFLk8n8oRHjvEHJKZwvFzcc6UaJ8ktQm+UNMPhAiEAtb8Ha6Ru4zL1ynNCgOT3LIgnz7ELAn4/yH33fGAX04Q="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.5.0_1593725222212_0.6967023900430229"},"_hasShrinkwrap":false},"0.0.0-b151bfc848e629064f141036726e870cb488004b":{"name":"type-route","version":"0.0.0-b151bfc848e629064f141036726e870cb488004b","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"b151bfc848e629064f141036726e870cb488004b","_id":"type-route@0.0.0-b151bfc848e629064f141036726e870cb488004b","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-2IW5ayyBoXIrwLplEoFQwB35ISWELQqfzbK1oQy2xyFQnVZCQXZniFbbFopBUqD2qzyyUpgT6GOyvSMgsKm/aQ==","shasum":"ab54fbbef5f48dcc0760a90721f16cdde69bc8dd","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-b151bfc848e629064f141036726e870cb488004b.tgz","fileCount":53,"unpackedSize":1160666,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/lKfCRA9TVsSAnZWagAACIYP/joLfibniLFbCrlGCxAy\n7rMbMqhFLzS8WkUYd1hU0rGduFAtnv5uv3XTvKnK5wuJRhI1gWE6+c40ZmjI\nvWIEtR2nvm4mAe1fjKualX7zyVm000xXv38OsPdI+ZYrWKf4rnPsTqIaIFSi\nu5d2uX8yjyN7TPKDyULDBkp5dveWc8I+Dr9mbyes6+oWfjKiux8eqnRz9nLv\nZVtZbsn9cUBDDg/qjzMvJZ7ZrSYCCfnMjb7idkS0JtF2LgFGw5osnlfc1ZEF\n+i0oWlOItH1eyFLYSG5VDCPesQS1Lx/SC+d4+YKG/AWZy3GFbjfHFn+QOkkS\nV8w/MLfzS0mcCrj5Y6DeSuM8ZRym1WcT9eodLMgter/Qt/UA8e8ajI/PX4tz\nPpipTsDD61kl1MlHgQVHOSLtKbkH572/RIRxmiBNZBa+JPU+0rfn6WAQ8U7R\nbHlu10Q3aL1sRGMvxCiRqzCi3y5tSzdjz2+Z9vzI9gsf49qStwd26jIxkl6K\nHxV2jQL/Y3FoISPelSkFZNq16F2evAYE5Uf2xQl6y6UgUq+FVN1bAFseyjl6\nO9JdQtGbyL3/DK2mCXOUyaTTkexHlhFCN5qhW9eJTnHAcm+MdvLaYSsROjrQ\nKcHPPP/ONP8hDQ8NI7Zl0s6Ta/GplX6nx+blPAAmOZC8zFYZq2I8ikohko5Y\nQjXy\r\n=oANg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3ZdScGh0uox7ih3Fv79aPObZYlVJC16XrnG6dYyGPXgIgfoWE9kZpXaAjhhdF2qOjSZDD6RLvt1lWlmKhE7iOzfk="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-b151bfc848e629064f141036726e870cb488004b_1593725598763_0.524287266094277"},"_hasShrinkwrap":false},"0.0.0-c162abec91fa1143cf084705537e1c677e930296":{"name":"type-route","version":"0.0.0-c162abec91fa1143cf084705537e1c677e930296","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"c162abec91fa1143cf084705537e1c677e930296","_id":"type-route@0.0.0-c162abec91fa1143cf084705537e1c677e930296","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-H7cS+apoA0Gec9MoOi2M0kffjKVGoiJIdPf4wEON9qhZJ01E06e9RofoDHRCoTOULX/B1rt+551W0bQn3FQCfQ==","shasum":"6e0fd2cd204656dd7272be44bc0658feda2d469d","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-c162abec91fa1143cf084705537e1c677e930296.tgz","fileCount":53,"unpackedSize":1160666,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/lZyCRA9TVsSAnZWagAANw4P/1ZlsyFePeOV6lvBbExE\nsCyBq8uSw/ggbt2NPwf2Oxb4CKthNpX9vZhdhUTB2uu2iohKW0qm1IVeIOKY\n5Xkz4DLjCc2/QeKal14Iy7X/xo3QGnPlRtFDSfM6VXLNnbOu7PFgCzO6ywAd\n2UMCFPJetLD9vjSP1eKGy3gm0c8OndwG5e0zDPIbj+0Or3HJ5eBOLasE+bzt\nnaeGVbL1j2PlwkejNYZvb95guilLanVQobzoRCdVHE9P2kOr4EX0mRCykPBY\nODqeh6fhSyJ9NqDSzL+WxmfpyrC/y6wSudR8yrmWim2wFFqOpWPEYqautp9m\nkfd+Kxw+gH0HK1yVpy7KbyX4mtu8GP3YnfyQpnxcQB4i+iz5Nd5KWvQZpwSE\nI5kfARipHH8NoRpcaVJoAEnPGlqL4LMmuPIgx0GMuzwf1hteQVmaFmIu1J67\n6hiJiMQfw2YCcy5Xua7Eqz1tS1vWfMjOkgZvQAsZEE0buW6072TuDWZtydOn\nH1fplFI+W+OwqDNqgN7VekbJx6w6n7p/MQmMW7Z7x+HOa7hJbwg31GGjwfdp\nkRW17mrfOEKoMLBPpImbNv5TKieYTGYD7UpxkY8IYa74cTvGQG3ejDWztTpy\nYFXv38IBTjT31XyTht2wfoiiqfknTcSBljLKA2GchJfRwGkxNMffH/ugGKGb\nuFHt\r\n=mjJJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC/yP3vLTd6bugtVmiyLzLfhM4AvY2QbcKAqR3p/iCu1QIhAPzNI97bEi8k6yIEbSvwzndwch5s4Jk0g8INFOpVYX2T"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-c162abec91fa1143cf084705537e1c677e930296_1593726578424_0.8481195011631761"},"_hasShrinkwrap":false},"0.0.0-7fbcfd08524aa421eaa8d7ccbd0226b5c302fb51":{"name":"type-route","version":"0.0.0-7fbcfd08524aa421eaa8d7ccbd0226b5c302fb51","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"7fbcfd08524aa421eaa8d7ccbd0226b5c302fb51","_id":"type-route@0.0.0-7fbcfd08524aa421eaa8d7ccbd0226b5c302fb51","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-YeDsL9bIQ+1Y80ODw4RLuOloJu8/BHuOuV6CaU0uNJEuqS7Ju0Xu1EjzQJzUlILomBbuUFmNzdbbCHKTBel50Q==","shasum":"d27f85f6262e8a34deba3cce41f54e4fe6e7fba5","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-7fbcfd08524aa421eaa8d7ccbd0226b5c302fb51.tgz","fileCount":53,"unpackedSize":1160666,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/likCRA9TVsSAnZWagAAmqIQAIkGNWue4/GY8nHaj+XQ\nj3h+HlpBb80h9WDvdKFgHW4/QpBoUWAHe+NP+lmeF5ddg669AOBR7wiM4Tkv\nk2mI+5EL2vGMIjru/VqBEvmD4qDE5x1VF5NOJATgRxQ+hYfRKOohWJXmgCEV\nQEbQqdkZxKJ5JFkLqaWU+nB43J3rTR0p1NK0OdSPAzFprilm6YeuqG5araT5\ncaK36KJEDfEuXOZj/ydMih+JJ4b9QAHPSt5ptZF8yjphfnOtrSzAsTHAJXP8\nAGtDU/46cPg4KeCCyjwbz40gPaJkODtWbroTFT/xUn/DMAU1WI6PuBUNoI4h\nrd7DyfdBPZopJLwPPIozPNytuzUB6a8n3DfjBSLMj4Fp0SlTENne0nwpDhEq\nbIsalm3BO0lSwCvM8OZDZwVYr8bvgF0UmVvquS4f5XnfdkCPedbuMz9+J9EQ\nEXkOYVhOfC+yzeie0wAaQ4obTsfGn4EebdbDm5jos0pOfBm4fMskA4/kOT14\nIuUP1392QIRCrLWfCv2BvqqsB4Q74WQhxKSkvfP02XtM4ZfMYuCfnlw5jU2P\nSaW4aIT7NvgvP4iCHWXLR3HzyI1It0whaRjoN62u6ezhYmPV9FnULNl3SD2e\ntOLvroHMUpMxXN73L9wEGRnxkk9Q01CjvX0uOXj/jA5Cf11Lx1RHCrotBvEn\nWwsD\r\n=ixOB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDNjU7fl5MzbUFxHMwTty9AjsTa8z5OwCUjXTLWFc9q3gIgUrf8eUOw2/M7GeVFW4lpBL2XfaZ9m8ZwcGB3GG9TVJU="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-7fbcfd08524aa421eaa8d7ccbd0226b5c302fb51_1593727139700_0.2770594654944145"},"_hasShrinkwrap":false},"0.0.0-8005fe6a238db3fff54c04a4a71cbcd6eca0a6b3":{"name":"type-route","version":"0.0.0-8005fe6a238db3fff54c04a4a71cbcd6eca0a6b3","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"8005fe6a238db3fff54c04a4a71cbcd6eca0a6b3","_id":"type-route@0.0.0-8005fe6a238db3fff54c04a4a71cbcd6eca0a6b3","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-WZUx9hfgqqGdpOhdqLin6MBNeagk6e+t4w0ByRsYT1RUZYb11PImIlR+fdlza7FtWV61ExkVaq/9OQTg4TjE5Q==","shasum":"959577e781bd702c144592b7eb3fef4ab014db73","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-8005fe6a238db3fff54c04a4a71cbcd6eca0a6b3.tgz","fileCount":53,"unpackedSize":1160666,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/po/CRA9TVsSAnZWagAAXHAP/2qn8qJOsSq1Xz+dEgkw\n/Tu3zKJ1BLkk58GnrQoFKlTeJt3Ivdx5uyKLMf/qNYGWTZGyQD4XYBBUwd4V\nwBeSgLUp6cXyfKS9UGccFgimtEby6toccoWrGOmfkjNzAyZzPwFILNAaI+r7\n1KZftvqdjmpjSsfn02FuzUhd79Wvpn0IsLT2PQ4rRCevXnvkTPiBOOp5iKe3\nutaFbO+9/3l651rLzOiLnyvi4qnd79HQUOC0nC9cDvWiNmXD5pCKrx1cxMEk\nrQ5/QdClsyF07keJ005pYoKpQVY0EF1IS8Bt7RrTnEIQSagAoiMIQgCYTX5N\nzuz2e9x7yKzCOlRsVYqKgmn2tm/KHXcr5X43YiE5TxIe3+KMNw1oWuDpDl+l\nvuUU5y0fofNt+3KzAXO5I1/cBpcqMwb/yHUItviFxB53NiOvj3Xszt8XDF36\n6LpGh88fhfH7jYxaiMQ9s7d85GijnyRKjzPd8Q1MYcFm+kDTcb51dNoAor+3\n5Z4hesYiSwXoDuUhVC3OwWpSE66c3FXEw0kR9k1on3dHwELGRKlCnYOpHOGM\nOL3g7eyYCQLluYHfEHvhvDi+3LiHYyFGWUUHT9UKjjNhOBXWpRHc4O8ibPK5\n/PtYmIf6kMMxPaDE+jSaH6aPQAqzyLZI52JlOthJC+bIhq62x9JxW6ZWhYOa\ngSiO\r\n=8g+n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDB1OPLPOwnSboEd7pi5YzyJhd+m5exAx/OZh4oPOpVbgIhALCVPPhkamZwzesCAGwHwyjxdZJP/J/AZmrM42Ov3cm5"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-8005fe6a238db3fff54c04a4a71cbcd6eca0a6b3_1593743935239_0.3036254501307156"},"_hasShrinkwrap":false},"0.0.0-8825ddb08a59aedeb32bc3e44e41d9ba85be51cc":{"name":"type-route","version":"0.0.0-8825ddb08a59aedeb32bc3e44e41d9ba85be51cc","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"8825ddb08a59aedeb32bc3e44e41d9ba85be51cc","_id":"type-route@0.0.0-8825ddb08a59aedeb32bc3e44e41d9ba85be51cc","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-F5F2vZxrMKxk0+IjbldRXHRo+yF/L0/5z9pDZGObb6I1SgaSjQn5CFvWC6D6Z3aw0n+/EXIV4L0nyPc8TE7I3g==","shasum":"3c74d79ad72b1b9a22771744df763b2cad56359b","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-8825ddb08a59aedeb32bc3e44e41d9ba85be51cc.tgz","fileCount":53,"unpackedSize":1160666,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/qIWCRA9TVsSAnZWagAAnjcP/2+b9HPVkRvZKug9iZdm\nAi710jtQIFO9sU9ZmzSLKerDZSjzwNXyZZZQtoKq1v3bY+JDtL2StZRI6YCr\nP8zwwza4U+Lx/KJqZernCpnjY2rTrHceIwZH9xWmZIvWFHY5MGeSRzdKR1xD\n76jDzjtCJs8yT1qETPckEAHDUe6XHvAKzDYoRYNFr2Vy9h/rVP7bcQiNjORP\nxpUf6YRwZJ2OTxfJSqO71/AeisBOdnvlALlGOlGNPvHNal1xwnEGtg5XD+TP\nom4VvkBIm6x+d2bzU40EJl9+/BERL0EdMbQojOLDV39oZg40SWNy1/4rZBl8\nDgi29YdiFPJXpqVgUX+uzAA6T77N9ICIv0SzY7drr0A8DMOvWKPCCYbh0xrM\nx482s70aPB+DOUqnAU54G6Gi3kFh0f/pen1/11Xa9/7ovaJI2SPsQtNhYCOI\neLV+RKc8d3L3nfrRyyRx140tn41qi4M2MZbSOK5NBSWFFov3jjCRcqnWyHiN\n9M4OOldvmPaa+hYYwqNol4SjnJmSUEvQe6rUpuxZClVUUXFVb/l9s9Uqnko2\nFODpHUUn697y7DVNOcMD2cKdEw+mQS6DLcnxQwLfQtpsBQZtS1N0yslZzbsA\nQzRr3mm3yLtczBfpUx+n6Fi/P5n41ACN0TOS49gMn31MLSzYNG0UhbEmAkCb\naRUV\r\n=4uxR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDclLfDr4EJPT4vAD6TYlkEoTIkqcwmpADdmyY3XYTIoAiEAsxCT/I5eMMDuhlK1mHAO3KxEag7Emaq8SkXesVRwyug="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-8825ddb08a59aedeb32bc3e44e41d9ba85be51cc_1593745941928_0.64379417439329"},"_hasShrinkwrap":false},"0.0.0-8cf53614ac37110f9d5ba81f95116ff5a1ec28ce":{"name":"type-route","version":"0.0.0-8cf53614ac37110f9d5ba81f95116ff5a1ec28ce","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"8cf53614ac37110f9d5ba81f95116ff5a1ec28ce","_id":"type-route@0.0.0-8cf53614ac37110f9d5ba81f95116ff5a1ec28ce","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-/Wh4GM8YLw+wAgs+a05rn7MsUmhQ9jl9ghkmmCpwRPDbW0k6MxXjfcGkPtCaUX0DOhnpBAMSblQr2HBSmOco0Q==","shasum":"c002158d8ea3cbd5445fc73cb0d547ab9a1d50d2","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-8cf53614ac37110f9d5ba81f95116ff5a1ec28ce.tgz","fileCount":53,"unpackedSize":1160666,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/qepCRA9TVsSAnZWagAATCEP/0AtlucBJ5ZLZaSfLM2m\nOU/xHr8AX2sjl6akATb0Y1iY9imAPxFHhQXoZUUFWmbWIAuxDIwj6W2VoHr9\nO4WTTov/H+YKRbS1OIVWY2br/sWAA18JILa6GXF70SfZBQE9wKGm2tbc2alo\nhQL7A2v52Edv5fTuqGAGgyLO8XeHD/hq13xNorI7WEQBMsWmy1/bP+IuUAhH\ncTRq1A6JonUrZPmxp0TOqdvgJPp9qR+JGiEq6hHq6OwR1HPhgb/4bqIa3R0C\ncsZgUgL0cNixV+XiU2yYL3sCxhXfSQEgf4bUD3cB936woioYlfmEG+Qhm9Ze\ngW5IqvORqZbECqFleXmEwx4mYJ3oSTQvP4iX9AQ3+x2jjVnSmDP6MwS5lDRz\n8NeAIbNn6hIstKVJOasHLkcuit7xN2g5o/kqvlML8FbvOIFTyX6wQqw/ociI\n8v3CRIYMWPL6Ih17JNiYMCyCFuUbJMIBgHkLD6VOVi3Y0XED+tqOcAYM2P05\nrY9JYGCsh8TZ5GdCwHU/Nodm5S+1Sfbtcf6+nxP2BIL/GswnSGwkKVQ++eO/\nz/YxCJGuf6nLnjHFfp0XYed3q5zXzsSSGLmW3smnvWmW83ty2AbvIVR9eHKz\n6ew6YcDxSfCfNSi6Gim9bmKVPoxtd8b9JuJTYlIi8HK/8lUbXflgrPaYQjL1\n3V5+\r\n=94Pd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCosv2x8Uh4lr+XrtqTMtlAi/0nPJMFmloM49w6j5O4cQIgVAQkx9nZTPYYUQHe7nZBDYCwrickGiquJDtJr9GRjTo="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-8cf53614ac37110f9d5ba81f95116ff5a1ec28ce_1593747369273_0.43956923852435414"},"_hasShrinkwrap":false},"0.0.0-1be723410de67de29384c65ce281930eaac8ac7c":{"name":"type-route","version":"0.0.0-1be723410de67de29384c65ce281930eaac8ac7c","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"1be723410de67de29384c65ce281930eaac8ac7c","_id":"type-route@0.0.0-1be723410de67de29384c65ce281930eaac8ac7c","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-ae/cMQpyxxDwURK/c3cxiKNBsfMR67CJ/U7+W6GgSoMmNpiB49jtJpTP0k5HU7Zq1tbMbg9VGF0hOzXkkcdx4w==","shasum":"42800cd2f7390ac0c58dfcae37a738a67ec022c0","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-1be723410de67de29384c65ce281930eaac8ac7c.tgz","fileCount":53,"unpackedSize":1160678,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe/rnqCRA9TVsSAnZWagAAsYcP/A2fGcG85Uiud4RtX9Nc\ndhGST7rbfdVUCPULRGDmenPoJoGwTllhvJAJU1nxFXSu/CyAuC+4vGa8znaf\nCBLGf+UxcgAj2i9wuUjFD2DyU6tum9dSXbrLXE9rxFIJWHVoz94kb5Pt3sBY\no8OV0ihtai6Sl3zkhPi4eHfBdeYvsI6olWXxO3inTQiQSNOv8ZJQ6SypVYF0\nd6U4Azhi1LQt/VX0jCA+PX1wBSPsjhchri/92ir7cwJit9W/cCjmnsxeN4Wu\nHOrZaEEKqGCF31mT0kLBE28YVsXK8QCddMvQgtZqyvBKhqQqik/r1sQp4lkP\nIuC8vKsadOVXnzcSVCCSG0q4pYHGuxNdhfT7YbCL2Pod4gavBguK8Zd8ucz1\n6ghXk2grjzTRNA3hTBQSv7p5npMFbBjg+sS4dE8Hy2MaPU96pcGiSIKLVrzR\n3nTcjpUEmgOZFy0giMkMXDJeNEH0DYHfsbfZ0GwqGY1fqjRy2XuYjHX8kjLZ\npZJbxZMIbgBlm37ciqEa1O9cqJ1+F76M5KqYg0jJx8wNzo+kebOWKDBFILi0\n+z9Z/7oWFuQEGlZvQBiYRb6+sx1+5ccsAZzIeXCHW95Eueg1Lbp4vU10QqKW\njV6Z12l149mBFjAjxgmYFxvIjhWWdmnczmwpUKntyZ4NnS6sCrCJUVCvcTVH\nuvlM\r\n=zvth\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD1Od6Yi/9p7PZ6U9TJ4wC/6Mq0FmyLHrOq9zlGN7KBAAIgYvf0C+PtJIff7QxTTzGhWmmrzgyYCF+UNk9Ql7WI/DY="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-1be723410de67de29384c65ce281930eaac8ac7c_1593752041644_0.9986125436210551"},"_hasShrinkwrap":false},"0.0.0-1e27618cebec9b65f14e45635e9e7e83a2abd50f":{"name":"type-route","version":"0.0.0-1e27618cebec9b65f14e45635e9e7e83a2abd50f","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"1e27618cebec9b65f14e45635e9e7e83a2abd50f","_id":"type-route@0.0.0-1e27618cebec9b65f14e45635e9e7e83a2abd50f","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-ZtWv4TLqNSCnJHEqppnuQi30wbHjcT62BMYeCDPfEGwx9J5/Pdg89iDfZg1dKC+qpwWTbv/JgMotiWI//nJ7Ug==","shasum":"c5b0dc3f2c840bdafdb3154f50dda27e54a87fef","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-1e27618cebec9b65f14e45635e9e7e83a2abd50f.tgz","fileCount":54,"unpackedSize":1171990,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfAozhCRA9TVsSAnZWagAAh4wP/0VgQ7V6Ks0tzrNobxnO\n9NpH/UUIo+8NqOv5FLndCNdD2K/DQ9jWhgYbdm/Kq1RRVNkw9pp4ZvapBTSU\nEDUFidVgG+OD8rcIjWDm1EAs1ovZJvI8DTg/+qi/eB9E8UUCpluB96i7h1Cl\n2UZS0Ip4SM3/uO3EglZJSGZpF2aCfMJiyxMeVqsD7W0EU5B2VcG3IqUIVCmj\n2IWtPU3BdyzbzN5Dc9M6deEifNujFHTYG/pIZ7UwqNMDdejMlykc6wHU7aSg\nXAWtqjEOfN7vkPBKgnT2w9F6YI971WEcmH1bw2BLrpuxcrBYUGQJM7x0HqIl\n4MiYIQ+qolHtHp18FEh8HHolTNpGbIeOM7fTSTqNSD9237qn9KXPjTPMsFKx\n/rA/NtQ6lJWQJsrQhpPUyzIEY4l5Hntr13rN7jDzF1I8nGBpdAVuZCbUeEYw\n5UTgq9KnYKEuVMRTTZ7XP4oYwZvYAF7wvABE8cmvrfdMovE2QNo94TTgnp5r\nkZSsa4EaXOj/RmkWPoXXAtIU5n89fleSHG+ZGzqRhIUa9talTBGYVnH+qLPw\ndEMdcCBd4LHPVTNY8Oy4/yjZHbaid/1+mO7RaEeLmsnAXyYL851P529CtC5F\npWnGcwx+bfmkubFwNKh+MCNrgdJS4DVq8JL2o5w938RfI1Yp9AVlKeqxe3te\nWWW+\r\n=X84+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEubD+QYIRDhpzWT7g7hEJ9hqlumWD3DRecVLpOiSzhYAiEAkE4WEGL776n226x3xHTozZ59qWCUp0YfViAooDUPOko="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-1e27618cebec9b65f14e45635e9e7e83a2abd50f_1594002657377_0.8637212959421523"},"_hasShrinkwrap":false},"0.5.1":{"name":"type-route","version":"0.5.1","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"gitHead":"1e27618cebec9b65f14e45635e9e7e83a2abd50f","_id":"type-route@0.5.1","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-7hayq0VQ/wBOAFKuFFefmkXmmybLqZyl9uO8DtbVmt00VZ7HNlZu9g0VmXrvoL0Lb/luBEl4QNszCaJiPcXlBw==","shasum":"b9474cbbc3a80b56c2e17d99f02c09be48e86b3c","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.5.1.tgz","fileCount":54,"unpackedSize":1171949,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfAo3rCRA9TVsSAnZWagAAqkgP/02/ScSiBI+Nz243T51W\nWx1jMMyy2/HOzo0UCFYhgtrslsCqdeeDM6VWP37gT0qkObXMa/uNQkwCMign\ngZlcvLzC0ztyYjl1IzGKiN10i7BvlvPYVb7aP3O+bc5Y6cyn9OoD6Kzya44f\n+TqlmFMeiKLZ0sQ0waUNHclLZJ5cDQOVDsaNYe261C3vKrE2Doesa8evO1gP\nHOL2RKRNNRzmMNZnkHWjhpbRIyP5WixPBOsrhHStP7D/Kkd3y0PBoHII3gRE\nCY88ELCBjY6ROgXCmUXnVAnD/RuoLZULEu+1Cl7l0G+SDyZaKavGSxN019/F\nvwCRb8nQwkAVzw0/HaCFZB2e8p9OCJLNVBfSU2pqzc9HEEIvF5xYGCAo2dKw\n+sSuXsQ70wOFPARwoMGoG5a9P/PbwR+G4jhtZFzJMetl4v2Hkmerf4m2OwfQ\n/iL++UgElZ6K/wZl5aNASD5x0JunyuFQUtwr6sSo+JHUJjUiTRDMad37fb9E\nAJbIHpq7KKYWvsctk3QTnDRzJf62Y27V4IH3QhK+VhrUtYnluLGlVJeU5xI9\nVdRhBE5qOQj33vfTIqqQZsmNXXG7KIEaLNstrBzRC5mbRvE4hrQaKIXPXeq4\nrz7yHLTHPwGAQRScY/OpDDLZ3WIwhT9DiikCIAW5IbIq3MLhp0AkfvAdED8u\nXnjj\r\n=h77m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID/IzODLyjBJBOrkR5uNx6dKGj8wKUknI0Wk8ogzMPMRAiEA04Bqvw8UXR5RJSEFbfqE7KdnGWe0MNG/OVUYaCgaaqs="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.5.1_1594002923334_0.88635254880659"},"_hasShrinkwrap":false},"0.0.0-b161b7b22bbe920e6637fa5eb6ac60dbecb5db6b":{"name":"type-route","version":"0.0.0-b161b7b22bbe920e6637fa5eb6ac60dbecb5db6b","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"b161b7b22bbe920e6637fa5eb6ac60dbecb5db6b","_id":"type-route@0.0.0-b161b7b22bbe920e6637fa5eb6ac60dbecb5db6b","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-cuWDoBQFrdLx2cjHLlChU9XCh80Ndm3IF4ObjBm1h+IcBBEm7+LGDqBuiUW+uMm2/TzCGo8L0VMjyxCMY81g7g==","shasum":"b635ab84b9cd88f18452028806cb8c8affa6fdeb","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-b161b7b22bbe920e6637fa5eb6ac60dbecb5db6b.tgz","fileCount":54,"unpackedSize":1181048,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfB34pCRA9TVsSAnZWagAAVLcP/i+Fvz8SUW1XrRUKqCo2\nW1dY2HYI/h5J0yP5Ql8CfxOLmL2VV9KkauvlgrRLTd3vS9xV9XHH2GCZ2K6V\n94UkNI9sPxgQqOKpIpZsKPlVQb+PHRxebQcRzLzT6PiS0nOnnInLzeFPX6xS\nCr9mwd4WUgdoUV6DXTt46Ar8lUibj6GrA2ZXV0zytEiVs3uCBabU3M26FTWf\nhoc3WpRdzJEBOznVx0lQF3hxD4aJS87ap0m8h7b82OWnmZWFF7uVUNt9KMqA\nuPchy8slFhPF/FJclNylBa2NaPOao8iDnPNmWmUWi/Xmy1ZeOBPWGBqy08Ew\nPg1QVr/eb0syQbJex1cHzqPeb95MQbY8u7C4eGqNCr5GIX+KwRguB42ZtFi8\nPCu1/gblApqrUqu7jGcQisurx+YAxyuSfZVcWi34S563b0uw34Rquc4HVrtr\nRrEXAYBeBzFn8B8fX5HZXW3g4hvPuvo3HetNswoLMruPW819XzawIcd5fLub\n2Jx1M8MuvbOIHIzBCj8fSx4F4c/rcVcJ+aJkNKPyaBuAEW1IXuTMn9oGICPw\nF6K5u13DCzB9Wb3Di4n7UlGI8P4YrVN1rDrTHOUQpL+sqGZm4E4jRbFaOh8q\nRXfgi1RQucxvy7NxYBx375MqYU0YQV9jaakU3xI9CVF4UoSC92hkGI+hoJgu\nY9Up\r\n=+TDW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGQMRAndKl7afjxHq7MNbsbT5WpgFOhVZjzW0u8P6VaKAiAjNAfaRa2H3bK8fvKWoG+rjtYZ2GYQ0Bzxz6KygbVGpA=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-b161b7b22bbe920e6637fa5eb6ac60dbecb5db6b_1594326568646_0.4658593077160704"},"_hasShrinkwrap":false},"0.0.0-ecc99d7a215d697c2db2dd508d2f69f91ea1ff0c":{"name":"type-route","version":"0.0.0-ecc99d7a215d697c2db2dd508d2f69f91ea1ff0c","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"ecc99d7a215d697c2db2dd508d2f69f91ea1ff0c","_id":"type-route@0.0.0-ecc99d7a215d697c2db2dd508d2f69f91ea1ff0c","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-Uz624Bv2jUf5HC5ZPSR25Nt4DMMgW4fjNO30lBV0IPeJ2h5Ay5PKJrJzw28K9oshXVM8jB6MBJ2j3AgXhNBGrA==","shasum":"d84580c03bf1bad979026670eee6d3a3aeff06d6","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-ecc99d7a215d697c2db2dd508d2f69f91ea1ff0c.tgz","fileCount":54,"unpackedSize":1182416,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfB4v5CRA9TVsSAnZWagAAG6kQAI6+xsqJZxyVUIOvssMD\nfGYDcH6IK0ZXCdKNO+ocg99P5DriBm7N7aUUt7Gf72nk3+bIiRiQkN2mVevu\ntwj1LfIFcBRDPr5Wxo0TOGTXEdZO2EcrP4mPNbd908t8dJlEEd1aFglMIWXC\nLe+2pk21SpyZQEUMuwokF4CqNolbrSHrCK/5JAxS5Jw4iMy3xnRKSGjrv7bk\nIZ/cbmsb0h4UUrGWGqQvNTwJOstTvdu1pL9pa/NyRQxnxbSFcpmj1V/2IYkM\nRt7Q2Wo8UNw8ZFLhOD4SswwXfBFiJARZPx27WDcp2pagaRKY4rdLbDo8QDc8\nnQaHN/8mzVCIqbNWDauHixGqh6h8oyxnL66jX/WPktOqCi6LdiFKIx6AFVRF\nyCVfB45oXoqbRkMqM/Krj30oK/4A9zJpMsjqUA0d1QRfReX1B1iHWFAxNm71\nz+CaNvB3B1Ah7TD76uZjOJhvaOvQXW3SRkhMSdzjSQFg4hq34kTHsmmdCC8O\nRBQ86/lYpJYQeCV5EKOTLioVPbZtmMy1PPDReV2VxYAmUEis+xWyqADiGmgm\n0D4GXfhGRYEwEssG/QHd+2zFIAq5wKLMl3FtoxJDGXpNX46sK3AO+bx1DJL5\nE70MtqaDeIeumoU69Kh9Jdc9Ca/wPM9quaYtcwhXhACk54si9TELGwCr5UAr\nYhnK\r\n=+i6U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCdc6rSTK16mF92yLgTIcv6VCr77svAP5jHCmVTi2Np+gIhALxvLzRxAmC/6PaXzk+AKAuptCivQoyBJ4SaM9POw78L"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-ecc99d7a215d697c2db2dd508d2f69f91ea1ff0c_1594330104507_0.5447174174795568"},"_hasShrinkwrap":false},"0.0.0-15f2e8e3535b9ccf07ddec292a0249e026bf8def":{"name":"type-route","version":"0.0.0-15f2e8e3535b9ccf07ddec292a0249e026bf8def","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"15f2e8e3535b9ccf07ddec292a0249e026bf8def","_id":"type-route@0.0.0-15f2e8e3535b9ccf07ddec292a0249e026bf8def","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-t8hy68B+qRiETSw6X7Ib3Guysi4XU+Dh0jSXzBTK8eyvnM0UZL/gFjsaoLoQYyhIFlvW8QnO//bzEH2IyfiEmg==","shasum":"2188cc396134ff7ac659163a742ea9285ea9fd9c","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-15f2e8e3535b9ccf07ddec292a0249e026bf8def.tgz","fileCount":54,"unpackedSize":1174344,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDM6eCRA9TVsSAnZWagAATvUP/0+vNKlNPZotu8PlaMTm\nOEGeNnF8ggsJeESWCEx0oLdcDgBMNZCbf3JFBWgteT8Sca2YOJv3vkJokFAd\nnD0N+KraqTMc6ge5xRo9EmXlX7J6zyAIDUGosIcE/poZKJqm+w6mW4n11Tut\naFy5XM5WTwZVmBvKiBdPl0TFZjEDPyOoLY+V1lm02ih2dFJJW5G3/QgBr4OI\n8JTKEwSZ7xOWjNJ+/tjtxOQN5ssff2wxKh0FAwHredLpc5trfdRazSAuLofx\n8/p1iuD0cN58PfzO8AC60Yw0116xBzDOPVbHnKeKkQ4KIezIMWE4z+QgvFD9\n8/rKWNi7OnC6XGITbE1XMs5yoUELMxLrj/wlcesQIcochP1AU/Q0/7C65n7k\n7uHEpGq9A4f6wsdp9oJTSgqTONWGqW+OYC6tkJ+zSHMfpXW2yl+rvbEfwlah\n7TK9sciEV+PFaM3CKJc+bhJr8VIosN/EWTXPZ859bfeDdGwAh1AvtmN7k4z9\n0XH9byNZk3nTuFViMS7uERV9KI1vC+Gjr3jXxiHEdoqHcHPf8mdvceB41GdR\nZZBk/ZKF+UBrXKMsmr2SZ8YLfaS7Q93gDIhXouMaFwujnqG8LsNYgsjd0QVO\notSWwB06Pj/3YJeX2bypOdLGkqgeV7w2FYDFDMc0S/XHsDOnYL4T0xUP+WCN\n4KED\r\n=1ENg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAJCfSDffMRBHaNVqtFH/klty83RM7RWM8/yy2AeyGtnAiEA8oOFeuuN2LLS2YA2BlUEbHjjpu8JdyGo72UVetMO0F0="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-15f2e8e3535b9ccf07ddec292a0249e026bf8def_1594674845432_0.23140488229211864"},"_hasShrinkwrap":false},"0.5.2":{"name":"type-route","version":"0.5.2","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"gitHead":"15f2e8e3535b9ccf07ddec292a0249e026bf8def","_id":"type-route@0.5.2","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-u2Jj4/z7Jqv+Mjt9LaLO1b5tE7vJJ9IJpTcw1e5CSkPB3TVvt4MURP3iHs6F8Znf5K9+2KYGRM0/Sr/vrmu1DA==","shasum":"702e04b36c3d1a3cee5f43c6e535c95f9f4b9cd8","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.5.2.tgz","fileCount":54,"unpackedSize":1174303,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDM9PCRA9TVsSAnZWagAAMHkP/i7yj4XmsVEmVeIxUMTQ\n2ZVCeZMro0IwzKfq8CDDnZ+t9EOqxX8KPb1bBYel8skf6XD4foa0DHEkiSZO\nt6aWfw4bx31Hk7whoRjuXk3jexO8wTjlnPzcoL5WZ8jqypzjqyHbQtw27/fD\nVE/9SbOr7q905oPMn9O8RtATS1hDvcoQ8yIUhvf9BKiUR3TdL10gn8JghVuf\nieGjedI82Pto18RHHMB/ApFzUFmEZxACbsNMorBAFpcj76icoQ3rY6RQ5paK\nPJC1MlCjbwokKV0Uus7cG2Rd48xT7pIOtqFdv0MgxKLglIVc8IXyd7vgIash\nVyy1vf2Js1JHqc+2SI3e+7mgeAhvxay+asdDQhxTPOfMo6rmSDLxZaT9VGe0\npol/V8Zu6QtLb6iy+jlzfIJCaywvq4h4oGyL8MY5N2dPE4X6ZoRSxxENn5ui\nNLVfNK7474Bf5b0/Fshv/Ym5ku0a3pjp3JITWoCQBAzCc9Wz4AHZWTTvN/Xg\nUA4Ah8xf5tvqjm9ibey0g57T/2YTck6bdGK6FKy1H8/cFGpl1CSpsvNrdc04\nXg5Y23HKsLcdjawE76M6h/P6ZpfRNTAd8tJ/TxNvys1fxQ6ALlt8kjxP7+pf\ngPb5yvKDT5M6WY5fnhGsr2lMXvOK9uWwtv20vLcJmIiCK87Y6/MjalqlecRg\nEdGx\r\n=HXfw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDNtRhwEK9q1EDPNRObIIkOEpRXSrwqLAYaB/J25PCrXwIhANfxsHWO+ukEhMQkqSihNgmVnLkDaTaxYUM5EafXeJWp"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.5.2_1594675022547_0.010681067931896493"},"_hasShrinkwrap":false},"0.0.0-28907a7c1cddc2a816593ba785ba6b5dc1199f58":{"name":"type-route","version":"0.0.0-28907a7c1cddc2a816593ba785ba6b5dc1199f58","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"28907a7c1cddc2a816593ba785ba6b5dc1199f58","_id":"type-route@0.0.0-28907a7c1cddc2a816593ba785ba6b5dc1199f58","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-FIRFGqqybEuITTEmQFcjPHo3K/U6l5CfYKfbCu+oWyASLrVgL5WWSjcX+a9WeH9GUnHIkxx98Wtxpu/308i5pw==","shasum":"b271ae2d5bbcd505b690b602412c10745c301656","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-28907a7c1cddc2a816593ba785ba6b5dc1199f58.tgz","fileCount":54,"unpackedSize":1174311,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDl4fCRA9TVsSAnZWagAAjjwP/2UJodXP/FyuMiDnP8K+\ns6Rl2i+GgkIq84pkelnLOPIo4RTWgzguZ2DgaHamJIUBdY9MsZce+3HyjRaO\nvhhOA9YxOzby3uZHB1SB7tMDY1fFXi2TDy9EXl5sK7ts3xHYABMm3awHzoDV\nvqnedaIT16H1NiXjaOwG0GkeTtCbrXpr+hHRhuY8UaT0R3I6OJcn+j/ZxFua\niJbuzoXdYc4usCY77KY2Li/aGZ+ksQi8/7tEk2/Yi8Z6YUOCL41LfxOC0ZEX\nCeJgw8OU46oCkjxP+wdKwAuX/4urgenVJZWJYNl9EvXSgMWAjqTvB9bt2Aos\nfUWpUjPh/Vnr3AAWbrXSye79VsliqflyLkHDFV/Xj0dtIFQYd7v1yRKAU4WP\ns4wuQKE486++qotJcXDCrqQE3aTt2irZLjweeXla7JepCxqBb4QTavEooLNz\nkKrpvZmpOxo3tOW7a+Husq54enCq9iBsg441TwmZhVocFQ2A/UZOy3P4mCTL\nZ5ZprOhkKF9HtdBzR2QL4LbnHBzSach9KhPSl0ftfeuVLIge/D/NpvzxW9pJ\nkwbh6QNsxRLPMH6Fpm/pQLEFFNTIrS/FpT6RSRHbcRoMDqhtPqyhAeyC+084\naH1r9eZ5JpVwBOpIgeUMPR7TVGu5VkXS2cKNOr9VFOauq6iChHDmo0UtJ9V/\nKZeC\r\n=uGWR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHm9/5cGTpfaTJ1R3z9+uISwtezSG4HeWYRx8CRDU2gKAiBZHiRKMAT/cHgd29NXADGbDik7XMqapUx96ZXKTgrLmA=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-28907a7c1cddc2a816593ba785ba6b5dc1199f58_1594777118463_0.3283478158416986"},"_hasShrinkwrap":false},"0.5.3":{"name":"type-route","version":"0.5.3","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"gitHead":"28907a7c1cddc2a816593ba785ba6b5dc1199f58","_id":"type-route@0.5.3","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-5mqbJfWUroBC19866CLr+b0N9KI19d1F4uhRSWcvv0Je4APs0kL5enZNIPMzYx23L4GOAKHTWyDfaEGsT2kMdg==","shasum":"7a40048f08213b30d2d5a3835ba8d764d682441a","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.5.3.tgz","fileCount":54,"unpackedSize":1174270,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDl9uCRA9TVsSAnZWagAAMBAP/iErhUtAokoq0PEUsQSf\nto4tt7BbSvdlwA5+DIBCMGhWa+TGUJ2DAWyYfrFmcQtuOqT/kUje2j40/99M\np4WRX+a0XKwjkSehryeTjsJ1ZlUsYaXMfr/2NoS+PorW1gnWVg9NNwZF4BDo\nPYg7PhdOkTP8/Pag4+7qlCZ3IEohFpU4D9Oz1HKBtARdT0NQ38XSEMU0vBwH\nNyejCcS/ADmKgQBJaS/nu9KFIRu7LDwMGz9ctnzoKNsAPYk0TuBn33Oh0/D6\n6LbSMglBc6Ep3fY51Ims0cxt7OabxmWLbO5TBI7s8ytSYlsVhfbw5aTJBsos\nYadYvHoOAKtLMa5ZtXOo8G3Jvm/KVckXYmnZy7qqnVNFyStZ71Jr+bqvuVl/\n3CGXS5t7haW0jPXAhPL4EK8fdM79Wcof4vnppUsv5/8t/LFmGp1zVeElrGyX\njBSsMCSSZ5S6krcLx5jMtoRJLpcmdZNJNZGyOVNaW6E+/+lEfwdSDnIHF+A4\nyRHG79QLBouhZR9R4X4L33pzx1dRd6SPKYQMgaFm5y0WJdcKohrJcsC+16wj\nUt8T9mmh/XM7ZQQ+T25d6UHrvaYa/C6blVrKTrA4oRt6T9Js1R/AkaSKtq3e\nVcFB6FgEyO9vAHDv4XgHojy7ETCqEvppRcg/5nxgdwHFA84bCEC/VCm8hmX7\nFMfP\r\n=GAD2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBQDBwHdTRG9ju8HBLu0yDoqOfD+bFCasuEMkzQLziIgAiEA4sxloNXcsadVaF+lXfptoohkN1/keXxyNFLbTAvEyxY="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.5.3_1594777453944_0.9917928243723353"},"_hasShrinkwrap":false},"0.0.0-dd9f65f3164c1d2c8f35c26b9e0de41112855254":{"name":"type-route","version":"0.0.0-dd9f65f3164c1d2c8f35c26b9e0de41112855254","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"dd9f65f3164c1d2c8f35c26b9e0de41112855254","_id":"type-route@0.0.0-dd9f65f3164c1d2c8f35c26b9e0de41112855254","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-r41kxRGaJawVlLnbpmcUkpT3z6AZfXXvB8Z0/97Lw0XGTZsI/oudUKmKq7rOkmlxKchBGDaC8ZSJfwoKNv5hKw==","shasum":"ee1322e4c7f8cec62cbf08f6f545ccabb3309910","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-dd9f65f3164c1d2c8f35c26b9e0de41112855254.tgz","fileCount":54,"unpackedSize":1174311,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDl+BCRA9TVsSAnZWagAAXpAP+QF9Bp2OQVcn+dbSuPUD\nG//J3YQ5cdJ+kAkklCAwqikSUP9b1Lx4iFdHaeCewLZtXQBampiQlMBdzW7s\nAnnfx/NIbqC0ov6zcbG3HK4wS20b+N+Bp8T9RPxYW5TKRGkvmYXJaJiF9/LS\nuGvzSHxZ3HNBP+yBvjcDS3FyOlII7l/wIZe3XQaZaw50jPpE8V5qgRz+3HFb\nGAMOdqpUl9nGuoffv3ZwWX9exFrxBwe+xlczXPUrgk4WP2Vh0kgOy/mL/Rfv\nfOMcGjCaNlhOhQOtwAenXUuLm52EgfSxmh1KpqlGxGUDggD9rr43FbuaquMZ\n/0PHopP0dc200S+HilBmmryCLUCoDP3Bgf2SBOOKG5faw1sJ95Lb7hN/flzM\nG2fIeS1mO/OY1MhxXXVcdbZZiiZBTV84Dus/cwwGweQnedHl9tLm/hOJRBxP\nNjrM4e4JAtc8nIB7BgkHwlokH07RndKdUjWtUKjlpTutN9Ht5ov135kfAAOv\nAUC5fC0Px7kvw/Vdhze+NYyMcFVb1y2ftk1YferTjytutiH/JOfiN1S0H9Ra\nTchIUYfbzhxWVOwE/XeN3yBumQYIfYYHCmy5VqGbBcDMTDGIIuBpUK5qIZ0Y\nNu5r0E1nK5gdkOcxMsqt0GRUamrgxDbuEzCEw7+h9tCot5+Kz0dr298G8DAy\n9gNV\r\n=ln+t\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEK9I78UoF64ru6cUb0sksZK7AmFx/7yGISINZdgT17JAiEAgqwcIA9SZbp+xFTnkXNKVpib/940xdOXYJ9tqEQ0m+4="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-dd9f65f3164c1d2c8f35c26b9e0de41112855254_1594777472591_0.234106473930783"},"_hasShrinkwrap":false},"0.0.0-33606ffd334c0318086e99fed5c64bd726ecc300":{"name":"type-route","version":"0.0.0-33606ffd334c0318086e99fed5c64bd726ecc300","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"33606ffd334c0318086e99fed5c64bd726ecc300","_id":"type-route@0.0.0-33606ffd334c0318086e99fed5c64bd726ecc300","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-13DbIjB3d3JrhvMMA94YArpk4HDjLyjPnMOFsq4dUyaaOR1Dl2SJv1vkdAjEXwG8FX6G+UbbD8A6TD5fh8wEUw==","shasum":"d71b0db8bbc2500fce8a98d6526bec466574937f","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-33606ffd334c0318086e99fed5c64bd726ecc300.tgz","fileCount":54,"unpackedSize":1174311,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfEMxkCRA9TVsSAnZWagAAz6kQAKHdn1gjnrZeQcVYj4/B\nL+HiLBEquFOeSfAFHslevLORxCWmaFSXFWZ5YoHs85ZGvjewr7phrmmDX77u\nnUM4CfK7/X8I/9rO71eUfx8S5B08yLaTnooyiPuZZ5/a1Rx6mEdLhjv/cv6/\nz0RCsEZVUEbS7E6tG5NwvjO9d7deCdshl8ZTBS0nhX58TMd685u8H3fu7mit\nQYQZV9Fy3Ukc1R6STVNvb7B2UFP4+jSUqAWfws4KJ4+kXHbWgRNX0Hf1a8ga\nxvy8xCEcS+NzeW4EW7oE/tcGVKeglxegW1YaB5XyBT3yLnoA3MiO23Yv+g/m\n3rfTJ2u8AVOgduFyJioUbHJL8kwPVv/Fcq3muLZal6yOxvdKLUTPbw+3wXEd\nYshQ326IGDfTQHV/8yjEZjWuJjZGgo9CVZnrH24I9PTu98/bxsW7ErPkKEuV\nFaPaBjkDNG5LnM33o1NhHOQUjl9rucOFgVA9CWnswrOuRtuoSqqOhsW/AL7d\nR9i57/0B/7e83fJIugDt1+9Z9e6vHvH6bWorsNHY0v85wgu7WeCbix8PEr3s\n13NjETBCnbYag1SIa8TwDuqxmd0B50NPD5jSBvFxXEMrdwkhpvKnirCz3mOe\ntBPdb3cWj1UfowhUar0PHAl31tP+k6n5DZidjESQNE3+AqUf3OdaMuO31i9L\n3ABA\r\n=nV+K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC4/Ve15NNfGzNcxYrflUbAfLqH67VWD/YPM0P0z1R2FgIgPSaeePKxgNiZJt6kjs3CrO6Nz6Cg33UG5z/ifFtUKms="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-33606ffd334c0318086e99fed5c64bd726ecc300_1594936420047_0.5091939809708166"},"_hasShrinkwrap":false},"0.0.0-65eefce1121db6946ffe2cb4ab9fc22e0e55600b":{"name":"type-route","version":"0.0.0-65eefce1121db6946ffe2cb4ab9fc22e0e55600b","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"65eefce1121db6946ffe2cb4ab9fc22e0e55600b","_id":"type-route@0.0.0-65eefce1121db6946ffe2cb4ab9fc22e0e55600b","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-uzQ2c+UIIM45Y9E+rWo4NfARgybaBXOKb4yX9WWcbcid8896DzVK9amwmKRritMPlGPMZzEAsB/C04FQ17GY1g==","shasum":"662f1389ad074c61c90b632d33e06f845a4317fd","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-65eefce1121db6946ffe2cb4ab9fc22e0e55600b.tgz","fileCount":54,"unpackedSize":1174311,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfEOv+CRA9TVsSAnZWagAAS9oP/RZjRplRunhhYxFbDlLs\ntK7wnTsJArT0McrKozJsGKbgZwmd1jsCeOnC3lpQCIIKl6q4YChg8XSqz4i/\nkQcXtyALbVlUIXFROnuoIQwHJrgiPwhk+h6nM49Kg21tybAbGp7GZFg2XB/Y\nVOpex5oIRSDnetIfm+f9R4qGHv5/0HJbGLXmArlNM2/GHKneNH6EUsVR5e9e\nKb2FbfOz6Z16SWZpo+8nl2QRq3BxeS83Gbezp85+wsMjwZPUmLcJaB35vNRG\nZ08sTGskVctctsnd+v0YmRKSRLpjDYf4tnv5yGQuqIASGe636fM4f/QZYDfy\nMSapk5fJPC+8T5q/VUFv6N3aQ2gePWXFOMXXLVadiuo8kdaWWsmeUtGdhPDD\ndFDgBqe6/10+Cj8IFOu8ybtN8EdZXNf8ccc4BV1xuA9HlAXtnNDan4cY1Tba\n6bB+OJ0sk8vZ0FxdiLRpC9ck8j2Xtl+xhzyFE7+EjOxs5+ELMtyek8gT/k6o\n03CRIDgCArdVyDIt3WuckJbDpbc71/IJ3TIvObD3Ell53f8MvfrLi8a9ZXor\n3eJnbvR0HY9gdaRCkgjWTF1C6RxLNoY4wSQXMLP9gkxCpLG6Ad3Dy/q2qZpp\n8FBQCUtvjWwHn1vK7aqOtGoVKTvClUtK3HeizYgc1rQgOiRimbHmluVUAKBP\nbQjQ\r\n=wY8H\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDai+Z9HlUFiNhAhWjcDsMuRFlZUoNZror2we+lv/9FdAIhAMUnhvhLYhxYafyz5Lng16ouGGQqr0sdUhtDyP4w7QzW"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-65eefce1121db6946ffe2cb4ab9fc22e0e55600b_1594944509738_0.8248577181983443"},"_hasShrinkwrap":false},"0.0.0-8d5ac08221f26ba5f91bd18d0f5d42b540c84035":{"name":"type-route","version":"0.0.0-8d5ac08221f26ba5f91bd18d0f5d42b540c84035","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"8d5ac08221f26ba5f91bd18d0f5d42b540c84035","_id":"type-route@0.0.0-8d5ac08221f26ba5f91bd18d0f5d42b540c84035","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-lCIqrua4Yh7dtSfaId44Nb1Y5A3y9p8q8UfUF0p3ZBb+WlXbOwm1QOpnIwQF3ag0LP8I4RaJLol5d6ofRKHcKw==","shasum":"5a823b696c1398e05f80bf5815f3dcb4a856409e","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-8d5ac08221f26ba5f91bd18d0f5d42b540c84035.tgz","fileCount":54,"unpackedSize":1174311,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfEOwgCRA9TVsSAnZWagAAD84P/julflM5wFeYzClR3Xe3\n4oEu1bx4UYDh8BTgTE5AJ4hQa7YlfUFlRWHm44qaKkX2ch9uPUs/IrqNBDpP\nttyH8hiWWQCiCqWrrY9y7v7ReoqaWCqdp/7SwikRAPeHWD/0DdLwauLV2EKj\nmMhLS34IZG1nxtHoipbzGOR9l3p7Tfz0eZ0t/GLecFEzrlavKP+PaVet0Cna\njLby82v9dMBx5/QnsbBm45nEcdsznkDYcncQytCbe/MQeZBtVDtu5Gis/l09\nMizQmrVCUkc5EyqeJJcdr3nuzQdum5d+3iNbhy83ivRZppy+cw+FY596H61c\n+u4wA0NI8kbJJlw3DvkEt658DmqDeXy1Gc7Dv4ZyOtByVMluI/+8vk2c3hdg\naHgyxXVKyaM/OQtY95pNFCL24hlaEecynrNQbwPXtL1HuAR9pwTuJPL7MgLT\nIEfAdDRkdp1fQ5a8i0rYPuCLCg5diNONAfIUA0n2rFPq3wLM6P4YhrOtiVRi\nMEbp+PUye3bL1cAhBdWtCI7/joQ2SzcnX+W3qnn5pq0R5DMuKAz1YsoqhYt5\nP3VSQrzsFplx1IxLLX9ArZ7W1pAyszgyeQ6o/3+ZzeGUbZJ1+SvTlRGz69p5\nB5k2kE5bOnvSkO9w1cfQ+HHUnwg4JLWkGOE31tGW5vIVN7v+q5AjHCqt6bto\nC8Bj\r\n=yYjU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDwSN5UBn2QfUu4dD2YSP2sT98vFmF/mqHpnWqUQWEgUQIgCo20IPAZb71nOT9rtxzk+vD1Fq4DGikoMPZ2ETLGD2M="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-8d5ac08221f26ba5f91bd18d0f5d42b540c84035_1594944544378_0.6459012960279829"},"_hasShrinkwrap":false},"0.0.0-5b06e7c07df72515ddef249b531128c5eabc7efc":{"name":"type-route","version":"0.0.0-5b06e7c07df72515ddef249b531128c5eabc7efc","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"5b06e7c07df72515ddef249b531128c5eabc7efc","_id":"type-route@0.0.0-5b06e7c07df72515ddef249b531128c5eabc7efc","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-h0GoAno6epKKkLP21vwmfYom4LuzpR8rT8CmnuDULwaFsGOkeW5Kosp6rume13zqxPiCCLBQuMcgbepKza8wJw==","shasum":"adf2875dd855cfcf3ba5f24f9328eaf9572cf072","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-5b06e7c07df72515ddef249b531128c5eabc7efc.tgz","fileCount":54,"unpackedSize":1174311,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfEPOdCRA9TVsSAnZWagAAdj8P/AzRCOv4deDVs61NpW2p\nDStPNs0++SOmcTlIwRly+wloZtt1WOwesLYbI6yHYmGcgHTfzJRA0hfCgx9a\nOc9WgaFF3IF4q+wyAIlRE/XbPi8rbdCcBjAmrHvFhYR7lay/u+oB8uPiloKy\ntUIV+I7s395l4Xhuadvr3jpiZtd6VHuzc3z0yZERL8ivZhOWFtZUqsjGxXCr\nsGJj3ozi4sn31aXYTYI3EMeX+7TMXXpbmZqqhpOaTPUP9svunNG/RaTBO2AX\nrWUmzIYpL6h457xtm0vaqyymrPBIYyer3l34ZP+Dt7fl+BnDnyQzBPKGp2tf\n2l8K0P1HmgD8CY9fyCVDZFVBwh6MHvUKClreOpiIO1BNtf5mNjNkGQFez2zg\nJw+bDuIdYwWV2RZml0tYFkCDhOAgPO/Bf8WceuDNL7l3N/d6ibe+nfpZNpZk\nLLFCb3hfB4obDQgaXjHyp2yh8UJdyU12MU4HJix2NceQDp6DTMSUA54eR2+S\nXqgBvdKfhXUVQ1tOan1wtqGCQ5siJ71AA4okvAyoxwoXo9FYytX8TAX6eU3j\nJ9r+IfJGdhShaQtf0wQ3HFNdmDVReMNyMTJTrTCHGv9EhOR8QBcgAeopwcd3\nRedu0R/x4Nt3nb9PWm/xyKlstc/SH/6p9gQK0bOavB+2yujgY4NU8Oy3wMai\nTM1Y\r\n=KmzE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCx9luQPnoK7tHuKAC3TzGUCCRJv0tBFldw74O9PEfL1wIhAPBN3PhHxIGLZViCvcP9IHdMHvafES45t9D7LKEWmeYG"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-5b06e7c07df72515ddef249b531128c5eabc7efc_1594946461126_0.2348910267730775"},"_hasShrinkwrap":false},"0.0.0-1b4807b2a51e5aeb66887fe8c5fc0a93526917af":{"name":"type-route","version":"0.0.0-1b4807b2a51e5aeb66887fe8c5fc0a93526917af","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"1b4807b2a51e5aeb66887fe8c5fc0a93526917af","_id":"type-route@0.0.0-1b4807b2a51e5aeb66887fe8c5fc0a93526917af","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-tvVmWc91eJy5SN2Fzjvjttpm3FS+Qx6KNvx58D79o16gsH4PNxbrR8qmCepnBbV82atjspzV6KLtcNZ0NtIurA==","shasum":"0b454107a398619b52c96a2bc90f58912729ca91","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-1b4807b2a51e5aeb66887fe8c5fc0a93526917af.tgz","fileCount":54,"unpackedSize":1175728,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfHurrCRA9TVsSAnZWagAADdIQAIoTPwzJDlMS1EWF3SE/\nVxcoToLeAwl6C9t4nUEl4/w+jt1MsutmsTMvpe87yvRhdRsaKKvmcdIdPmG/\nXZCeAsZpI04q4YEUsH4y/FdPzYDHnQuTNmmq4nTYQjxbjbfAHsSfok3786Zu\noDLq78dDSUeEeJJwcCkHRUK5lTWsK+CDDCr8NiBpI7zXCevZNJjReLxJVvL2\nOITHevIg1HguKbAnyJHgFhibqwjV3tPKG9HOUipFT/apNs3FUIMIxmYVax9O\n6s/QZNlPQ5JB6JSgBoTVFevDn5MnfW8hWv9A33VgoAiRWJO0k4Bkw3AkW6MN\n1DmKKIpPHvwpe5C+AwbEv/RPPZiLXRgOyznefs1AYHphrzGsUiQA0+LeYo6B\nC28cfcIvQ897w6P74cOVQXHjlp3yyrOPcF67gZ/fcjlBhc+01iI8RhtsIJfg\nTLpne5kfyFkMR5MP/sdhbt2HI6axOztMOCKCSV84es06KCW9YQrPqWesnVqN\nI9H8Ypkn2NU2hffr3f74O+j/JI2RhdqgeWvVT5Ho0vPGfrtL17S1nlISj6Ut\nVNiFUMiHkAFPxC0C5vt0lsQzmFcb6St4hfxPrxuLZPiHMeiOWtQk5ApkuSBc\nZ6mKxTgNcoeAnexFwhrZ0zh+UEK0yCcPjBdxbXTdnHUBKO7LBgCgg83Jcr/V\n7imR\r\n=PAz/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFKW6+pl8Ccyx3xxg7JCQLjuu0RT7cKcfow/Cztfl18SAiEAwHJRGg8CMN1wKSQSMcDaNRA8WiejfG4U5/OUzhfjfEM="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-1b4807b2a51e5aeb66887fe8c5fc0a93526917af_1595861738669_0.9757327794845274"},"_hasShrinkwrap":false},"0.5.4":{"name":"type-route","version":"0.5.4","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"gitHead":"1b4807b2a51e5aeb66887fe8c5fc0a93526917af","_id":"type-route@0.5.4","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-fqJA/k7ao3rP2N4y6v8rfxbGIPNFhEViizO/WfmmTlvGAAyucVPsp6m7INO9qx7lLSz38/X7llx8euzpf9IiBQ==","shasum":"1562787f3bcc5381142bd2a66b30019c0fed58d8","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.5.4.tgz","fileCount":54,"unpackedSize":1175687,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfHuuTCRA9TVsSAnZWagAACjsQAIVU9yGuIfkL7+iECnpt\nNVythSKa7tnvf3j+DusziGmG3smYKORXdTq22hf5KjwN8a8Pl6MBGY9fJ0Oe\nnNaC5rjAqyzTif9Dg4lOKZNRj6fOqxaF2/cbKOch2prvMaD3iLOcv3J2t9Di\naC2okkVcRC6Z+WT2yZAwHnucY3eMXHtvydYbhQ/h4za/looCor6NVxlotWhq\n5OO5ciywjhfrFXaMBUTdKSXfOikhq5hnVq4t0vOYwdK3/TxBOBYsbgf/J2OH\nXS6ztZegTsOFsRX2/u2E97z1wAi0t4z8g38ZIwGYe+lkXLYfSJyJ60nzL6EX\npNM0blAbzhqGo+M49YxHoHXDv29/vOOeXy7uAHFxkb3edoWPFrXWI52R6KuC\nAmQJBa/1rBsYnleoSyekDj2m1PuiY+6njDV9wqdQUDcXHtf5JoYbVOON5NDx\nB0OmIA4hNOJq/DOKE+MCV84JLzD7MersJw+xWrDDhEuJkkEwmq4nqxZ7WbEk\njUy0gOjtn4ieNCzZ9sNcdoC/cCL2P+aHDmWTISdpjwvih2u6E3934sQrSH8m\n0PNH0efcZXnZl7Blvc9lfk7E4Bbq6GKNv2FP1oIfd2FlSzqDdwvf2InuOnrX\nDzDMhWqfP5MtvsIPg45xScK0FxRfMsFuPMSSXtxip+TKcRNtBAmKvvvoE2Vs\nTDjw\r\n=Dt9H\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCfDHvtNgyUbd7KRFuFCcBHw6+JR0nU92Z2x5AwSn3dAQIgTsOf3b06WAw+hQbUiRNLe71ylGuMEg2l/Tm2vsILZJ4="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.5.4_1595861906841_0.7721126932427362"},"_hasShrinkwrap":false},"0.0.0-333ff35318bc2cfabe053505ddd442f43289c0dc":{"name":"type-route","version":"0.0.0-333ff35318bc2cfabe053505ddd442f43289c0dc","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"333ff35318bc2cfabe053505ddd442f43289c0dc","_id":"type-route@0.0.0-333ff35318bc2cfabe053505ddd442f43289c0dc","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-es2zjGwV739NYrJt732dzVowWSmGiXns64LgZ7RStM8GYK9sMc4CASeCKMsw72w0sYFXEMt1imtfiDYaf73g/w==","shasum":"eb0fabf0179dd32ffbc75268ac30e937403dad62","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-333ff35318bc2cfabe053505ddd442f43289c0dc.tgz","fileCount":54,"unpackedSize":1175728,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfItCZCRA9TVsSAnZWagAAMi8P/joLmG3GGUjlZhKc68gp\nLfBddsu/p+jS+bLfHHUGV0jRWpQ013yEutGH35rGapMGgx8kP7im5vdAY9IV\nieedrvsgfmRCh1M5AfJkA0RMBNTGPQCXDIyf4H31o13lBYHylmo03tIzVYCY\nwAv4eZ3PZeR6aXCgylzSadYrtn66ypPfNGl+OR8uGOtrZ1ka+hwG8NZXXOA4\nYqXgva3I2X7hYqC4ZPaRlVu4u7f5yr7cWvflpAEpR3Xarxud+/OlOqAW/ax/\nNh/52ShQehS5BZCBonjkIccM13g0s2sSzqzmySFQBv9Ob9yXeYA9RQE+/y/a\n67rljDeuLrxFUvjCCUIaUMuaQlQ/dPC5hDpcW69cCzvGUNKEE9xE/DxPwyQ/\ngnrP31CtGNM47qdZ0XlPhVfDruFP7pUDV9bJHTVqpDr+aLdcE895W5f2CzL7\n1YgstQpMC0nu8vJ7EVy4jNILJQRhmOzFsBKZOY36RGouu6NQ40xiNcaez2BA\nRqrsnfmyFnkeEknilYob3r/3SBEp0LPgi+wvB6fqPzZanT2j269PT1F5CEDr\nm9ddxP8G2yILKCgTNlMsBospK3Bn9iGjDvGmRgWpPF3e4SILTd9gh4aSGoZE\n9iV2IoYha3KYYI9K+20PlBCtYdWeQA/PY68nttIYCZ5dLSA2ekmrLPzJpL+A\ntPZL\r\n=N7PE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFasK2rsIokfuCxDmdq6O17Xj8DtERW+j26Xm0sjw6yNAiEA1tfGWfKjGyr+9vxSQ154Dulkswu3l9q4EAUL3rir0vw="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-333ff35318bc2cfabe053505ddd442f43289c0dc_1596117144528_0.7011542832198727"},"_hasShrinkwrap":false},"0.0.0-f52c7fe9324d2d6952d5db396a6c2264d2c250b7":{"name":"type-route","version":"0.0.0-f52c7fe9324d2d6952d5db396a6c2264d2c250b7","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"f52c7fe9324d2d6952d5db396a6c2264d2c250b7","_id":"type-route@0.0.0-f52c7fe9324d2d6952d5db396a6c2264d2c250b7","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-E5+vcVnFXJqOZsQDxT1BLYwmh/s7HS2bD3Ujc42r0nWjMBbd+AZdadxLJEEGyWIpSIvrPqgnkBEfDYiwghEN8w==","shasum":"717d91b85096536243b596249a6d6717a0f99a96","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-f52c7fe9324d2d6952d5db396a6c2264d2c250b7.tgz","fileCount":54,"unpackedSize":1175728,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIuPZCRA9TVsSAnZWagAAc4oP/1ovkG8mWRoloV8XqslL\nWewjcpti8EHVYiO/Tif1aBjNqemB0y/jecADPdamCd5kvUkSk125Ths1mVrf\nUzyVAIgEs7AdkQq8mMS4/D7hP6hveykjKUpgXazAU2SNa+20quwB4BmawMmh\n2n5UIUqPdSZOrhPZXhDgAYjno2xzRthDU3ddjNsc5HXUKke405F/r46IlrrT\nGwwKEyuVXsM9IVMqEQwiOksqqB5fvRm7/m+zb5/W/3rPpb+ZTyu1bigc+I0J\nm4yq8nBdNZ80ALW7HuxtgK86XOZ/Ho6FWgLUq394oXbhna5iTos6+mI45/+O\nTBC/XSAs8xnK7MruQHgTLQbwXfk6R1my5vp/mcL0e3JNsuIvOMP4UHKJrJFC\nhp1BXPzcAzRHJaj4ErpBQSxSCdmDM/eeTQui3vQ1DeM1662lRIWBCjV8hHbW\nFSMeT7Z1wFYMECyIPJ+RuTzeh9dX56CTY2IrkGrSwjGuJZ/EV77XvzzzeYgv\niYhHS/tmXEoAe7GmK2IAtgexsFw4hJgxTXh+yXY784IgrU/jRuMRKzNLosUX\nm2ppaymj4P2tG3o0OGaZJVyn/g45SumctDfi3sQya/1HIodB6SmVhbrFVTBK\nQPePeh+B68FbXWW2JPJaw2fvV8se1jVnlhYtd6xzNdZp6SyO7UfML9rXofae\nB7Sh\r\n=rkVL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDyamPlGelkwV09j1naNzd2poswMesDi4Q9E+NjhVK14AiEA7L64SMDu/a1bEjTXXqJsHBXZF4QHRjrCGpivR0WYJEs="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-f52c7fe9324d2d6952d5db396a6c2264d2c250b7_1596122072477_0.5706082198139706"},"_hasShrinkwrap":false},"0.0.0-e51e6594f98004ba64c49f6c115afbcc1914543e":{"name":"type-route","version":"0.0.0-e51e6594f98004ba64c49f6c115afbcc1914543e","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"e51e6594f98004ba64c49f6c115afbcc1914543e","_id":"type-route@0.0.0-e51e6594f98004ba64c49f6c115afbcc1914543e","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-FFjYQRrS44SzmvWhTBp5HXr9pAvZK8OnAyyE69ADnZ2cJqroWO8g9U7GvgbhqUqCv9zGW9W85OYS2Wj1eG8rqw==","shasum":"53d7c16d651cfde95586cf4c2fdc242d92bfcf2b","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-e51e6594f98004ba64c49f6c115afbcc1914543e.tgz","fileCount":54,"unpackedSize":1175728,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIuxLCRA9TVsSAnZWagAAz9kP/1tZDlz/GEQlMkEr0G85\nAb2Zu94TGhoQrqgXCs35muBtN4s9TH6MHLlEyIWI36NAh3SWBB2CPEc6CHjN\nWZgKdasBS6plq9l7ZjX9xFytgpZZrnsyxcGye71JeBH3Ac9E3aHpCrQ23V26\nef1DD812B6Re0xdoI2/7C8CND7UyIU8WRrDXDmGHy1mciJTWjYon7oE6Sice\nLH7BYcxjt5BQsM5xMwLtFoqCUfAX5gv5f2Ij+9FA8ijYvbWtqbP2EKtA11Qm\nIKWqvbmqS6vD9P9iR/z2xFYTQjIscV2EAhx7eIRzEqT3DlZFRcN/DJN0fhD8\n0jfBC3G0QwOPqjHRk4Oc02Ffdfo9/qzxVZ/bouM+JjlnLf6K51ajO2BuN0mY\n0v/S5LOIYmJ6YNh9tkImu443Ib8W3CjRPfkHWXq7XwPiNYM2rwBhCAIRvp8Y\nzrWYLhIXKOYYnRjpU+m9WrEiHR8LCbZautU2IC5peYtw0zJD2AjaBFqr1ZGo\nkSUU05Y2GzgIpuqi9PdvOWeMB3kwEr7F9QPSQCK9hjAUW2BpQ6seZFS1DBBA\n6zpQ9ZTOHzQv2iXz7D9gSUaQoMNhkR9kqzH02xYbzl5Ldm5mWe72a6nG41fm\nVFtefNGbjTRnpZEju7uCi33UVAA0DZJgs2Vu3/ERqWS2shZfBK1flEw3PpWI\ncIy6\r\n=j82L\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICQNTb9pYoZA2rqbFiEHIS0rmLO9sS1cFSHUtR3AWrKtAiEAnLO+KbgCF9sHHJ2mdCjKA0pIbnPvmKrKJavLkbV33vE="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-e51e6594f98004ba64c49f6c115afbcc1914543e_1596124234789_0.5822822730895307"},"_hasShrinkwrap":false},"0.0.0-d89c2229835d2d485a6af16473e4a0235e301a09":{"name":"type-route","version":"0.0.0-d89c2229835d2d485a6af16473e4a0235e301a09","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"d89c2229835d2d485a6af16473e4a0235e301a09","_id":"type-route@0.0.0-d89c2229835d2d485a6af16473e4a0235e301a09","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-Ft2BSzpMu2aC30EOs8C7c58Pi61MLGCEwAUZPliBCuLXvtvDzM83CZHnARxtT4INRa4m3PYk67RQovJjtSgSJg==","shasum":"5eb48b3708c4e2622fe492329c28e312b0b03433","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-d89c2229835d2d485a6af16473e4a0235e301a09.tgz","fileCount":54,"unpackedSize":1175728,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIu6cCRA9TVsSAnZWagAAMGcP/1dJ7srGlpJ+h1W5YUUf\nuVwpISYXEU5K8bJpzRMZ9NhRO4X14CMAXT/bUUkZOuIr2FbQy9bPuA2WpBCf\n/sWpjiS1ZFBD5utVq/Z/A3TVE3S+cSkkHwt26okA/X5+BV9dnlCuXF0HpimQ\nWJQtTkHwyhTp/UqD8/U5g1GdozXyWYKomTn3ZsmlWqIXKXW5l0pC7nbTHRWL\nl6GLIyZtQVNG91MGFC+DJGRV48j/uUHFGtljNk9jsdb5nZX3wvve5EKqqIDm\nCo9ssmFa4kB36oICyr4MCfeZsMG5AfEauDJMaODJ9TT2d9ZTn7mT1BM8jkR/\ny18ZAQtOeeogetcQHzQFvPH7qo5a1IyL7bALY9bZSCiGryQBPWv1rT6VhYpE\nMhU9Q7OCtdVox8RHCC6RvLr4dqX22NxQEZxzpIePgSFscb4YHPlNLoLaMMGB\nYBiT5/JEaNHyky64YF2wR0v24XJc3wWbwKv6mzclBFB2BXps2vZnkXIXsE/t\nAuquOtU3skt3MApMG8IaXLVjBW7EGOUHHb/ly86l6REFlV0Z/xFXchs984zh\n9VRxjiGISUfBLDrsgkLMd0wLbzpYbEPJN8zpY/5nJMbcoyk1my2sveCQnCLJ\nIpcuAHAxG8QnS9i+zbOTCeKEG+9Iy+r4Hc5nkWpjyZowOzMMuwG61L3EFCtO\nxnXs\r\n=r/nN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCJs/XNiJwa1ZqwMhMl1jh+eXJV4UkxY96EfDRPNNKI/AIgVLsjFdU06vDAXFsD0gf4uezZmzgi30HIeG7oVjpYSOY="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-d89c2229835d2d485a6af16473e4a0235e301a09_1596124827878_0.614031947677449"},"_hasShrinkwrap":false},"0.0.0-49dfbabdf8abd4d764e0469b91db51818f7f0962":{"name":"type-route","version":"0.0.0-49dfbabdf8abd4d764e0469b91db51818f7f0962","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"49dfbabdf8abd4d764e0469b91db51818f7f0962","_id":"type-route@0.0.0-49dfbabdf8abd4d764e0469b91db51818f7f0962","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-ZxHog187nCAPH3O7OQXAxkYlFt7U6e6Kg+Y0NcbKbJ3r345+xWqyQk3xgSsCUsMM/1ys/cIwKHoWXgrghaKE5Q==","shasum":"d4f6b5c527cbea7975c0c554e442f24a76528a00","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-49dfbabdf8abd4d764e0469b91db51818f7f0962.tgz","fileCount":54,"unpackedSize":1175728,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLd9GCRA9TVsSAnZWagAAZf8P/jKj3YctD9iUmdZtvZ23\n5JW7pr99TF4Sdk2Tshvbc2vdYsVmP1RKmISDH+hrd+lgDlnhmDOPA+7Su5Gm\nowZ94AU0zBJuaMJw47bi6L0n7Ykd05JtmbbncZSIT29T/aDKXTuLDz85+C9g\nby2nYVegHQPbPGn2ze771lI2VrOqUcEFJTmIV+rkyrfL0MXC3Rym/fIQrg1Q\nsozbwxhdFfChgvu55UGVz//C0ZtRP1YgLSvxM1iejubLXfyxAilPrzPFiKI6\nxLcPoBCi0UIC2PBV9Ydlu5fH2ThHSApQeb4CtocgnU4s6mMuHrAT8jERleVD\nXUYqGPO7xOcgGr9k2XiXfvwV8waj0lA2RUp3pshTGymSdhZDWDbJCxP6a/mB\nztsUZHsIe43hLdSlMF4//EFhefsBfcATa30iqUeZ0lEZrW7fADI2GzzF0mwO\nx+FmOthYOazl7uJ85rnsG2EBy70Yybxqii9ueZVwRs1+JTaTT6LSTTC8540w\niboMCBvkiq5x/KRAImLI03kanrRn6OyNUktIEPbBMkGewq7BJGXCv56FwJnu\n8eIOQkIf5C5N0iuelz8352b/3qCM+A+jx8ZLNbPQgKRxcSv2DgnpBhdT+dW5\nu0VleGs1dC2qTlcIFybYt3vGCOQmrU76nhpsFaGiGoN2ZM7PvjuMO7wubZ1z\ns4z+\r\n=tTXX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDK+p7qjETEy0fGl/gD8xmpTyBnpf1igpiBfXylD6xIqAIhALVV4zCoHLl0rePYrTknaFhCc4ZlscJds2cUhavcss1H"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-49dfbabdf8abd4d764e0469b91db51818f7f0962_1596841797477_0.6559299147037032"},"_hasShrinkwrap":false},"0.0.0-13bdd9b234a462e3c8af9680f1bcbf2590fbf9af":{"name":"type-route","version":"0.0.0-13bdd9b234a462e3c8af9680f1bcbf2590fbf9af","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"13bdd9b234a462e3c8af9680f1bcbf2590fbf9af","_id":"type-route@0.0.0-13bdd9b234a462e3c8af9680f1bcbf2590fbf9af","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-bQ4tWyxqjZ/76406RtE2FVv5m88tbX8+wiNyIWfPBgYUzbn2IDiLMR1XHvg7xeiI7mGPpm9WjEMVnOe4DxfW3w==","shasum":"4b5c7a7a683f60724c5cbdf380e9d3df64af61db","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-13bdd9b234a462e3c8af9680f1bcbf2590fbf9af.tgz","fileCount":54,"unpackedSize":1175728,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLfAMCRA9TVsSAnZWagAAmRYP/0lJsa/bc/xkK5V3Z3A1\nPosfJazYUwiBRpC4hR0NzeY7R9t6mb8xRYkYuifp4llCAAER7PDTNAC8OKGR\nWAyofPSemMqrj4yrF5fLfbc2MPRKGpmH6qhQapQrNwuACXjVfMWElPewk7dK\n+bhTrcxdQMH7Ng7BGqOHDrB8LklZJUJ6llb3dfStQcRs0w5djgtTWAUFSqSV\nzEnzC1ugbHm45Y+U00Jdo/e9B4hxB2+2mXoMUSZ5m4iH1EMHqVxE5zvuGBIQ\nmpICJ72/I4X0uILCFZRZy9o/EgvKIFFpz5On8Xs7N6JmyUR6bhFzUvJg7dc7\nZ+31Va1FH7rbFcrLzSKaNC/zjaBetfYCO4Na54f5JT0PVtTAWJ+dd2IxlXik\noyvApmwbqDTBeYB/0gEw16iN1MJAt5IoOkLuRVQzJst+G+9MMhLZe1MEDD0r\nvqNugL0dvT+3LetKh+K506ORhKsUyMfjJ7KSdJdUAUDohGke6QSeg2Ni8frS\nxEFNL6Nw/G35FIR3LbDp37AMLZj3DfKUxrYv2Jj5KmXFcGdWUX24l37aZBc/\nU0MmlVxSsVI26lPCnXgwfW+oX26DUK8R4sxlltXxY8L6/4PelI4hErt6nqPi\n7Q5SwxSSvI3VxopBdryZvsjfsGUnllfbPUb+uCpfjRQPld26a6NXDKA+L4OE\nOH4Z\r\n=OxLJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEDfUyaydgAhB9ZQIvZN3675wON92o+WNnVJFSLJdoqSAiAbI/mm4sYyxZ7KhcMgfimhEDMIrXeGzHqsAyoFQb5ymg=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-13bdd9b234a462e3c8af9680f1bcbf2590fbf9af_1596846092074_0.3798200103931022"},"_hasShrinkwrap":false},"0.0.0-d78a8151f76e06e1eaf236ae729c3ac7dd9ddcb3":{"name":"type-route","version":"0.0.0-d78a8151f76e06e1eaf236ae729c3ac7dd9ddcb3","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"d78a8151f76e06e1eaf236ae729c3ac7dd9ddcb3","_id":"type-route@0.0.0-d78a8151f76e06e1eaf236ae729c3ac7dd9ddcb3","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-Cw6cM1IcLtN1E/OAYajjLZZgLkmJuECawGO+5YHGTI9SupnB+tzBXCqrPz/62L+iLEXSZn2JOIDqZmoT1YfaQQ==","shasum":"e119167fb8cce63461ee973b97ed954a5405e56c","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-d78a8151f76e06e1eaf236ae729c3ac7dd9ddcb3.tgz","fileCount":54,"unpackedSize":1175728,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUavGCRA9TVsSAnZWagAAhm8P/02tFHAMeT58sQDUZBML\nowF8wgr2R2qSbzB7mnBt2V39tsqIJH7sOdeXBzbdUOBP/b/tOKyPckcebyiC\ndrkuHy3J+OLFIMv/z+dPdoyoJGSQS81oYUBSdEnj0uT5bTehhBwIX5o6fTK7\numEmBsmAsL3efsMPXUEnSyFK+JOOMVRkcz/6WW30I3uRi1SOtZywq7zIW31Q\nR9b/FwkizxmBtfqO9xbzz25PJmr4TrABaHR9/bB012KFuev2qN+8oYMbmkH4\n0nSg62FdWkBMDvaJsKQopvlo+9sJMtzh9k5lpo6GYeUJHM5r7cQJ4lRvlBmX\nGTvYkoZfE/owkUfebnDKHqCuKyuC/j2of7SPpIaPgF3zC7sQLoOf2uKxaSGT\n67yn4yMRdxxdR6ae6/dYXtFOFr/qcGmY81YigYaUY8yNR/Yb4wJ/80icI6XG\nmkgkLFuaLSOCQ1+5gxtrY8jOdyktowtpN+8iRKxa/3lPZgX52hmkVD4kcqBK\nAp4oOmy28pcEfu3ENUs/TIw/8A/sZoCLRGFhVjRJP6AkdbjvUp5YCyQFqgYZ\nl9s3X3kKMC8iueIAY/Fd+8HW5Ce2wRpyTaooq5w3uoaTlPregEVakUw7zdoY\nVRVSu1/tgeuqp4jlXvXOVMp61BVJNiVIUXOTyB2kNLAcsJFTTagPjjGQxs6b\n7ZjA\r\n=hXdq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+gF7bN6K+Z1Hh/oWMlpFZ6hhkj2uiFO3uoEaqcd3mSgIhAMQtQ77ntc1ZnGKokNDtD8/BKN8GPAfq+cQTxKLwa0RI"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-d78a8151f76e06e1eaf236ae729c3ac7dd9ddcb3_1599187909771_0.4708739392228154"},"_hasShrinkwrap":false},"0.0.0-c30b42439edf7c07daf8945f0373130b880a79e1":{"name":"type-route","version":"0.0.0-c30b42439edf7c07daf8945f0373130b880a79e1","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"c30b42439edf7c07daf8945f0373130b880a79e1","_id":"type-route@0.0.0-c30b42439edf7c07daf8945f0373130b880a79e1","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-2CYQHSHSgIlAEC8El/MfTTdpjHuEtw9tVimDho704WHoKRlRH43S/3jND0vc+CxCR9bCbM0fu/Tj/GsNviHxvQ==","shasum":"55840ab4ee886e4b61dfa8cec967c15dbcc77ce8","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-c30b42439edf7c07daf8945f0373130b880a79e1.tgz","fileCount":54,"unpackedSize":1175728,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUch/CRA9TVsSAnZWagAAfZMP/3lS3P35BSv3Dc9CwxPj\nab9EvgIx7hRdjcuvMBfnfIvBdgd/K246PLTksb6VasIhP7D2c+9g9+t93JUr\nSIbeq1isrZvp8YoPB6YLHSnOe9EEKycWUBzGGHMj0PiXx1QjySrJeDXHtvc9\nzH522TDhCd9R0eeNnah2zTWYRl2mgHQPxFEAr18yT/nN+9t5w3hzjTx651T8\nJYjJTc+ri+kS6dEAfgeHpwRIWZrhKuAYlSEN+3ArTSGeMVPqMPZ7OsKwsdO1\nWT346Se7+Rml4EXQAaIaAp8Ch8839J3gu0W9ZWt2N2sME5KD32MWMFkndTAC\n+JI5q6sr047fUnHx3R8Xe2ljz91pNEWNJRniBttzO5zu+n7ZaW0i68vFhUWr\nu35MQ+p03UBtJogHPkerawpGbMZkSzsDxvaWTEfNwfgc/dIzU10gzuEO2/JV\nDLkEJST+NTFD54Jw90MMrL8dfHqk4y/Vhg+Df6tUq3MaE4e4tZk6RFb9DOUo\nHFsKzH4Gdpm/riuSH/B5G1pOQCNyB/k082Epjs1fbMd4D4JfTVHHhxYpIWzz\npwt2lC6tucz2J1ftmasLNfPidVNJyBJHz53Eh6oGz1MV0aGRvKM0gcak2qGF\nG6mOFhXhF75LD37+LYqWzwVUGaNQhmP8FMOICsjLBq4ae49aH+lHZUbLzltu\nkpz5\r\n=Ri8i\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/BYRiNelavoVe5vm+LlpzVPQkDJWYpTXecAjOYkc1SgIhAII4D/1SxrgZSPOUfAbdU6OuP3VL8HJYPFhnwDRPld7t"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-c30b42439edf7c07daf8945f0373130b880a79e1_1599195263014_0.2014374902676772"},"_hasShrinkwrap":false},"0.0.0-0c9d426e15857255a968a10fc0b611cdc79db3d1":{"name":"type-route","version":"0.0.0-0c9d426e15857255a968a10fc0b611cdc79db3d1","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"0c9d426e15857255a968a10fc0b611cdc79db3d1","_id":"type-route@0.0.0-0c9d426e15857255a968a10fc0b611cdc79db3d1","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-HERBAxRaRckuO+Wa1bF7GlM16Gu0G/KkzhOR2SqABgLkKo9omgZYpZrFf9/JMwxt6I5Yt3TvKL0lgWQ3D5JXwA==","shasum":"d6234ac4b419e5833cc520e80a930ad8bde9b3ba","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-0c9d426e15857255a968a10fc0b611cdc79db3d1.tgz","fileCount":54,"unpackedSize":1175728,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUliUCRA9TVsSAnZWagAAT3oQAJ/fL7k1xyt+a/DHoVWX\n26R6EeGJ3s3t7LZKrICXzxvvM9PYQgLfTDZ1Gs1QPT70jVj2Hk3dBG2oe6mg\n3DN5gMdKGomSkwK+PsEXQQA81bmCTEsxmFXeCqIuyOrfPI1ZojDvq3Mz+4F1\n/yI1pY59YsxBNlMObYjr0lcwi48BCNuLJZktaP63bSx67vcMAzJQ6G31F/jj\nzfHjxQHElDZeIp8px4uXdhq2Bi7kEu/ZqHRZzb3LEhKXH3Wx5qMo1p7EoWSQ\nMPGMKkR1Gc7eo+8LlumqRGfM3Yvo6/w54Mg3rduSsOpOOquxhgVUwc9/0wKn\nFd1s1a+sEdJCByx+4M4CXil6DKq94EFP2Aa3yh9XvPymL9xmZxVGS2Cg8I9D\nFXNwFOzgYcniy+1LaBNssPMM4AeY9nx2m0n+Wa0ZUTEN47uBB6Q2pgoEK0Ft\n46bKlsm4RaP6CzCQomDl0ktXnNHtk0lDC8rolkI0BzZ8iWiwehoDHa2dcxGo\nYvMk2iSjneTl+FCfV13mV6biMY+A9AW/gqhaRoi0bOOX55aXh3AKV4XyYWjp\n4sB5As84i9X3LvVJCTEOT28/eltXA4/lYjHfu8Uoqjay6dQUMiik8ftgRsnY\nz49WWEmLGhVOGcTh2j67K/c78I371DxVONZb8bL2ZE3Ilj/66pv73KiZ2OK3\nloWt\r\n=ut5/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDGctE5wwlZVfmTp2LZLry9kY/Z8zWuONlS5bJ6y+85zgIgdbSIYEYLIl8SXIJLK5gHnGkBkXfr/kdQ36d3Tx//f7U="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-0c9d426e15857255a968a10fc0b611cdc79db3d1_1599232148094_0.9047709496512406"},"_hasShrinkwrap":false},"0.0.0-7a2fd36e745cd87405923a7af3dd77cc45f398c1":{"name":"type-route","version":"0.0.0-7a2fd36e745cd87405923a7af3dd77cc45f398c1","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"7a2fd36e745cd87405923a7af3dd77cc45f398c1","_id":"type-route@0.0.0-7a2fd36e745cd87405923a7af3dd77cc45f398c1","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-dLFH06Fs0MSQ8pxBffvLi8QJO6WDILD3h8EtB4ArO4NOY4WkVgTE3dd2NgZReHSp3QjdNhap0v7KDGIRfJxWvg==","shasum":"53f2f107b8d8482a5c85d61af08b3d05ed32f5c7","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-7a2fd36e745cd87405923a7af3dd77cc45f398c1.tgz","fileCount":54,"unpackedSize":1175728,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUlixCRA9TVsSAnZWagAAm1AP/2TUKyVi+R66Vzdr/+xf\nvyMuZR5KEoDm2m1VVbr30ta2SQNa3LaX77qxRHHkmkrNiR7iAa3H/TNJq570\nN78ccuTEJEfdBQn5w2WAZC7M0wONrIULGX7JOLUqkSuLf14jRFTM19OMzbJn\n5Kp87luht5voBVnqZwgCYr7VsN1cYfirbE9rTFeya6Xb/WjY5FHfForWpEG8\nYi0T6oFs03CJmU6tgdOCi7lcoz66UOnUCkLdAlXSrfY3PTO93vI2BfFX7WkV\nnQ28dBLobztiace6PIGbsCGI/h2RNdFm29pUYsMDyG0au+teesHT+kWwEn7l\nw1+HyfV3bMqiJDEC1LZWe+i1k8GEpu/OxydjHmme7Ur5PzaVqA/NfmyBTRc2\nu6EJYHFqCwS7W53HysYXfCSh6HIKpSq6SlLXeVL91Wjj5DwiMLZvgDwyRXJW\nqpouQDc94hUPi3IFP40k346A3EMMMdjt3XCmt03pYdm8e7sSva1MYti6VpFz\no/4K+SrzJ6UbuorGGFG111uVQWrrYHfjLAmBzEqGkY2jJM4wqueXLcB+YFA+\nZ7WeqwjxIxb7I2TxpVGrjV7V3HLBEqTthTLrFlUXerKWmWMfaf7B3DQroFVN\n5VVuxbtFrBpsXX5osBiHyfb7vHs1oWQ0tSGYJFXH4Oe4ufa8oi9c+II6Ky8v\nuuD7\r\n=jRA0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAhWsoOqjezvLsTotVlKJ4qu0cEYoBpjSGV/QCHcJsJ7AiEA8WDoZZUxRMc8YpDq8FCDbLlmCT3kPoV3N4djQ7Tla2s="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-7a2fd36e745cd87405923a7af3dd77cc45f398c1_1599232176809_0.02613429481460261"},"_hasShrinkwrap":false},"0.0.0-954cf2e170cbe4383eac370d1a45c16f9c741d81":{"name":"type-route","version":"0.0.0-954cf2e170cbe4383eac370d1a45c16f9c741d81","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>","readmeFilename":"README.md","gitHead":"954cf2e170cbe4383eac370d1a45c16f9c741d81","_id":"type-route@0.0.0-954cf2e170cbe4383eac370d1a45c16f9c741d81","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-2LpN+kXY1tlYegONsqsCcuQYZ47TYw7jJ82LJSJpx4zaZ4H+HFOmNi5MCVxG5fOLVNftN1heULp/EC9W0xamAQ==","shasum":"9e828ff103b2cf92ea548e261410e3e502516003","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-954cf2e170cbe4383eac370d1a45c16f9c741d81.tgz","fileCount":54,"unpackedSize":1175728,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfWkE/CRA9TVsSAnZWagAAh20P/1Gpv1Y7iPD8WCARnkYv\nPhDV0ADbkFsAGVsw3Ni5Xzi1WQf4qqtmCT/9asO3opRQnYxPFyBHbtr8+m6C\n0GDYyRzh2UlYt5zuj2uIHgu2VRLsm9Abf3fDWidUKQYOZ5l1Po9vdtzspbrT\nTime71OlY2QGzi0hdL86QjbT64xc5yINtZzSfKlXBTogUCmZfYW01YkrgWhX\nhFG5FyKq0Rd8IfEclPAfE8c7fJEr9cGa5XnZ3gcEJSCoyLOrpPou/PqvY9lM\nmQS8YPa4369XIbh8kVSKBsv045NB39sxsv9R/+F3K5cTrKfiu5ozP3QoQEz5\n1dnZjs6RWBo8bRDKHmzsVXfGdmCvkVmQfI6h3oaY9RaL/L77hBCaV+5UrGoA\nXJtDRMHpu0iUSobzZ2/AIFal5+8BdhAg/b9SoS/6FKT4rkpWO+5A4fC0GjbG\n7ybNYTqFnCS0n64FE1L6vPwH/i78gGraGXXC0M55QqWg/T+0tX+RtEgHHBht\nBE1r17IUoq7IMvR3t9h3xsb7rHxLlOrwaYvWQUtdV37MXdSntPvbeHHyeWSQ\nw0nwZZwSB7zTRhIT9K9riwh1iuTatwm4EGnOH7kcZNw9Nt67cbjnAp22XA4n\nbc5q0ayIO9TG3HLeJOfE+9gLBDe5esNYSgSLBzDNpe3UKkwCSOukcNboBSRf\nWvyp\r\n=jGPU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICeYx7m6rf3EMJWAuTYLquefvS/sxvLVNsAr06R/RpiHAiEA5tuhC6lQWzdqAtieexNtZX4338wANSqDiL+WWQLp+eI="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-954cf2e170cbe4383eac370d1a45c16f9c741d81_1599750463011_0.175067076951668"},"_hasShrinkwrap":false},"0.0.0-cf43e74d188405bf72571d19527e6a58644025d0":{"name":"type-route","version":"0.0.0-cf43e74d188405bf72571d19527e6a58644025d0","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"cf43e74d188405bf72571d19527e6a58644025d0","_id":"type-route@0.0.0-cf43e74d188405bf72571d19527e6a58644025d0","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-qW9ncIN+61kHFFqo15yKNMoqv9DFl6KMCYAY2jbjbA5d62zeeTySHSLrPbDXTyUY28hw1O1lIrHA73i1vuHwMw==","shasum":"1e9272144fc1d4f6680bb1e78e32167e3c36186d","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-cf43e74d188405bf72571d19527e6a58644025d0.tgz","fileCount":54,"unpackedSize":1175765,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfWsE6CRA9TVsSAnZWagAA5i8P/RoQ/FicAiq9G0xmsLNg\nXBGznkpxOnlZOe5fbPiJrW6E22KvekDnwDInHDu8tb2t2p0jZQ+gpElOarcI\nW+xFIuX6Fxofd3Xv/oTLl4bigL6C9eM5gBgx5R+MvwIuKAuhqoGTeJX20+GX\nOQMWXmeFDeiIrQlqaaPQ6Wao5Oo4p8L/80FSvmaCu35/DGKyTuPh+lfCSAgQ\nVzF/+zdTxZRtVki9QJaf/2Zv4JQJOzufZCQWBbyGT0nfBIe4+sOW62EPMGNq\nkaG8DPOpxeF3EA6rL7HgofJ4lmAQMiXemyW4UCgIvaPWDmuvBM0XXdUaLkMY\nIttXZd8iqBN4WOreyV0GeaKwxfATv77eGTdsh37Lltgon/LXPEECAzJ5FTAK\nMyr45pf3aQAjHpFBREfN/CPqN5DfsGiR2+QMs64ntwNUOlywICkkuPmcfgJS\nLUymvpkjaG2i2/u81SsUBWGrD6FOPkjQDioVD8FClVRMLqdERcCE8yQW77kt\nvoYEctNGX1yZLpUwQQHaOYAz/rHPKdwTP0sbtR7mBLwadqK0Iyx426sVNGL2\nSV2+LFhWnjbYAcii2mnux+k2q6VyO6QM50Jham563hEyCi8v87UL42hZTG46\nKhAwu7Bk2J0WBLqAEwtGDhfPj2ima8Rg/EiWhWy1QES9nb0y0KpHFZhP7xJg\nWATW\r\n=yfJL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDTKd43ru9yY1TXatrBwSFx10LwwEJLr3vHeity+ToOagIhAOajN4WcqgEKy4fpLkjEGKW21SNpoBIX3cmiQofWSLfg"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-cf43e74d188405bf72571d19527e6a58644025d0_1599783226265_0.9663495210907989"},"_hasShrinkwrap":false},"0.0.0-bb7c4ba00ad1d077fbf3b5c9a13486146efa2375":{"name":"type-route","version":"0.0.0-bb7c4ba00ad1d077fbf3b5c9a13486146efa2375","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"bb7c4ba00ad1d077fbf3b5c9a13486146efa2375","_id":"type-route@0.0.0-bb7c4ba00ad1d077fbf3b5c9a13486146efa2375","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-uyIZ2VORaP4vlTKdTy8iM95W+PciQhi4R8Qkra2EjdICn2y6OPYVnjTr5ShiizFAN14eo/vtcicAOJhwLE6U6g==","shasum":"ea817b97f1f641e4380c7fc121495fc0249a7975","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-bb7c4ba00ad1d077fbf3b5c9a13486146efa2375.tgz","fileCount":54,"unpackedSize":1175765,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfWsFNCRA9TVsSAnZWagAAlEkQAJMHVG0XDbKEA+w0uLJV\nsyLQhDuzYL5QRjtaYuak3IIWPo1lRboR5J4enFyfNPxaxgGMG3QAYRQa0LMk\n+Pd/bd5qRgMa8CNDy9mWozFg/ACevI0Vt68kjQBiQBWVj/jApSsEFgiZeK25\nflJa+Ay/3YuvyfctR19UUHAz07aUAGmPQvQ53veAUFX7L6p9qrpvoSTzhAEv\nTiZHUcAp3eoR6FKK5IBoUyJetaIJMMA8nouv4gIFqRHTuydQ5aEGRJpErWVr\nCf8JcpZKmQqAOE7RI/kebPhu7Wn2jYMdQMRf5nFKCujdt12xE5bsGIzhucl9\nkR/nU0vSIVmBwkb8ndLO7gc4yFu4ML/dLcTWU+rPCOUD9vCxFlzp70m5NqYh\n34A/OBFEyL3sxk4cDJ0Tm7dRBJnBjKfLVqGx97pA87FST67gyk5vEhtbOPEH\nyWoAebF+dxHu+ZGNryAjd2JW3gydbVmsq9OpaaRCK27fkpBwqC9s9Gu9EC0n\nJLae7K6ju0LpY9WsQOPJVWGF848JRSgNUqxuMixjqt677X0+J0eE03SN7aRV\nAG3rZEykPPC2LPXB8bbylZ6mmwsNWzbSlyehh8wdpMUpFRxqszb4Sf3lzLBI\neqfCVNT832gXAb/gm6msq0wKbn3Nf6KD5mwDdLKGeT7OVwsbAPC8Isayiv2X\n5cWn\r\n=UaJT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDYa+AF1a5TIAv5V5AcgKxMlYsKRJZS8nRrOzN4xpuYvgIhAIzPjOH5WOQFqq5Qa38kpwTgk7eyF4ctdsSmUrNTCizQ"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-bb7c4ba00ad1d077fbf3b5c9a13486146efa2375_1599783244996_0.8489364273054434"},"_hasShrinkwrap":false},"0.0.0-43ee0eb577dcf4869fe65f68d0fea7079b308a43":{"name":"type-route","version":"0.0.0-43ee0eb577dcf4869fe65f68d0fea7079b308a43","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"43ee0eb577dcf4869fe65f68d0fea7079b308a43","_id":"type-route@0.0.0-43ee0eb577dcf4869fe65f68d0fea7079b308a43","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-1dXA1KLtKcEhJPkGWWVmInJzWmyPlujHm/qpA+LazLIuvCD6h9CFThuNM6JMRI4Ma6+fZSHPfWwGYIk0l0TkUA==","shasum":"3e7a69dd8fdcb8f987f36394d6be79522d34f8a1","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-43ee0eb577dcf4869fe65f68d0fea7079b308a43.tgz","fileCount":54,"unpackedSize":1175765,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfXOMtCRA9TVsSAnZWagAAlj4P/1yeN5D8y/nZtdIs78Ib\nxhhrKcgofJ8VVxflp12PWSo7UkUF3tb5h0hOdGeMORZTC9hBVQPDPSpVvZJU\nrP1UGlRqmdtC5TUneFv7JoUfLfjIP5l/ORqbs8fK4a1iU/GsISN/3akR+phm\n5aGvtCjFdd7VYNa7z21NPGm1vrkb4FNAZ+M749rVCpqjvcFxdclgVczvW7ck\n/i6gOsCAUg181h9143U+gK2XLmFX4EKrkBNI4nuZ0R4GEH7tpl0TUUaJOG3N\nsUKQP8YzVe2CEqUWH6ZT2K/R8C/Td4hmd6Oz9lJN7KRibDYI9G7mUclxno0L\nE/SgyHGtoHTTZL5D/38GzSpQaZr3kgShauCtMuKNKiLF8rxe5gFZwlZsr1gv\noj84nyofAgIuUiX2Ep3LgzVqq93rbHX2dDD/DDez2NcocNrnwfbXSSsc01In\n0vmWNW3BXwtStfVutUlZwqTIYxH7jZgxcO/uVWxQ1EA1yNq19I/0ZvjQ2/DJ\ntlvkFYJAOsZbedv4fGrJQnhspYH+eniNM5IevJH6SM3sWeUBTBMucUQyrxvL\notUUVj/k2clrlcW8MrACeBDwyh0GlTT8OGCmz0miiEtfTapHs2uyAEbDtFSa\n9e7QwbPowVWDcrjyoAD0pS3Ni4MxjmZCWrjVlCKlN5FjbREEcBsPrrl4faH5\n8Kbl\r\n=b13o\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFbHEdiceIaWCpTfBpnHV1L7KYsU3CBQskVeUYQMz6xWAiB4IMi8B7ELSjVylHL7zF5UCZ77gIWpMDRE0TYvOUCm9w=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-43ee0eb577dcf4869fe65f68d0fea7079b308a43_1599922988991_0.3524893715975985"},"_hasShrinkwrap":false},"0.0.0-6476e9dd2d9a86e980b93b21cfe78aff0a63dba2":{"name":"type-route","version":"0.0.0-6476e9dd2d9a86e980b93b21cfe78aff0a63dba2","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"6476e9dd2d9a86e980b93b21cfe78aff0a63dba2","_id":"type-route@0.0.0-6476e9dd2d9a86e980b93b21cfe78aff0a63dba2","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-JtoTmW3a4M0YmUg1dqqwIKgw+rr7NodURafc7B2rKE2cNW2zsinNymcGDjXbulEKN4kvhAtjLfT6xnSsQAH0pg==","shasum":"1a57d71162c40d1eeb504d0aa94f5b18dc767770","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-6476e9dd2d9a86e980b93b21cfe78aff0a63dba2.tgz","fileCount":54,"unpackedSize":1175765,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfXOWhCRA9TVsSAnZWagAAMscP/0FoeE5UFF5TbfYSPA8C\nkie9GbukQzZ7B5RLDNrrOSe4v1GnovRfua9rjIuLLW5qNgpskSCreOZKzypt\nF06oLezHL97ueCJCBk1YZF+0qzrf1FHKILl5P47UyA842PdtnwB0fhu51VJn\nh9wG8dPE6aHgJcu/A73R1riS6FL1u+I1AfgmWhxZwO4Vqw/kD2XM09+B2g6M\nR10Xuwgc1ezwb/v97nSVdHpECs/SRwd4ghWW/pL5cFpzJPBgNOrt+FP+w1iC\n4oby8g7qbn5zXY0gpyUEZRhFOtwbbfLqvzo6jCfhWkopjYROo5k4jx9tlEwM\n5UItDKHEwcxDKMrP4BbWMQi0a6euyzZTMx8Lg7hQUJSTpNk8Zo5scOhbhPXJ\nnE8eP+lAhAknia5Wr0kpEcFSj5XqF0oWY5jU6vcDs+qQgXZw0igRSnqHk+HF\nMnQ27utliUAbSVx8+fm46ZIaxgnpa4/EfZ4XAdcIT1Rw/mtLOehjDcLW0W28\nCSDEThEJzrJ4iPeNBx8aEtVrCcvAlPpS+eXtXLa4HXs/vJRRPL+u5Bi/wg8v\nWB6Kutyd4QUKeSZqyWd9X1E7Q8uJskMeG6m1ppxJ/Y/1ZhmiwvhYV92xJ9ic\nsVctSNmvSAAV+Yjm3Rixd3I8Glt/66LkrJj7eOcER0HHgP4Z9DaU4jjmBkUU\nVXXc\r\n=7dch\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDUgN8FFr2VTGN/X7GVIRhwfxrZINSkkFKC5VKe3TtLBQIgM7qIJ3mHyq9UJVQo5wx/FSlBPSDgEYxk0M7bW1t2Jdc="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-6476e9dd2d9a86e980b93b21cfe78aff0a63dba2_1599923616800_0.9761436888154562"},"_hasShrinkwrap":false},"0.0.0-a27178963d5acf9f38f03ea6bc611761e29482b7":{"name":"type-route","version":"0.0.0-a27178963d5acf9f38f03ea6bc611761e29482b7","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"a27178963d5acf9f38f03ea6bc611761e29482b7","_id":"type-route@0.0.0-a27178963d5acf9f38f03ea6bc611761e29482b7","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-1cx759CnZoSGO5QSwc5XwZp1f1MqsD/fVHhi/VnJgj0uXZnD5ygCFOUYyBaXnroT1MRZRhWGwCg2Rjz5SdOSMg==","shasum":"1230a7530218c7e93b41ec54d330892ebb1e4893","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-a27178963d5acf9f38f03ea6bc611761e29482b7.tgz","fileCount":54,"unpackedSize":1175765,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfdhMsCRA9TVsSAnZWagAAMvEP/jmNa2UuBpSE65WD7i99\n1zAcfey6ZqmVNFMsh5zq2WpuY+HzHZkOVCpb9lG9eiTFBc2slHiJ/UjGtX18\nqvZ3XgIXY266odVmigkEfGCI/Iq1nAsdQyIf2AHFInE6SgrwafPPUcK6wVxM\nnfPHsJm/vqKSRD4eIUUBJ9sJ4/2BDl99uR71kR4uDShbQHl7QMG4PjZnxyYO\nTyoKSeT3Vw62m6Lovqgl1huxhkV7oOtkTu5VOT6z9xb8vwUPkX2bCTDRWJij\n8xtOwh6lVSMYa3jpXlqXBtdIBUwZjdmjDhI9xmbUsFzBuZWnjF67ga7HEehk\nXqJYNW3ln/OCv/ieNwdrwApZ7qsRqUk/wqBt6j+AN8L8MNJUg7aWVMQqVXsA\n7dyWwKZkPXR8AJw3T8zM31pWrYIK270l37X6TPo1jhtF3rILNbX+54yK9Irl\nEXT5e6M/2SHbnf8nN0rpky2VF5MXwMdYadP2mnBr1HmlDMd28/mZcho1L0g0\n+uoYRN+rHexTEnUcEiv+gQNGCSEFN+yR/SoUXm4RdahLWeQs2nH6ZeWrWOyz\n1TFL1P/09JyeG4mk9b4Jqn7dv1URGZqvbAWtwaHov7SqVsdFyGmzRS2k5B3K\nLbc4G5/zM8R4SF8m2o32o7u44LoWysVIPc5g6YBx53S3JOvgT2HRcjiw/cFW\nw0Cj\r\n=SMeT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDgPzpDFBRdm6PbnzqMln2pPiRslAz/OQVcvPFLLWunwIhALpvJg3sY3qeckZj2lLSfxNLvk7SeC89lYuSKmgsaxkn"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-a27178963d5acf9f38f03ea6bc611761e29482b7_1601573676335_0.23109335305641387"},"_hasShrinkwrap":false},"0.0.0-68917961128e1c2faa8093c1ce84b6c3d8c9d4ae":{"name":"type-route","version":"0.0.0-68917961128e1c2faa8093c1ce84b6c3d8c9d4ae","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"68917961128e1c2faa8093c1ce84b6c3d8c9d4ae","_id":"type-route@0.0.0-68917961128e1c2faa8093c1ce84b6c3d8c9d4ae","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-ljHaZygMEJmjG6kUixRrvB6yU9zyW7/vr6syGaE9fUFMC4En5zwAEoAgIv4CKSGRog3dRdxBPobOWVtPcsanpA==","shasum":"a72cd8389abb56d3af4d1e4c6527de7e5d239cac","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-68917961128e1c2faa8093c1ce84b6c3d8c9d4ae.tgz","fileCount":54,"unpackedSize":1175765,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfdhNXCRA9TVsSAnZWagAA5BoP/jEgTa4C/gDywgDSicd1\nK4NB6rie3KvH4OnWMvi5hW0KDjyy7VFLcJVj7eCoeCOe5VqupaPk3OmXbpQF\n1DS2qoRKrtgqxQS96iTX5v28hwLVBB7N1YUY3nFFS80/uR9FwXcgSGW6VxHZ\nuvA28/rsIQXfpdk7QMoZxjc6c+htM0HGjo7XfFogEnL9UBEIiwbzwAo6hOIs\nBeVPl8w6kr2aKCnlxBLI+8scfp0gFtsLz05QCsdc8x6GaOL1YhPXb8BWoTHy\nJ6KqNrngGIC5ltVBmEZpJHHNH3ZzYN+jzvkit+fnM2or+cmmMmOkUqPkn74+\nanESKxlBCNkuY59LdLsnm9IEhT27KL+AeO+OzNWmsgLEoMp1nNRmlVyMOyAP\nwhBqAU1VRisxe76peGxB2eZ4YSJmNQfsiaXXICGxnNu5I5DzjsR1ffnY3ajX\nhWXe7i0gFJPxwrZc2HtC9aiV/7AfegLfk1OreLKf52trMwHPBn2hksxCR773\n/NF9OKrXaQEAY18djD5kNcioLGNzNnm9+tthgu951IcO4UL2VZ2MKb7oEDAM\nIY3MdXiTg/OehYmVtbyrfjvl7poTt5nixdAJFSOKNi4m+9kscbxngNr8Z3z0\nlnDjXyQm2Yg4FHFIoo7a9hUAgRG6XIKPJlRu7upaKH0CfIOqpGaz2sm/Dmf7\nOJd3\r\n=BY+M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCFjHfCouQ3fTELhkgoFggulLkmTw3yrSxRVoEQiRWn0QIgCkN6UQ1Zt1iRXm1yKrrWIj/e7Y3wSjd9M4oaY8UBj4s="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-68917961128e1c2faa8093c1ce84b6c3d8c9d4ae_1601573718693_0.1279961503709035"},"_hasShrinkwrap":false},"0.0.0-80ee324780ec3c38fb2ec24ac9869f0b2c6ac7fa":{"name":"type-route","version":"0.0.0-80ee324780ec3c38fb2ec24ac9869f0b2c6ac7fa","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"80ee324780ec3c38fb2ec24ac9869f0b2c6ac7fa","_id":"type-route@0.0.0-80ee324780ec3c38fb2ec24ac9869f0b2c6ac7fa","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-ubblnmybjZSsCNuCsQQEOZ/NJfDi0lfJQ+ZJeyQ2QgXI/L0OZuuCSuWbQ80ctIrGz7GJEmCHWasVgMtlXmO93Q==","shasum":"9ff8dd3667950ed41fccd373c0324a2a173a3d3e","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-80ee324780ec3c38fb2ec24ac9869f0b2c6ac7fa.tgz","fileCount":54,"unpackedSize":1175765,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfgHYqCRA9TVsSAnZWagAAxccQAIZo2AMPmnszM+Jk3Tn5\nqo0UKD3PbXyZymSUxOoFO4+uijGzR9wDx0AaO/1a+hAIVL6iHARSPxZ9mtWJ\nDImaCwkEf69VLXLFBpFRouAQiYzea1zuAS13f2tCO1p66CokGk9wCOR59Y+L\n98Y9RpHjZdyqNbLSyVQPahOeZlnQUv418tc++HWP/yrS/V5X06RgC+WD/tWy\nj+PU3pafEwyRFuFaTHL084jUVprXsHVO4IkLt1RuWvvSc7KU2tmIlLca3rVa\n+MXX/+rinf4SF2XPZVB8wjJYwuMI7G3RVo07cjyEfJqmcN9gMZHtlxr4FICq\nfVRP9zDX/a8FeTWfaj9uwuzXmv6EtFb4YtnGXyRVq2hkDDHPR3BmFlAUKNTc\nXY1K5xvyq/dbWij7tMUwzndFlIVAMosjwMmF/litVJuMLi88OjFpW15MNdoO\nHi1/Y8N/w2T0D3XZ2pTvmL2WXjH6NASDXcmaHEKOfMOKkfsAErhqD5dRj2+i\nOfY2wwqm9w06g+VfTFXmM4d8JlvIH1ECrnDNmtUF8riX3JiyeJxI3bWa/olX\nEiaE/TmcYawSeLDWp9vsOdNxVxYtl5AmHAR3Z1WVoHBiJwPnc9lDrP6tLmkW\nb4GZiaPOaz9lgzr2WW2+feNjFhCI4J+2BGs9AYQAn1l/mLMu4GGy/UKzq9+d\n44li\r\n=b1ys\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA5D5DGfv66dn2w5qiM6H49rvTVRnA5l2y0zodq9osBaAiAZvmLSWcOw1NZcYeULB091Qib0pppHPXJHRwN2qjynjg=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-80ee324780ec3c38fb2ec24ac9869f0b2c6ac7fa_1602254378292_0.9687938941345862"},"_hasShrinkwrap":false},"0.0.0-121a22eea2f0251902cc135141079c09373f6494":{"name":"type-route","version":"0.0.0-121a22eea2f0251902cc135141079c09373f6494","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"121a22eea2f0251902cc135141079c09373f6494","_id":"type-route@0.0.0-121a22eea2f0251902cc135141079c09373f6494","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-jJOoDL3shw1/juwrFTHpXStzqEyeDmPynyF5EQJWyhgu0WyeTRdkEnpUREK2CSzdOTkucGsrpuun+vMkaN6XLQ==","shasum":"854780455b7d51527d9ea8a34edbafeebfccf2bd","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-121a22eea2f0251902cc135141079c09373f6494.tgz","fileCount":54,"unpackedSize":1175765,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfgHZbCRA9TVsSAnZWagAAeHMP/i3F2X3GfNOY+picUqh2\nVft6xrxE/fLs47M5Pg1D6lC/NVyEt6y88gcrMrf9ZX1ibyT6dOcxXPiGoNMy\nlWz2rjicQxsoX5AiQSm8bAkZTOqsWDjNqci8kRsdjbI9SF7Im1dbIldb4gdG\ntQcF0k4PaGCueR2wmFBTUEp4b68iGbivq32NomcZAHEcfr1HIgc6mLwB6h56\naVn1DnV760On3+nG+Za0cceGMp38/Z/ph315198Ux/5bgRL7fxBVYuMiTzCk\nFyS1PQnBTlxAvurkwxwPKXn9f9C2yDv2fq35LI/nrH1Y0OcIEISuQtE55gYs\n+qXbqYmCPtv2zxFrNtSWsoDNpfN8O4U5xsQXWocYyvsNQepojEqomhyxI7JB\nz0OQsnF1e9vB31FS3ATkwUw/QRV2oBGB+/A9Hh06mCaO6udqil7BBWwYlm3Y\nUuMG97hhMtMsbTsMfKHRyCi2JwHuj6H3AoqxoJ5DY4wTf3D/EUkxDpH8O34d\n7wKUDzFH8B+NRPi9slfcSQAel8xZ/ANFqqfOSCh24E4LnQOMssZS0pSpgMWs\n/ZqGq0vH/uFraEhY2+jxBAmEeSbaFhdFk5w+AqPjAbl/2ZHGJDHniIi66XiP\n+ZgLoR+UqpRuV3EAa5BZAIJuz4QEa+WUXo5NFeEjAMNErn72xacfHqhzvLiL\nz4RQ\r\n=aAGc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAkFaqASTvugaGF41SUOiRVLK5yZnMpnSW5x3vpFR8MmAiEAhvis9CCUy0jwEaXtFfhZmUvNcqVghi8wCoNrZycGotU="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-121a22eea2f0251902cc135141079c09373f6494_1602254426909_0.030788442092047452"},"_hasShrinkwrap":false},"0.0.0-d657a00e5cb8fefdc044c819308660f3d532aa0b":{"name":"type-route","version":"0.0.0-d657a00e5cb8fefdc044c819308660f3d532aa0b","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"d657a00e5cb8fefdc044c819308660f3d532aa0b","_id":"type-route@0.0.0-d657a00e5cb8fefdc044c819308660f3d532aa0b","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-qkJk6wg6mHC9OAhjMytM9DsZ/bfnidw2NYbop6/Juh+wqhDyQeodDTJLUQSc97PYKG4fwc4rxVCyAmWQjidTAw==","shasum":"aebb43628afbe874c9fb7587d599b39691eb5a83","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-d657a00e5cb8fefdc044c819308660f3d532aa0b.tgz","fileCount":54,"unpackedSize":1175765,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfgHcKCRA9TVsSAnZWagAAVyMQAJdOjvGERVzgkjxVoAFX\nIb4D0CZF50kPnhNEQT7V7XabNTgprRcaedzqz4O3gzTsK9LlX3nKFDQedbfh\npujfOJ56JtFH0Z8/g2xwdlEHWtSP+P8DU+I6u9l1vd9VO7vR7fnOlH2OxeOT\nnTIQrIqkhhfNpyLqUvhTS+lHsXMMJrpLWbqRmj5JohrsoXhOEpNoeWId/InK\n0okkwPDQTV8kMu6Zs/U0ZUZgXOblYdqwvqAcToWsuZaiSEP2bsnGynwurl6S\n4DabK4h2kjioP/b83vso787WwUq0Z5FULuTlYXIf1IB2HlEjW7fls/3pZ9Ph\n79/eTjyTRnO97706Lsf6JEkg4Pv1Jxr6DE2NPaWK3dD+WaqfL5g//XDmyI2t\nNeqimUvYcUNEUZW/hFnbjVtW/OIlQ6i1LiAY2AO1/TyAllxlJZjGIxdHjyvS\nBC73CTymPFIeqbFTNBWIB+9fSPHLxdq23hcnKPS1UZVyyt82Pd37KJ9f4at9\nhAtYYylIUX4QdVLlonApmWkfFu/MP3AprFX8Bu2+BKrIMuKJtJeN7FozR8DW\nFydn4g8tcSvN7xIxC8g0c5zYhjLCkJ7DG1L+SpGPGQCRGmapiCPiwmHHYBoW\nKcjHMVjwudtcu0Xjfg3nxAgoEy59SAYKg9e3Boc/iECJkUPScg980ykWpB1+\n/601\r\n=Sznj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAnkocCAbg7snQ6IT8NzKJXdLUxv6l1Kp110gfUTqEniAiBKjBf61KbwGvsn4+DythI7dpQ7Hu+xjIpR6mPHw8XTUg=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-d657a00e5cb8fefdc044c819308660f3d532aa0b_1602254601601_0.9755737660599413"},"_hasShrinkwrap":false},"0.0.0-24513fb6cb6a0fecc202f7d2fa26ff8c14c86665":{"name":"type-route","version":"0.0.0-24513fb6cb6a0fecc202f7d2fa26ff8c14c86665","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"24513fb6cb6a0fecc202f7d2fa26ff8c14c86665","_id":"type-route@0.0.0-24513fb6cb6a0fecc202f7d2fa26ff8c14c86665","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-PPVcR9SbLDGnbwbuSC3oiA0v3iFoVigILoGXYQbYZs+NxVhZtauGjt/pkYMc9EPkx3USiRLOTtGQOXUv+XE7Cw==","shasum":"24bb36b0fa29aa6bf345b3500773cf7ef0c72f58","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-24513fb6cb6a0fecc202f7d2fa26ff8c14c86665.tgz","fileCount":54,"unpackedSize":1175765,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfgHcYCRA9TVsSAnZWagAASuYP/1AFs+3UloKw15wRMbXT\nUDb0I54ITjXE9HFLCrPWbQhKej8+eppFYNepDmqd+XkakoFIua/2zo+2JGZz\nKLS5auOFb9vZvlnoaktSlUloHVD3b8S/WQ6TuUeDcZyKVnrklubYC24A087r\nwRiOd/gFOqzedaKB8lbLwqrVkDEdvvrY+j5cVUOFVga2YqnLpZmdWgCg2gIb\nOAJulsPGWxsU2g4HixCC6JKHvmiNv327QQ20vGcLsS8rR3RbA66I6F+2JJs8\nTTVgieaTFcVkzi+RC5RXTXOJrsWyXTk4UMCbOccw+s3ONhzZAZF5dA6Ed1Er\nvhMSuKMyGL4oRTZOYs3mF3bp712nirgsLhliVO3LIlq/CEE0s2W6mSTfRUB1\n26QL1fU9OPonMYR/pdJnB4/J4P+RMejyy+BhAJIeUCXMuJUu3kCpTibgAocJ\npxATJ1R/xR9yD1A/okOuZOQ+YCQmU143wv28pKzPHF7tITdncM2fC2ViNa6M\n9REle2DwxcyzNhiqW+fB23h+iWEdvyWV1JPy1mb4Vn7cejihRS7detY5lkRZ\n/DOXGf4Pq1QzRBHJH5QRfycgB5KQL/dg0eSTb/3UKK8LSplmxLWkO540utgL\nOWEW+s3kKGkt8/bdyai9TNRZchGhfsim+ROmuI7uWicPXJTM/XD7w/GgyCeP\ndY+h\r\n=jP1b\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD8gqxHElmVmq/kHY7tsoFoNv/UWPrO+too6+24I7GaLgIgTU/bsdgq/08rt5tBi2vrZa16QLcQPZXqOxGERPhuERI="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-24513fb6cb6a0fecc202f7d2fa26ff8c14c86665_1602254615807_0.858464935705419"},"_hasShrinkwrap":false},"0.0.0-d5f01606f8649e7e3f0928840df2b79810b2dc39":{"name":"type-route","version":"0.0.0-d5f01606f8649e7e3f0928840df2b79810b2dc39","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"d5f01606f8649e7e3f0928840df2b79810b2dc39","_id":"type-route@0.0.0-d5f01606f8649e7e3f0928840df2b79810b2dc39","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-pnpb1fHJeM2Owe+Zun46D3ZvM2Cs0KbCg3icXMcSa2Grn0nH8saFnZTAmbPKWjTcmI1424W+VBl0H57epZjK3A==","shasum":"ff2c554ec122d23cdd5bdd8d322beed0810c98eb","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-d5f01606f8649e7e3f0928840df2b79810b2dc39.tgz","fileCount":54,"unpackedSize":1177114,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhmgECRA9TVsSAnZWagAAtWwQAIVryY5DpAmkmVQ/C68l\nEGgkLxSNTdZgpH7MGMBd33wCEHJUq1CEgo9ciZVqflutQPsZ+oXQH1IipHU+\nnQbKxHecvohCPd6gBWi+0h94eFpy2WPjBL0He0Nxm2gZ61WO1aWVSr/MM426\nxkhL8agxEOSrDtnjhwhaxxE30ZWCQ0g+Gd03RkVM88M8kGD3nxXtYG6Gnl9E\nwmlCGRGfvIX3p6Vbn2RKP2wm1cWHod7s2wLH2nfa7hb1wPLLBFRAyyBR57qC\ncxOWppRJfuWyTFgWmqML0LaAdoZ8Hn9Hxcgftg+LV8mkG767QaCPgnsnziIX\nPB0tAiVrzVBgxniZ7c5C6PydyYhIHNJlw6yo4FeHeNUteyrKz34ytriMdXQs\n/C30SeZtW4HGH2UzNFC3mP9W0fbgyGMl8xxtQnrfXP3ddnmwvh+zGhYOVWEa\nJnAgADxw/7hyD5FDqHY/sn81vipAQjhsRNnAnvN4Ku9lBgHWaQ2LbSHH+dmb\nkh9UDnZHbnGjokH/a4WVtqj32u9pPx1NghOQGlwD7vQdaotNK9BVrLAOixLN\nBy6ZbhBZQQV9a3opmZx0GhI8VtY5AZ/oHAzQOfoTkkDFBSrClKjH/kByzkF/\nw+gGkL7sI8vXOd6LeGjXiJgd29I+QNhpCEVdpOP14EpEfvzktMdWAmLdH9im\nexpQ\r\n=igvq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDYkdpzSNYTZP797iw+ugg/8J7o6rJOYRZ4R3QUC5SHogIhAPY98xxQHu7X/Vng9bMZs1sq0E8Jke4ZPtKelwfl8cXr"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-d5f01606f8649e7e3f0928840df2b79810b2dc39_1602643971461_0.5064159005938205"},"_hasShrinkwrap":false},"0.5.5":{"name":"type-route","version":"0.5.5","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"gitHead":"d5f01606f8649e7e3f0928840df2b79810b2dc39","_id":"type-route@0.5.5","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-FJro2r8zuKWbraF/w/XRwKQNsMhcZtnQE6Djh3JwmQJ6SbHC6FyiYQ/QoAz9E6HGDXl2o04RYdtWnBZTXZ2Pgw==","shasum":"98b274a35219cf9990e96626a1addc2356ae7911","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.5.5.tgz","fileCount":54,"unpackedSize":1177073,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhmhZCRA9TVsSAnZWagAAdrAQAIHx4xWfhg4kBV0YFQu6\nKWg+Yr2A6NXk3M6cVqPsbBFwJ3r38u4ppPhLVSBuZjGms7P2HUoiwS/BtAZl\nm/L5ekIkC33VIsYibAkyM4U1GwfLW/iNXzXlUKBNwO9OzpNeYrazVrp6Vfz+\ndaoxZen72qQdvsRRXkS+4180U72F3DV1RO4nbjS3kMXtUxIRjRt8BDWORftU\nFGZRrL4WvKdMshh7IKVcrtgdbmQe7Uub0sXaDgA58oR5rRLZWNJ4fsG/Nota\nd+Bk7bdsvvo7gBU0jc9Pc9oiK6BT29MfSlIOms6iVFHbcwxTR0t9lfhOBhKN\n4IFfh98pYVRwFsr5W2Cs19h0NT9YW6sAKwwOsSxle2qIf4Q7bfbwGQv3z+ci\nVjvsdQyoED2W78XxvTLN7RCsZAZtopgq4mmzvmkQuMARv915OVpcBsRBf4KL\n8AGclopIBWl5DrWmjAXrpJasQdiV2LEr/v9irqd7yca7PC7jQ1cMSPaW1CCW\n7q/OYBgK9R9Cy/JTA5drlYTDEaLn54F+QBNfaYA1QePR3Y0jEtarLgPULzcp\n0uH8BvrPSoRpAykKX0kYODxjHhZjX5ZoxQiCJ1hMC0EHnKTlS5UsFJCyiQKw\n7mrDuDRl4U2AqwzM4gtIARN8C7jFYp5Snbl/9zY3Mtppxrd5dfZR9wldtRWt\nsGDe\r\n=Rok6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7xawhymkWdzAU3rnFx5pCuhuiefrsS7VPiSUGGIJ0nwIhAI77WBGm56KZQZhdogo+fkuLcicJP5IMJlFJ1hg9o/Nn"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.5.5_1602644057266_0.3776904252193587"},"_hasShrinkwrap":false},"0.0.0-d77f683beeed74a87a4ad8f893dd2f08472f73ea":{"name":"type-route","version":"0.0.0-d77f683beeed74a87a4ad8f893dd2f08472f73ea","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"d77f683beeed74a87a4ad8f893dd2f08472f73ea","_id":"type-route@0.0.0-d77f683beeed74a87a4ad8f893dd2f08472f73ea","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-6zLdAPrTFnH11EUPTI4MiInlzPoLG+F6OYxQa5CYeXTr1LWf7H9JW5yx/N0SX8uDcDZaFtNoEdl0GzeKsq/SOw==","shasum":"393607a1218991ba92bc86d51adeeec72bfec52f","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-d77f683beeed74a87a4ad8f893dd2f08472f73ea.tgz","fileCount":54,"unpackedSize":1184430,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhnjxCRA9TVsSAnZWagAAqlMP/iZAO+6SllizrzZQmanu\n+i8TSttA6ED3g59P9fPOLc58vIT31H/Sl8wDRXrw7V8wPZ+KRG2W4TP81ajP\ng1oXi16pgCttgpHzy+MN/8zWUbLzO1bArEs0kH4/iSp51iRBay9CkaJXoMo5\nk2tojjjlRvmtLM8Qq06gCoFv0I37ssdWCUiPp/1Fu3OW+eZiZZ6BU8xACZof\nRx2YbN8V53EQjOdqiYtVJXhdFopUwJVZo6qQmWCyjLKB1cU5PrgzafEsalmh\nJfpvB4a0Wci1BcaHGDQfZSoDVx3Y4aPL3DlwBZPlY3RPmBkhd56I8oyEXkNc\noTZmX9OHypjRsZh6hJkMO9OUO80Z6DxVO7pGQ0ig9EUNhmclRdjtZWGRQSno\nI06HTKK1o+c5YRbdjbTYqf/LLVlmoJQusNE3tIqBJwqtS0WzlmSKGAE6LkZ5\ngGKFk6HDnJdlcGAwO1IPmudodR43eLB/wsCH6ANxKK0uVmChvvUrKMmvV4N4\nkoiu0/XU3pu56elikJBR+axxX6hglDLEIBp/ao9r641MbMFPvh498WNrg7CU\nDVule3ezFO2YPU4YNTqbaBqkEp3bATAimZtbeEfp/EjJAwKnG/Vllcai/ScA\njopaPJsEJbg724CbHk+O225AqeWuynA2NWeEv05yr/z9RORCZignePdiTVrs\nFocW\r\n=Wh1P\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDnRIdwcRq/nkFDRW4+qmucgoEYloHCp/OVskdY4Bmn2gIhAKfb7eJi+m0+pcM7sm4N7OLmq35ZvDoqpfSCd541IocC"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-d77f683beeed74a87a4ad8f893dd2f08472f73ea_1602648304801_0.6253147793383378"},"_hasShrinkwrap":false},"0.5.6":{"name":"type-route","version":"0.5.6","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"gitHead":"d77f683beeed74a87a4ad8f893dd2f08472f73ea","_id":"type-route@0.5.6","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-7CgDzMqdtWLXZvzBqGmvO+Ta2RcC5wtvbWZBpoizJMMNohYA/DN+RBAiVyUQ3EyiJAFc+L6+/E89ax/YCfUSQw==","shasum":"a93fd81d21f4cf9ba2095aabd6d1a10e433ce80d","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.5.6.tgz","fileCount":54,"unpackedSize":1184389,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfhnk6CRA9TVsSAnZWagAAZ8QP/1vdtwAryLQACJSn80Te\nHvNlYay1p0umYMS08VCzdrR9kElT1Idg7A3D9xaQlpgxL8/9s1EneYPre/wL\nC/gkd2ULkYKyWKMckVUofJfTQ51U2jVgW8jlaRTujJ1a0TVyDfR5DhMphJjL\nfNn35orFDC8J/GchTDWmeudbd1xwdYrHdkoaMDOIUHfhKFJ9Y6/XoiMo1Xae\nLYFsuAdNGyZKobdXaooYj/ykoSKfhPyHPSoX8QHQ+CdVwFBpQXeatYeqo3G7\nps6FnmQVDIFHQIjFHsuWxkAobjeHrFUuk+zH0I+Yk1JEY+0WCHem87ghjhy9\nbJpUJ8bMxH1sTm/8XIiOIz6qW8Pvic/25MGKxBhfZ8T2WzcxClwmCoFGzytd\npUW8IOD+ysS9shLAHm0I1Qen7vxE769TJSmlNcG5c31HsJc1KIhBUioIIKEV\nq37rPMEGc79pRoxVGlK36vsSjfv/7p2wpFfnHh3WBxGDXxoyfDYSuxGHGu+b\nqcY/Wdy4I660lRuAKGvpiU21PzdUMO512SkUCurHIhcCVOTn8rkEsD5v4CgZ\nE+zGFlBRTTT+V5WpNXD5TtvwxKouI+/ETqVaSJFl+QSdos0Tvo1J+FeVFfZO\nGRNrarA4r073sHu7D9WwgMhfeGmEUs2jeOcYHtGOmhelkYfThJSB6J7Lq0sc\n8heX\r\n=Z9w0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE196oaSo5vrTav4S46f+7zGRji7pg3GEcM5gLJDEYzdAiBZP3dC4qLjidVQL3UPLpVDG0YwOkvERBCmfXmW5mi9xw=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.5.6_1602648378296_0.6630528825141215"},"_hasShrinkwrap":false},"0.0.0-3f96dacb2c3bfd284f394efddc58fd4d3334adcb":{"name":"type-route","version":"0.0.0-3f96dacb2c3bfd284f394efddc58fd4d3334adcb","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"3f96dacb2c3bfd284f394efddc58fd4d3334adcb","_id":"type-route@0.0.0-3f96dacb2c3bfd284f394efddc58fd4d3334adcb","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-5GWMIwGlLwuyh3xFWOY+BVFDvpDN3q5LjiVm2AmU32i43DjAN6mxExEToknTpKGvN88oz4E52aHDVo/Q/5NRvw==","shasum":"b9010b9372e4b37068fcae69e45a26c4836b7db3","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-3f96dacb2c3bfd284f394efddc58fd4d3334adcb.tgz","fileCount":54,"unpackedSize":1184447,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjt5wCRA9TVsSAnZWagAAp0YP/27iY374a+RNtdaMtCTl\nt1e0JAzoD339Znt7VV3sRJLoQ9kfDe1lKXhZZlZEdPgYYmWghTIGA71FcBmr\np09YjYaYruza82YbiTRyprlIC6PQxamADAkcvFobxHTEaf0CId/B0mxyIy0z\ne5CStBPZgR5bxwsVB3F5qrOXXQbbuqQLauuLhMIXZSIeBn1ig+syos8G5kGY\nOE/FdqC0o48FcMjRYxuX1Un9TcIqb48Ess+yjrGil9Lrplqe1XGk6Yi9Poh0\nZpsVGoFPJ07pV+HsnregKBbbdbY1onUOm/EqvGwpyWrMk3wEX7G+zpn+e7Uk\nt7yWuTy6mniaekp3ApZi5IWRy+DFr+zayVfZ+OE3gwCOQduX2gQzuFOcMrBT\nEySMXpkZfhu46R34ZhpRH/UEQIgS59K97ieOL8QAGb5gQMJS6MV5SV9N0B0K\n3mIx9B6R+FaTREa3bQDOxv8ordJxgobX52Mo7hvLwACG4Z1YxAvQ4W23GqNF\n1/NPvYcr5BaFk6qmh8S+uySJ7l1UbALOj+a7IDRIhZXRrGO9rBJVqV57pelS\n+q3tnZ3ZCk4wTR2SUuocK+UB79TB/U01nK5GoYbMqz+l+o0fIWSquvtO6o8v\nI+eLQFbigQ/Gu0gRMvE9K3Rcawwtl97tAXjftXq++7O0bmilDV8B2EUUK0CB\nFj7w\r\n=MZtd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDcETisNKBKmRSXXxt4tcuKUgdwCIvxrCiK6Sujnry2egIhANTC6LkV8hQCCO+Uwb2wrlrL1iggw8LOLxNS5so2Bwga"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-3f96dacb2c3bfd284f394efddc58fd4d3334adcb_1603198576195_0.78050314534612"},"_hasShrinkwrap":false},"0.0.0-42f0475940a948b7ced20041365a47117d5ef745":{"name":"type-route","version":"0.0.0-42f0475940a948b7ced20041365a47117d5ef745","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"42f0475940a948b7ced20041365a47117d5ef745","_id":"type-route@0.0.0-42f0475940a948b7ced20041365a47117d5ef745","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-jWaVf5MromJAl54zdCL0JDy1m+WX2QeTMWjA93Rw+BqbXIw3CENo9XfPxYLuqrmNwkYxAOB2xE+Q+4ZMcl4+SA==","shasum":"2bae5f4094eb89c935be91d590b2b71f0bd6c18a","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-42f0475940a948b7ced20041365a47117d5ef745.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfoLHzCRA9TVsSAnZWagAA8dUP/iuhbOWaeZm5gFXNQDom\n5jiDHnq7ailnSF2UXfOSDqaTcTg+LQHo93IVEdQx9boOysN+IivoS2pERWdB\n7CfOFpQy23N8bapBPIDDbJhJ7Xtk7atBLI54QhPrw/eqk2eY5Bl4rcUwDUy5\n1GorSfwJtl9lnfs0oCUUCQmo6qO/JZf8SXzQnwunO6XoLfSvqlqkzcSrEAl/\nHSblUXFWxDA38wva9Jo8aWaUxumXYqtJLztl1ffMBQI6H2vdwIyCJmWuY514\n1uDCVpa10Z/9+DpFhNHCGY8Feia1Ocd4/vEVTCYhdarAp6i9y5MKqIaUSO/G\n7ttjFkxyiVst8ggbqtmXC8XG5gXNCIzs1WgGxE0kl/hDqP/iGrcQjDJnjOmN\naYOKNGOltue4fpFXZfWaAL9LYJi9SmHRHeZpKf4iD/v5fvwn6M+7+2xqRwsi\nQ12g/yjAbNd8XsS2rVhoeobMk9v0BrU1y+VuyECGXNoZdphrZWX2+9IWN7ym\n1kvj76diBukz25kdnQePPXsUCa86a+B8AANGcUhNxOu46vblL5TcSe4U7uvr\nmrhfPPl4EZTH5DsMyAPko0wTW914rua6Dk3EZ/oZpU9kMav30oXEtPsyqZpL\nJuvRJk38E8y6nAEpMjEMcNRgnIDOxkqPNIFFzUUK12vzcLiSnVHg7461kqXo\nmuEU\r\n=WLIy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDLSXyhehe4m/s1C9A8k/29VbAc1Pg7LUGcwm748/DKQAIhAOzeHWRdIi6vnUGwmWWu0cEyZwMIoOMQvj+E7W0pUEb4"}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-42f0475940a948b7ced20041365a47117d5ef745_1604366834525_0.12744228669879898"},"_hasShrinkwrap":false},"0.6.0":{"name":"type-route","version":"0.6.0","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"gitHead":"42f0475940a948b7ced20041365a47117d5ef745","_id":"type-route@0.6.0","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-uh5bxHxHOKNDNTetGwBgtSP5ba3SUtnKcdj3d5AjbIALVbYBwaix4wwfpyxqrE9ia31LknXUc+359FChcC01jw==","shasum":"0762fde72c592f7fc9eea3451f7c538811b7439e","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.6.0.tgz","fileCount":54,"unpackedSize":1190931,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2+l7CRA9TVsSAnZWagAAoGwP/RiPxR71Ery/XYx9syJ6\n5bw3yE8DJpTwpk6ddZouTHZjPWfGV4kn6HTLDhSW9onKh+rqDePHVDrT5dms\naipfKaYgFx8pouwHOFt3jhZQovTVz8uxvtv2AhE5y0qtRSWUC1J41skoqOfl\nRV/yu3+l7Pf/jgK82gT+t3m6lpdQxiVSTcexzfDiJ30/F4n061golRWexhGS\nES3WUpYw3VykJ6J+tNDlcgfuT8rCd/7vrYIoNUJ32JLUiJU8brt8XRBa1WC+\nJg8qXlApmoHiyDNhSED4KmHyoY7CwpBEA5VtO8gwmbFygyan3YNAX0Ls43Go\nBfuycc6G1dD5uYCypyqV5sk/Cet9w32nhDqQjh0IcwC/yCBJaZmz7JjMV4B/\nb3mN5vZk6wculWvnjD5jUkZAu9FMUM9Vc/8B90XGGYeWDp9AJxfrqddhwseC\n4LGceYEIbavFytAm1FhCxSe9vG2p9bwGq6ZP0cvDk9VtOMs9WR7jXRj2a65B\nymn9dT6b9I1BM5SuW+HKyq7dUX+F67+e9qLyKq7LQPSGTqD3ITDQDU4iBK3e\nPGGAUGn76cqtdFv+vuf+R43BUTxvwk8TakvofJ0ez+vnLIzXVz6NqFc032/h\nXlAhwB1PWgMNQza+TucM1KkLQgedFHkLqzNh8DDu0r7HwhvG/anlWI/QfrMI\neya7\r\n=hxMb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA3V0QUhKMlHwkhB9AqYFtwjaSxJSTtaSCHmbMoOvmlQAiBws4ZSAq2FZ4FVX3Fnu+FNNw6x2tdEgHeae2wss5LB5Q=="}]},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.6.0_1604367061826_0.2849882040615852"},"_hasShrinkwrap":false},"0.0.0-ba3b233956d98a9e1ae72cbe784b102751d01e46":{"name":"type-route","version":"0.0.0-ba3b233956d98a9e1ae72cbe784b102751d01e46","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"ba3b233956d98a9e1ae72cbe784b102751d01e46","_id":"type-route@0.0.0-ba3b233956d98a9e1ae72cbe784b102751d01e46","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-yVgUDrxXXozH2MU1hWl18zfs6f0H8wTsr413Vkxwv6bm7E+Pnt6eDkNhyRjMK+x9zfCiQ80lRhmuyzrxXl6ejA==","shasum":"74178585350dc61d2b1f3a9d05ce8010e896c158","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-ba3b233956d98a9e1ae72cbe784b102751d01e46.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfvZ3yCRA9TVsSAnZWagAAQkYQAIUk7BWMp/3T6b2SIz8w\nTXx1e05N0nlEC6jxHCHqNwAiGaguglVdnIVdAUL7AYRZht7hCRfVTC27CMh8\nAgNG7AqKRif0f+Y6PCF+g5cVvTTAnvj50pstIOOb+pWPzNJj+Nk/WqOO5kTU\n2QlCid4eee4gMAqkc4di46Bh3VyFjU4hzBUVEUlGVA0l/d+x5yOXMqaLQpTp\nOKUuJXgiFJO0t4YLM3WO/oneGiS2Mxg0eCBug0DJFjvyuQEjLhRAZh20DN66\nb0U6pYyBBVnYCC+kmniv8xya7N6hDWu76p684L5sG1d7eJbb/MEUZBfYAo1e\ncguSoLvYJ74bEFHtWC72b6q8TmAPrEMhpTE1keko7kzNfq6IszE3TAsszwSC\nzsvTvy0U1Iv4nT+6o3Ptl87Yw2djSuOfNHT5pKE+wi0vskAuAL5d6p6K13PI\nrzABxX5Mjk5R0MJ0ddgsmjF9xO6wqUHa/PYLP0++y4WGQTmr3f4RI/MQDz5d\nqW2fvdy6S+1+KuETgJYXmT2o0wg2+opjPrttk6X6Eb8NxfHPM/7zsh/6n3AS\ndAX4p8qu7jRyd/7ICQV5b8IJFZADc3wWP8zL/4iQAyUiIUhs7F7ap3MwH4pO\nS3pnsHYZx6xJKoAWVFAUXUHMnWFf5RTzZ6ikR46zU+9t9uKrcIm9XGLOaCvt\neXip\r\n=Cd+x\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEGxjmF+3kjDB3MbSTu8DMZbohhifLzHpmW5P36v9C2UAiBT7LFDFbDH8fKsMg/dip1Spbc69ob+Ysti87V2jnFARA=="}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-ba3b233956d98a9e1ae72cbe784b102751d01e46_1606262258099_0.722442529459737"},"_hasShrinkwrap":false},"0.0.0-2243dad696c14ed6d431b1cdb779417a3417925c":{"name":"type-route","version":"0.0.0-2243dad696c14ed6d431b1cdb779417a3417925c","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"2243dad696c14ed6d431b1cdb779417a3417925c","_id":"type-route@0.0.0-2243dad696c14ed6d431b1cdb779417a3417925c","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-5tvIku/2XuCi7RpgMYvVAA3suWNVCvNSl78MSK6pGIiQXC4IAYGomKzhSjbkP1xkFJ/G2xJARAKbpqqKy/sz+Q==","shasum":"2008402a73bd3c54942345f3bbefb36ad00247ac","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-2243dad696c14ed6d431b1cdb779417a3417925c.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfvbKzCRA9TVsSAnZWagAA18QP/iSf70aE/p8XXs0yazR5\nH9jzYE+3MR7LzZGZjlcNWNI3ttMH4pz9PeZI0YuDnyKl81NfiZIGv4srigC0\nKnEvvoYB1SxJg+6p0sQttzKKu1CLwbgH+RGYFeJYWlfd1zmasdq4axLeKIrN\n6dOQQiMvOgj7ojR05cY66/4edBmQQ++KNVNWtMeiUnQCx5uwu7MfRNaLFBjJ\ntqkMzjAQIgwYoaDW6YoKSql/PMAfy5+jraVV3C5WAsaXykaoWQKxSe0efqvI\nX616gDRgjAFVfMFJ9woOpemhMIACZHzNczsycuUQumYM/d+vGvPajlwF9udS\nmHDkTnhNSoqVCByrspLQapsUG5Dfk3eb981j5UqBn0RBYO22K859YlqlgmXQ\nf9YO6H3FEJdkRtRDQ/BYlCVSiv16QBRSjXdMcHnVWWsD3OQi7sv/0LIbB4Rs\n303nstqAC33II8RjFBdey9wzsc8wNLxTWCz4XsWEqSvZYMPpFLA30yzkcOBB\n/FS8GuFpRPf0KVzgEFUT5uAZz4I9IfP/0o3u0Gr+uYj/mvpz3Cgy2mGYCWFk\n/WA/WfNJVBdhT+GbmxfFY3qhu4cN7qvIqTQzRdmOSw7c6+5cRUP3Sz37MSJP\ne2WG03wVcF3De97ZmtBZFwU/tB5iqM7yjCYUgySEGG24nfZrPHFhJP2yYAH3\njKfb\r\n=EbjK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICMQ2bH7sCqhOA4ZVkGqpsBVmjZRp86tgWQxrxdctAh6AiA5YsZ2LJTgxrtWMbXfjU0v7fk5k58kp4HNjnqbH2XQZQ=="}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-2243dad696c14ed6d431b1cdb779417a3417925c_1606267571159_0.6462735841011948"},"_hasShrinkwrap":false},"0.0.0-abd9991f57aa8525d06b56f0cee8440aa60e9957":{"name":"type-route","version":"0.0.0-abd9991f57aa8525d06b56f0cee8440aa60e9957","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"abd9991f57aa8525d06b56f0cee8440aa60e9957","_id":"type-route@0.0.0-abd9991f57aa8525d06b56f0cee8440aa60e9957","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-parj4y+r2GZWIYdUHromBTGbWjcwq1zjaNR71Y3u0Ekuc1xAwHGxzPl1nm7iZ8Vhjt+Qjs3/4DPYl4uQTjY5Pg==","shasum":"e17a4b505c29ec5d4f275aeeeedc9fe1ba64aa7b","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-abd9991f57aa8525d06b56f0cee8440aa60e9957.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfvbLrCRA9TVsSAnZWagAAtuwP/R5ruCwolXaN6aEnZ38F\nMYyAo/OW+DWqixaQwvyhkZs6616ezKksIBysPgL+7YfaUp7qVftWd2gomMrm\nDfpYulHoMpTOPuIdTMLxcJMF+8rL0aXYCLv1FK4CMUn1yWLR0vgHINziXQ2U\nojZp57kh97Ht9/8MhEYIVv5MbqYRsugNtE3zNwoY4g1NcQcsy91FfEKASVeN\ngAuOFW6asMDh2QtX28FUNV9VBtetVjQyw2Nq94sYstlWESYYVnCRg/NrzkSX\nFpUlSJs8jls7jpgyoG54WWEHWvECCiXeBwhIaLm+1mQbesppbhJub+cvRlZK\nUljWbFmEOo7ysevUj2J7Ms7QPB/xytsuh+3JRMNVHaAQKNx0mI+js8qepDSo\nZNWnlOETH1auqCLKBT9rVrgK8gwi7AfCghM7B4Ty/xMMjIMT7tzmHEUJV4AN\nMeR28KMn7lS4JO0mNJAX0hIJh2DmpJwnyzJjwoELEtFrKtkPsNSfr26Bl+a4\n4Rc5/dFtlGlvDLH18a2MC0AHnYvrmzNNAcC8JLvQAr5DXvSgavb7Jwq0ECOT\nMZTVeAswzK0VgN+0zR9g/Zujm+I+qGYLdFj6bjCj8hD5chqkM9AxxmCSY0S2\nHzAHp3IY4SnLfeufTIgy1Yt7c5lHAfKzcmuQ+I15/+Cg5xjWatZJTkSADiQT\n38JU\r\n=4EAG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDcXqNoGBNSb/xcoz1UOyEFqd8nkCW8Dfco29T88HT+vAiAirHrzWkO7ZVW2liV2/nHCyJLoNlljzMQ0+csiP+9iwA=="}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-abd9991f57aa8525d06b56f0cee8440aa60e9957_1606267626652_0.06450952873986493"},"_hasShrinkwrap":false},"0.0.0-95497f1ceff5b9a40009caf9f09afbbcea508ea8":{"name":"type-route","version":"0.0.0-95497f1ceff5b9a40009caf9f09afbbcea508ea8","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"95497f1ceff5b9a40009caf9f09afbbcea508ea8","_id":"type-route@0.0.0-95497f1ceff5b9a40009caf9f09afbbcea508ea8","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-ZtraBWc78RPvd122m8vY+1XyuPw1gP2h5yenYLq5sVJ9zvDh8fdF1baO4G0c9wWp08h1ApaXbe20ZmmgoP8Kag==","shasum":"0c4ece2bfdda7dab7fd685f2066ba0bc30e25a2e","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-95497f1ceff5b9a40009caf9f09afbbcea508ea8.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfvbOFCRA9TVsSAnZWagAA4gMP/iBLqmMtzSVU0s2tpIhG\ncyZm209NTflls1sYx8plP5uLp0+rWvMCKN/N2XWvYIs6VgCdKKYVm+CaJtVh\nqXmRDSW5ACPFzMBArgsYF14ZQRMOVd7jDe335BWUg273+drwNvs5sHX1J0Jl\n+bOM1p7c5HbZhoUPklpQWfDFf8S45TR1SOdcpFgRQgFFikI6T6pW4Vz88+E6\nmp46f4RiuBjcaWZkEI69VGiph92Z8kQsjpC002AUJLWM6h5oP5KJCTORpNF+\n/2e2qCYuXykUUMpDF8fNcwuVpc7AiV6LOOxRcNxIFjt3jmuOL2VtBd+Rk9c8\nuCIwEghudjfL21YrKpVa9jNM89dc/iUM1TY82OC0X06SRUKwFWHOtcRwpDi2\nwhjySW2tqXRBBJTA2U0B8uLaQbPHxcHlrbx+M+WoxERgV9BqFKYw6+upjFVQ\nd7xVtNXllYzbY4CkgzUFh5KV14K14HMhirsu1icfCoAgfOxclDh/XTZnrZ9m\nWGBIavGKRdt5kI3oRoVDrRM106Q0mCwmsA60UiEq4vbRHg7wZG9mkWJIm6tn\nsQubje02TCexyTDRy/WfkFXHgFICxOFQyt3Ma8G7AdOEvsKRuHR7tW8IL6ex\nJLAXOG+uJzRoKtlqSi8rPX5MKYdg/PGfkUqlS4xdMO4hLpDEI9m6nptu39qr\nxlbn\r\n=aZws\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDnJ1Ew8j8Xrhc8BBuX4bF4x4VkQuo8zsEqlmTA3ZqI0AiB7OWJpxIIzHuCFnrQ+u0fk8VpCIhjaPWoeEVXbKYrTBw=="}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-95497f1ceff5b9a40009caf9f09afbbcea508ea8_1606267781432_0.4567490946996875"},"_hasShrinkwrap":false},"0.0.0-b0f263eb3feba2afb619e88957fe42ee295f9404":{"name":"type-route","version":"0.0.0-b0f263eb3feba2afb619e88957fe42ee295f9404","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"b0f263eb3feba2afb619e88957fe42ee295f9404","_id":"type-route@0.0.0-b0f263eb3feba2afb619e88957fe42ee295f9404","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-7mzrvBYCWDUQGe7YWeePh0P5jsoJEL/T0mWxbu1+jQWPR0NA3Ql4nuSGzuTnnpARwXE4e6sBS9oLKIG0wXiqVg==","shasum":"a5f3de63e5468ee02855c3cfc6d1ca1e5bcf7ade","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-b0f263eb3feba2afb619e88957fe42ee295f9404.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfvmO5CRA9TVsSAnZWagAA45YP/3A871lio+ehgKt+T58I\ne/S6+8S7HiWIK7jXtJfXTyor+QwdBM91uF0qytsENZPGHUxZdHVrEyXDIUs9\n1hxUFqKhA/mw58yRdlK1BTV3HsPXbZVQeyv4biVFcsyihbZqSkMg05c9HxaR\nNSuTxrnWODV6Y31mTzTvtRbeJXUwt4m0XLIDw6gJtq4X/ASr9+obkXB9BX+3\nKWeQXMi8ZHrqScKCFSjyTBJ6Svbek13UY6XeUfbJ6n+mW8EAXETPSsqwj4zQ\n2TdEH8HmYejvv3wsQJIojgNhdDxiW4U4Xnaw4ImwzZXkAlIWUkK0YTyZbt2/\nmXCKSE30Z+dXi+Auwvb3csM9AgJjgbC1m53WdGauxq26IFtCse9+U02Okih3\n4EHGbUg+HXY9irZzcNE359L1SisjtE/Ga4G5mzuB4RZYbvrzs3EhqWau6tRk\nnds8/lEYXkuf1KFTA8/G2fUoXjZ/RJaQlAZ50qp3+QPSEF4fZkDviEI2oyy/\nDcfYheGKP72l+nev29o/0UhTOuWAve/Qr1A8A7VivsVhNdJ6JoiNIrlURmOj\nkfoTczY0KCb0hQoF4yf6GRenl4M4GqnL67A9wM4sOAv8HI7d+m5mmTJY5M+3\nyX2aEe2f+I/bXDKDvnW5OBHNOhjgAV1ngR60/5BVkKs8lr450oPdzFMOu32I\nH6+E\r\n=0/xD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFtDe2bfH5myd1tCG3xxXWKDCQlglJuXKsApv4bI0TEFAiBsDMfOm7GaKfmxXQCIiddgBTSfw5uD/PlHUvfLz6LcPQ=="}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-b0f263eb3feba2afb619e88957fe42ee295f9404_1606312889223_0.6096896971368477"},"_hasShrinkwrap":false},"0.0.0-fc0e7746ac8f6c3b163b9f51033b9c63ca28fa59":{"name":"type-route","version":"0.0.0-fc0e7746ac8f6c3b163b9f51033b9c63ca28fa59","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"fc0e7746ac8f6c3b163b9f51033b9c63ca28fa59","_id":"type-route@0.0.0-fc0e7746ac8f6c3b163b9f51033b9c63ca28fa59","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-PZytxZ2Jl2/8vAUYsIBmO1GYP4w20FRoK7jpnBW+0p1+E8nbcUVE0dGNWeiqi2b2Ko84GSvVDhHgqUsVeDYJ7Q==","shasum":"520584c49ae90732b1c74be949c92c6ee587105e","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-fc0e7746ac8f6c3b163b9f51033b9c63ca28fa59.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfvmO/CRA9TVsSAnZWagAA8FgQAJHVwtHPoxrBwQ0A1yr9\n59h0luLHtJLYZZQq49WdwwsvMgMS5FW6OxpfUn6LEw+Y69d9EtlBP8DAfLvR\npiiLeuhhVYkugWHMXPrM8NAAZLUBc35ZcXgAjHF4M6OzCkdljdpy6+LE/UDV\nsH+k33eTMm1iziODLVxM0X7CLjEjJgowc7r90fs1Ru45176XSFSR/xiXHH7f\nsSp6QmdMm2jr0G0h5kBIQOj+YYQMqd5dQxlhVbaJMz2mljusBCpIejrx0ykS\noXTHXC2xMLyCjUl9JLaUTu8ajuo3siRQ5gUtP3Cn+5FuYuAw3el2VHvNvcrX\nlnO7l8cTyUT9XQKpiavu5gEj8KCGQtRrJueq03eayqb0/oKOyO5fJGDNrnk5\nDlTAxTIdyy3sDAo1tTA431V1MxmYZyfjYPaDdMg3pEe2+odm5PCKRTczDJxb\nCsVIaxE3FY15Zp/+pA7JrlZ5F+2S2rgP7mEgPK8JZZLPEHiaFg071wX1tcVE\n323hldM43cS4SgTkQdtPwzdAAxkihxrVQqMAvMU5ezXKIBwTizYbnZTyodAW\ngwdAc0RxKnx76ZolsTKCNXlMTUYhyo8D9qybsC7JCpAb1yVHW5CAjZqGU5RN\nUWYfNjeclomPfpgIqDghGQDk/i8PNa4ONkcZQlalnfPyxk/NExIg66J3zpvE\naBi7\r\n=JjqP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB3bIoZ519PwvepL7rKoED9/6s/xhfDAkqul93mTHHkhAiAlTedEGYmTXqH7Q37luue9IQ0eMDKuem5dAq0H0HcnoA=="}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-fc0e7746ac8f6c3b163b9f51033b9c63ca28fa59_1606312895124_0.4122902619236284"},"_hasShrinkwrap":false},"0.0.0-43017f0c09b859703f0a54f843f650cde07f1e4c":{"name":"type-route","version":"0.0.0-43017f0c09b859703f0a54f843f650cde07f1e4c","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"43017f0c09b859703f0a54f843f650cde07f1e4c","_id":"type-route@0.0.0-43017f0c09b859703f0a54f843f650cde07f1e4c","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-yV47InruHy8DtzTcU4N3ozlKIbQmFY1WyAaPjHKUCm77At9TQBz24gkhfmDn9JkD/gt6uxJjECvgLpG3AVv59w==","shasum":"a0f2d984aa745faab461a9e5a363800df752a4a5","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-43017f0c09b859703f0a54f843f650cde07f1e4c.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf0x5sCRA9TVsSAnZWagAATLcP/0AI7F1dlzCPQckClvku\ngHuMdFJQVyg1EpBunlkT+eDfaW/nlKlH4Y4nS+MJpzgk764Es/Qrr0MRDSmN\nUWsHL5CNIPAVPESGPp2QfR3gsxWS56a9uf0KjpBHYcelM572VelxNojbn1kY\nhJpBR8tbZYXkhHYJZ581SXwZK/ViXvOKC6ckgMlU2XxxIA9IRlnqmK7YOWc+\nt2oDIy6/VGC+L5oRajACfpbnKDvN4Dk7eiGoknVtLvnW2em3eUePge4vptwv\nHkX9AKha5SNlwKCRIuo5pJBX6ZafYYAqSL3hjLAKjJizB9Z5ETQ6kGlDZGBf\nv3mitXivbjad0tFylBY6ofPdHqpjgveAdlV7pvkCLxiHAO16U8LCQYltszq0\n5jJWMZ6rDzL7CMHSCLut3oexvvtmwxBbOiMHqrs5az+iOofA59ZGg5Xwuw4R\n6/ZXu4tQaE+8IMwEa/fi+SsyUklD+iLqppWv+PcTi0CndgdTzT9631QFB6WN\nBA529GJvcNPnioVQTYIi/+aUjO4jqai30gJpW5P2BWVbuVK20mtVeGiriQge\nifltxbR8/yEfU8pLrL2VuzdJ2uhnzIzjUZFQ4tIrxtL+9gDL2aqY/jmnpI/5\nPhc10/mZu1l35VlWome4KtjlEHXGp4psuohJNrZGPRcVXsJNWVURy37A/PN4\ns+I0\r\n=3El5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG8Q1yqsKNR4tKpF3YH65tD1W2gvhvKEKTAJq58D5lZOAiEAsYhsKYeYEUsschNIj6OG2J4Kk1COEj5G2NOKrMSUdy4="}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-43017f0c09b859703f0a54f843f650cde07f1e4c_1607671404536_0.06851750162398007"},"_hasShrinkwrap":false},"0.0.0-ce53930daade0ad018f783d51088b6029f5a3c1b":{"name":"type-route","version":"0.0.0-ce53930daade0ad018f783d51088b6029f5a3c1b","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"ce53930daade0ad018f783d51088b6029f5a3c1b","_id":"type-route@0.0.0-ce53930daade0ad018f783d51088b6029f5a3c1b","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-LLBTsyGfQ/9LeEyIR6HckPQCPF18V5M1dSkeO7C1OSNAeN2sMbG5uX3AFW5traunKJxeEv/75zl9k/eAYXXYTw==","shasum":"3fdd429febe6558429e9e1f6d1b70d7236b8c5ef","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-ce53930daade0ad018f783d51088b6029f5a3c1b.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf1PIXCRA9TVsSAnZWagAA8LQP/1rmTfT5G/DBMq1j4dmP\n2/E99eDyNpqU4V7GkfO++7BsOot17ykpiGPwmlP8BF7qNdzFDDc7EkdivWvj\nzPD+Ax09fPFjMD+pTZjIpRBbrJxCItEPz3njpaE3uIz51RBJcWlamLxFXCTi\nQ2kolaDGFwjqGkmK1DIJmHCV8VnjJjRbf1K78EUA/B9DVOZ2Vo3+qlgvWWpm\nJCak8uWWJlohRax52M77M6VH9mzsDvFeL12ZCDvO9qo70di4y2Q7rZ6/JTs6\nQN7wAaWeV5mpfXMLvF+/nvHC5hBRs8vpaG3XligyE1qX2mDcxa8zvFQ9qo7A\nfF1wMnkXQByDBzMRSsVGpyAfAsS4fC/xMEbQH388v6mmDOAai9oJmjoKveZH\nxAwNRM9Tb9s3ljhm4hHvMATcmymPFCGalkkmo6RxMrYUHditRifiVfJgyWm5\ntcLz+xHhJqGYfzmfZgBX7VFChw8dodAEayIh0E0CHe/q7oIPEAUBIwfF2j5j\nKnRtJxiIMxVDUxvV9cnt+0Y24//CXKDpwwIQ/7OnrDKGmK7Qcx44XScXQTze\n7Q8J+hbdOn2PZe5qWKO+glUwVLdmGGVy0QDSNoh+aurQ8tGe23UEk0ri2R8s\nezQ+FdshD2SNAD+htB01OKYLUERkMDnCKLIIUVPJh0+TkexJHbCk6jUTbGLS\n56hk\r\n=AhP0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFPmuryiRZxh8haX9vWhcCmTpyKXqCdKJe09u/hgJGUYAiB+a558hooficIjis0W+0LNgRVrwbyQgVSvqNmF6O9RJQ=="}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-ce53930daade0ad018f783d51088b6029f5a3c1b_1607791126496_0.23387368784731954"},"_hasShrinkwrap":false},"0.0.0-01476a0577dc091bbb3794892af2114acec17f01":{"name":"type-route","version":"0.0.0-01476a0577dc091bbb3794892af2114acec17f01","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"01476a0577dc091bbb3794892af2114acec17f01","_id":"type-route@0.0.0-01476a0577dc091bbb3794892af2114acec17f01","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-biHpAtl7Wmdg9ylAesCt6EFyD8bN1/4UYZlVkkBSGHBxD/fRCy5SvPEgy383+jTJ2Mz322fn4nK+ryvlONknFg==","shasum":"b802c9b0d7d667bf982aa8336a266cfc90921e86","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-01476a0577dc091bbb3794892af2114acec17f01.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGadHCRA9TVsSAnZWagAAdCMQAITZdvrapzA+u7rKWkPZ\nedQABvsLFH2BINvujSrmq72cDECApP7SEUDbV0IhsRS8QoWTp+ocWrTZZ9an\nQsGBKcwhqel53kOpzPYtGdhnJxuVxItx6VddGyrvbCg/3OZKP0c30MoCSTbh\ng/EnFNu6EQhhHL0IO1d8eCWKwFjWP5+Kd0au327ozIam0z6mbw4kKuS55feq\nlYGpPM4Fr8T5w1BPikOlVuXuodPegsEENDf0NlT7A21ORDXUnKNcB0ygZLrZ\nU1mkPG2jbsT7m9JNR7GWvIGR7TcN9mhuDCZTKMxj0qU9uUmlpToaBANCM+l7\n43ytg7a50lT93yRMB0resULg7t2PyGNVpC8+eIiorrKPkslMsm1DFhFVp22h\nALvn3tMno6Tp6owyQEcTW/jgbiN8c6TNNA0YNra6eYlSdakjMXzt3ITAUMlF\nCBIUHxt25YUnKjOMjwqw7NfH5T8EDK+we05pWa7MEu1TImbaO7h9huRraxYt\n+ZzatHcbSNhfZmT67yOGj9HSvoygCwMkDA3wyw65fZiHBAjPoZJhcg/TaasK\nJ4XbeNZapbS2swVqZnlN2pFU5eN9KCfiVrCExxc4nkqbpALMD2w3zYa6S0q1\nKT/gCkwoF2sl1LRWKH1kDeqn3WXTNeMD5/58w4krXAFW4PZEavfRVEuYh7eB\nPeay\r\n=wmRY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID0lTcI4jO78O4nWLRZfAL4DclQcapjy9mGzlyY+kKTQAiAKpAx+Kv9TER7GAYQUEpu+V6GTBZdDtgR/gjgRP8zMag=="}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-01476a0577dc091bbb3794892af2114acec17f01_1612293958771_0.33298765591665"},"_hasShrinkwrap":false},"0.0.0-73d44b192984afdb788f6c3437dcb2d7dd3f7bbe":{"name":"type-route","version":"0.0.0-73d44b192984afdb788f6c3437dcb2d7dd3f7bbe","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"73d44b192984afdb788f6c3437dcb2d7dd3f7bbe","_id":"type-route@0.0.0-73d44b192984afdb788f6c3437dcb2d7dd3f7bbe","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-AryfcQL1TCuvbsdyKqYOLiIFchv5quuCR/GXyuOZHEO+EiTq+9DKRZ4u9b3VRVxefg9Up45cILJLUtrFDtDWTA==","shasum":"ba097efb67f8ed9c2ffae7389f842498c85c4c13","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-73d44b192984afdb788f6c3437dcb2d7dd3f7bbe.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPU5JCRA9TVsSAnZWagAAz70P/0XupcvE2zSnlPoc4Bi0\nBBRStNqwrHwngXux4gZA0y9g2B4yZAadEUoWN35bebAJdAA7ak2JjZ+d5Gdb\nEanTEWRj5YwGX3ZiDVRTGctecKJQsO16SvWHQEnSLpnQ5gsHXRFTku6bTir3\nj9mpxVdM5kLnj/954b4V2+NNSwNH5wUgtW6yswFKKDVDHwGNgdC65jJyPSA6\nxR0Rm4B9MPv9Lx155YLTM2AzkSFlY5n7Ab2UWC+ik3qOyfjiChodUg3C0i+f\n+rZncFERatqlJlq1aOKhB8lwa5erspWUQ4j31Y26sqLw7nvOcy4tqsFjWTqt\nSJEo5qxaS2aXlAyWge0Yj1hlvEpWUklHph3Qob9ISVvsscM/AytlHlG8nBnc\nOw/YR7oFiBzeHJX6IhxFZwc4PxIE1EnOKV+BJAkgTi7qv3xxijy1CJPZRGPp\nuV4qKRCcKIB2h1Bt6N6/YUeH4Dq4SSV7QtFZf/k5gylmYwp209h9+HGVHlgY\nDKi4Dq2LVS1WvoTgjsKOgcToxz6bSQyYV9b5awqrNmJDchMGh+aB8b7oVADP\nyLCoCEFpTnl7Y9V9E1Lw0/Qsm6ZYDKuab3gy79eZN4rPrAoDfAfm7+ziLyVo\nYhSKbvCrPI0q+7dSdFZ6dYcj+J8qk19F4XHx45K7M/oZZelBL+uIiFp4VQvV\nq2IL\r\n=ha/Y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCCoqTy04hedBSLt8peAlebQ85qC9GNxKz1v+TWtakiSgIgPaaVjfIAY8TrGUHxHaglYGMTsA5QnK4CgSB40dim6eQ="}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-73d44b192984afdb788f6c3437dcb2d7dd3f7bbe_1614630472731_0.08157392247349726"},"_hasShrinkwrap":false},"0.0.0-5e5d5d299f83c14ef2fd00c9cd73b871b7764af0":{"name":"type-route","version":"0.0.0-5e5d5d299f83c14ef2fd00c9cd73b871b7764af0","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"5e5d5d299f83c14ef2fd00c9cd73b871b7764af0","_id":"type-route@0.0.0-5e5d5d299f83c14ef2fd00c9cd73b871b7764af0","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-e8rUWMkBS2XF4mUGdnWnfToszf74qn5/1lXajmB0HD/F4/d/CWYSP7l09MFJycL7mX3G/MQ07h9aaBa7vmDxog==","shasum":"efa41f138b8a999b4317f07581037479eeb294bd","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-5e5d5d299f83c14ef2fd00c9cd73b871b7764af0.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPV0SCRA9TVsSAnZWagAAU3cQAJ4eqxFDVmPVB+9XD8Jk\nBO8lUPCt+hIv/EkhdGXcOrOt0uVJJI5cs2aUg+SRD4TaniWfC0YIym1wLw3H\nwJX2A/F6w/+Zjxn/f8cEaJDk9sU8LImQq8UhhSfAG0ZDxvgHAMH7ugFsF+T/\n+c+INR+byU8FsVW/7YYbNdvk8ZoHNjD+6cMEO5ZWH0VNJ7KITa4JWTpK5K8h\nmegeL/BG4ZdAmySl/unTig+vmURlFzf4CaOC26qR5L8o8Jh7y3OaegSol08W\nJU4Sd38BKu4B/FCqnRckLTD/asCuXdqmJUEYdo0LjMYfqsR/Q548BZKx83Ve\nUYbwBvxwwuP1ydPjO8cXpkw9POD3zcKN4aVK7nhVret0qtThne2+2ROPyA/G\nTvTaSjyHBPPYDIKR00gfD3zd1g3PSavEvxECUpy8IvEKgkW+1Jtf7V094daJ\n9etALtVJP8XteMw4kwIC7Fx4F0zcMkg7i1J62igRCTl2JJwqf/wvBwJNogSD\n2WsB2G3bt/gg7WHVaFPCuCt+g43R11bAiiUkW34WgmnSRRFucJxLOJ85quKs\n/Ppa3uxASvlNi3GL3xpnIIHHHihq1d+eOVUxVyRFUg+gY/teg6BtY0VdMi8D\n5kDK41sUdOJ+ZOyjlBYXYCKrUOSi76hzKBpBKsJTrsYPETNfWgZ1O53w77Rh\nIkfT\r\n=AkOz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEnpXmKnjzkiO7t928GIVCsji7TxnbMz2LWXLL5o2J5nAiEA10y/nIm6EgEMcO1GtI2Pfl3UrCvVsBswlNKsw9oY6t4="}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-5e5d5d299f83c14ef2fd00c9cd73b871b7764af0_1614634258231_0.7987982817550556"},"_hasShrinkwrap":false},"0.0.0-164951b424b91d5e2e3bbc28a27bbe7d98901f91":{"name":"type-route","version":"0.0.0-164951b424b91d5e2e3bbc28a27bbe7d98901f91","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"164951b424b91d5e2e3bbc28a27bbe7d98901f91","_id":"type-route@0.0.0-164951b424b91d5e2e3bbc28a27bbe7d98901f91","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-QLNkJeCuNqISSxn82L1C0HGnuv5wAlf8gao/cVrqiO3jBCmJ7xMBQGaR8m/cDqLB+rJSvaHk28vk9Q7VceCWtA==","shasum":"cc8f40ba2f2c9167cb68e04cacd59b6e2450ee72","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-164951b424b91d5e2e3bbc28a27bbe7d98901f91.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgR3yFCRA9TVsSAnZWagAAiesQAILSr7xtEhvsXOzaSGin\nDUSLR42JFOkzV8/AE2G617nMWca2i/WUtZ5iTVQh/SYxV3NAc0/Cnpx2cAyr\ndWg1m5j1kJQj+OCr1jSK2HBK4bAV/XpEVEiF8pMx5vrmWZqrX4CVfsvtwc/F\nH/O7vJL1we3qg5ZaPZlJVPS4BQclAJLOGJkUC0C1LifMcRkHkiSUyV+p99v0\nrtf8UM2bHiBloWalWAE235tp/+1uC+vgHIV6f8CoeKfw1mVWwqrMYvdhsqlP\nzEZvtDtgwFGICoQhdjlgRGerGzZ3zg5pMuG7da6/D/CfljVJnOj6wPuM65Vh\nBVkTXEA5/AIqvXRp2KUIicXiTZPweKPxXrUVp5OQZTvrT7sXaSF1TT5VW+r5\nNCqknCSTQ7YKDI2KXEagcYzFrq66JdY4zqio5WxYUGN8tXE+fRkDoyfx8/6S\nx0A4F5YRMBmMkhhH4L56x5/qP0DmdARh/uwdpi5sFKTEIup3K7m6Happsqcp\nLRTiqAtfLPHBpcj4EPjcxem9uRo5Cnq1cOREXCm1F/ni7+nJ1ykxshmePocJ\nlQ5mecnQA+vYxJFRQAqGAxFoZwqdP4vS/qccS44HskNAmRYcEKgdtHjMoqUL\n42hbBILjDRRIxlFG8kGI+ntNlRRMTJik4jm1oYLNJa7FFPkZdAPkIcfUSocS\nRpsb\r\n=se8P\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC1CGpG097oKc3zG10nevfiuYh2J2nJxnGkoVczoVhA9QIhANbgjir1LYMhjgZ4lCFBlA9Xk8b2mRsS7AZ70OX1VU0p"}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-164951b424b91d5e2e3bbc28a27bbe7d98901f91_1615297668467_0.5449034117787539"},"_hasShrinkwrap":false},"0.0.0-8384b997e9975e8d3cb95c09f0c61b0dfe8163bd":{"name":"type-route","version":"0.0.0-8384b997e9975e8d3cb95c09f0c61b0dfe8163bd","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"8384b997e9975e8d3cb95c09f0c61b0dfe8163bd","_id":"type-route@0.0.0-8384b997e9975e8d3cb95c09f0c61b0dfe8163bd","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-LxvvHx82GB03IVcycKSI5ifCVUV5uDUAY8wOzNkaOqgFF0Dj3H6jamWSo+5g6MirXQq98+yH80Y0pMryvseMQw==","shasum":"acba311aa010f3bace11636dabaccf02e042b8bf","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-8384b997e9975e8d3cb95c09f0c61b0dfe8163bd.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgR3ySCRA9TVsSAnZWagAABrEP/R9Znmnn5puKcbrQ4ncK\nOAkRtkjZOHo58rjN5N2mVqAGfWMtFG0ERDhKRCAD7SMJflQ4xhlyM2V3Ih5k\nX5dA8xpOi9PkYZis65U3NH989gm60tIYJAMxY4y10jnIwP6HN6Z4p3j0wp0Q\nCaz/D5kDsefXGnyo4HlFn9+3cH0of3lhUTh7Mf36CFe5lWiYkio8ZnRYaKlM\nKDIVs0xrFUC0koKeXzck/qvdJWEYdYDOrejD8QZQekUddBUBoGZqKV8SVcnU\n38ocaJHhuTs9K3WVnGVoIZNfM23PWuf8Z9+2XDXYd1sjiBOjJDfOa/t0/MuR\nD1ivpmfH1kTdTP4Yp3ZtXnuctiiJ37gqKcVYzzeOlnwJPY3dFYHIwKxks3/x\n1sE4OZXT7ehSqkdlahmHyEV7uNz14tEB6rWLW1E4+ELoq+YD4L6EPfw3uwwR\nHBfIRxOS/aJ2FHuGPLFvWg/oZJHxekd94L1oXIa4h7jbZDMhpFZ7ewYT89jA\n2K0P3lJBim1vFiMzUgJ6V4QnYRnWnyR5f0dGUC+NtR9XSbyGN/5EG6bPBZp0\nIyzd4RkT4qnzT4XAv53mlWjdsT+lGLiE9CtZP2BXhGIk65kEcESAmiSbp8rZ\nI5OPvYeoQ9LpsKQhPqrfO5OUmZubXjmm1bD37jxiahfk2XbyzVAfNzmX6ckF\nzcFg\r\n=17hX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEgjvQy1AffQQemBKH3VrzWgfi7uuPV24x+zxTNH+aJPAiAaJDNcFxoPBy/obJzWykRDhv0yhMALS4GPg0SqE0R8LQ=="}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-8384b997e9975e8d3cb95c09f0c61b0dfe8163bd_1615297681447_0.780676597801971"},"_hasShrinkwrap":false},"0.0.0-856adc2b11d36a507b9d37294c1d01c927906981":{"name":"type-route","version":"0.0.0-856adc2b11d36a507b9d37294c1d01c927906981","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"856adc2b11d36a507b9d37294c1d01c927906981","_id":"type-route@0.0.0-856adc2b11d36a507b9d37294c1d01c927906981","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-UnxdKeCxquEqH6FZC4F40Lf7uJfbROpOYxNsIVuktm2BO+hmn6019ln6O5LTToRTEmL0o7TZ/0DzzsQDONmx3A==","shasum":"3fe59833ece75a04554a1530e043082829756e22","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-856adc2b11d36a507b9d37294c1d01c927906981.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgY3OjCRA9TVsSAnZWagAAzx0P/jPfj4p/ilHJ10x9sLFe\n+34qpV1XWgvVkILvlwRzHKgg/v+mUDPLfsEJPapmD1ooLo1fC7AeOFN+L5jC\nLVEGOyFXHgfWFvwEXrg+RFVNphdshe/uCwWkI/GSuUPqAa+MiiR73BC+efUM\nxZ1GKb8JbbR8+jI7x0bOimwYpKhAxXrDHTVvqQIJTZIP5T3H+zVauBjviDg9\nw6Zz8+kpUKbVbYf0fBxkruxG5TrulNI3Z5bu7VIMmFqSjcRsMc9sXz4RXrnP\n/TOb5f0CPzoopflSouzDJqXQc393NjkqmQyq2MbNOy9uuSZbvNoeSU4EksmO\nwRA27ToEE7lSyB60K6U1wqWjjE8XaggAY44TF1KWNuSMtYkfZbAtcJbcXi0J\nGInJ6zvypEQgrlfMJk75jST3FvJV4opajFHaVU8m4xld8wML1UD/Km4koiTl\n99YBGEkPkz66VyxiuaZFbvmEYj//2HI3CvMhUZY9k81CxO9S1NGFjPVdEa/9\nCXSGDpKCW4BU3RuyNYjfLbm+qvtaG/8D6LEk/q2gdKS7VfL1SrxxQsEv/fQW\nNqtPLRy9etcscFU1onMaeCPDRkFnyEuYmuzlTbxz5vgcPK8uiB8A8KctWhvW\nOMxeLSnYz5KAZ/6Ne3qPEBp/5WXwYzW7/dX74S0ReU6GMIu8mAM4VccXLnni\nSjB0\r\n=d8Gb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDcLTLc5kItt80NoQLqU3u/fbphK3ucxTfUJ7qxmPHXFQIgIgT2Njz61Riu1ezjnnQrssq7DMlvP7cyDLpGAVqmdzA="}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-856adc2b11d36a507b9d37294c1d01c927906981_1617130402504_0.2750918264921183"},"_hasShrinkwrap":false},"0.0.0-3eff05d42c847fea259b392a5a6c17192c5bd417":{"name":"type-route","version":"0.0.0-3eff05d42c847fea259b392a5a6c17192c5bd417","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"3eff05d42c847fea259b392a5a6c17192c5bd417","_id":"type-route@0.0.0-3eff05d42c847fea259b392a5a6c17192c5bd417","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-5tXP4E7f8TeRq8HGVRTeq5xl8PT8animOqJ6kERLgjXzFC+FHcx00uJSAGKrTijksYpMsc5oNss27YxZiSSVdA==","shasum":"42439a7347dd919a3452dee5b16f96efce32bfb7","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-3eff05d42c847fea259b392a5a6c17192c5bd417.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgY3POCRA9TVsSAnZWagAAZa0P/1RpsGYE3aYs5caU8xHW\nW8Oug66nZcL6ESnGQTKK+QLSXcWXYopozvV//3ujAQxn5ybkK3zXmoSPvUDr\nE0//7qzKJAVrX8tUpsapRm8NVaDY+gR9SOSlMOeCJ0p69MNrIGhV3V4moQRp\npRYHwSE/3PQnIftzRQSHqjuW1MXn9vYGDDo/e91E9cIYtHDtPn1DIonVzkqd\nN5EIh82HlTS8dGgvMarjhlHYKWswywOGmwXMp47Dhgrid6rA4NtztO9hYQoI\nKwsGj8miK05GtuffFwZluJjq/M2zw+Bz4IgCZOpeekKHtWskkPDqijDxdKJ5\nMjYyUzwGvI3M/Pe3cY8LfL1deF7GAD633Xq3aD1w4qJpOLPW85wuWbgklbnU\nznx9M0FFMcFvv8pyyvnrRccv3dKZTEGG7ueH++q7k5FDuzdMpDeFHiCJy3CT\nAG7Z1bgPORlRlLelK/S77fWjpc1dxz41nLs0iK4+93qMHkcSL4p9dzIdt5ov\nI4xqDZtmxUGokzPEPz25/scV8Lh39h4ESDB3llyhf/QgPQX3t33fV6kBu7S1\nROndWBmOg6S9kZt3+Z7HbPQEB5UfGTZQij+NQDQ4mGF5FRFO4ZEEHuhkI6Y6\nhevcaAb3B5iFGTkOCE8RRD5tLloYNP1r8tLprWq0s9mgLs6lax8Q7ED6By5B\n2qDD\r\n=Dh18\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEGNJ1ne4Ua9oe1wF+wDQukGUqOag6rsvbdkcKthDhSFAiA7VijmNMs0dqOSnu4BQhlimTXZAI3OzsYqBLeE81gF9w=="}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-3eff05d42c847fea259b392a5a6c17192c5bd417_1617130445348_0.49621524165877773"},"_hasShrinkwrap":false},"0.0.0-e75bcaa88da903348affd2d0f26b555cd77012b2":{"name":"type-route","version":"0.0.0-e75bcaa88da903348affd2d0f26b555cd77012b2","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"e75bcaa88da903348affd2d0f26b555cd77012b2","_id":"type-route@0.0.0-e75bcaa88da903348affd2d0f26b555cd77012b2","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-MTG7zFKas7pJmxX7OYH/9tbWvscMmAVWSBCiITtmafJTf6V8iAkmTPyQl8CStXH2KbEo6ebkX7HdJF6lR3rVMQ==","shasum":"3e65d46f81d7942ac8c9db28fbf096ebbd4e2559","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-e75bcaa88da903348affd2d0f26b555cd77012b2.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglVXqCRA9TVsSAnZWagAAgBEP/2c4aKTE2GWGOyZtlmav\nS4i/EYGECrG8e0iME+MWoswRIcOGink/CYE4+5Kr8vM436h/XNtpYUB11KoK\nqbdCUDdXt2skYavKGcbGR8F267mTDoxygovqRReJmbvooa922TmIefJ4NoT6\nlLsDRg6bOsa8mCa9ayXiK97reWFzONBaYRyoThYdE2R/9RvXa1ELGTez7R3X\nZF4Kt+r1rBAQ434N6omWZWrR4ktO9BGwZPqPt8ImJk2HrbwhsftZk1zn7UxB\n7lhw+2GgBENnSUbaK+suiL1kEflDlL5SDyttWGhmP2qXWIsuU6OyZqFAKUxs\nAIK6R85ZbtJOchcwhtd3IbwG0D+19Bs4kEhLMA2GYjdDs/Y6UfdcBiU5HHkW\nXCy5U/uSGrrsJYzIJ5zfNm/jwaB49ZsvdIyNJEO0G4lRnVhmQeqp5N+lYTLX\ns7vA2i9eBzT0xcmnumX79ssI6GqmHfYcIU+w7Vxji5eH/Kugy85Gd098KZZ9\nT5XDWty0qIPFKVa3zdFxk7a9Bh3yMuv4QNdwN+Ks4g7uV2GFzSD/7tDii+nh\n7ycNQCthn9Zpq3rsdF1PG2RNCiI5Idy3eGVdKm+Mf+e3dbKOAAlFwxJCJCFH\n6q+Ar+qxIwuwKp1Yjd4810gxwRgdGdsfC/Q/bp69/lnvh53lAy127/s0SZVI\ngvEz\r\n=lm99\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEwcmKhqvY1hmu+1IYoji2mYQ+SGlQAs7Gw7bonGwQ+7AiAh9DtgZZU2JSu5vVyWik3nbLfupRxfNPlDcaoivwEWsg=="}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-e75bcaa88da903348affd2d0f26b555cd77012b2_1620399593565_0.23092012316207788"},"_hasShrinkwrap":false},"0.0.0-ec85decad6ee3cf321864c64f23fdc948b871401":{"name":"type-route","version":"0.0.0-ec85decad6ee3cf321864c64f23fdc948b871401","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"ec85decad6ee3cf321864c64f23fdc948b871401","_id":"type-route@0.0.0-ec85decad6ee3cf321864c64f23fdc948b871401","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-ASK6h+3t4WrLdQwxjE7xdYvcDx+BEgCcoI3IbbrGc0NAnywuNreGkKzXB0FfgWtZsAy7LEuta403ZugjDrZGGw==","shasum":"9f94e4b851034d8876b7719ee7ecac612f652fcb","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-ec85decad6ee3cf321864c64f23fdc948b871401.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglVffCRA9TVsSAnZWagAAd+AP/1nLsbstWvJeELIrXQbi\n3iCENoB5YmW6e5cM0HOtIjGhDN1g+Wqg70HIPp0diyibDBCyP5cMjCQ1uFYD\ne75AMnxuy0z/3wRWGqAHlX5zLxRkN+kq39jikVgG6JunjsrjC+l2xeo+yLy3\ni9voCt2dabIxyHwOR1GL5HB9z6aooQNjGMLgdJ+B2yuo8vRFMRsbFmEBtObg\nu+nyhEcxHYp9k62aD6evwAWm3Lk0uf5/NHrNAdqjKH3yGzdma7DqBmKwFs3x\nynm6AeBCjBGRHKcypOJOu+FiKAyxcWIIXAVkTlLSOh0QLuLUef9h/OEUpCrV\n4zuHxIsu4a9ZIwkRZBylXaFs3EkPkPQpVEkGSbLqDQmlZ++Sw92DQtG//Ui3\nsgdCPezYDnnZ2131nHWJSyomuSJdjGKTNTaGqWA5iAB8rqQt6eHNS8wwoVp9\n4TwpdHW0JBkC3KNqB8qZX4unVzCO5gP/rdPB6yPvlCsaMnmNCv8NhpzPrk7f\nCh53rHs+q/5CEQlr6VpPaj0lENmITm0q9Nlu7KrKzwyITPvdGThNNRlGDm0w\nWuJrQIEOC8NtY3bouV7JjXO16wmcLXwMv4RQcS2aI5tiCfTH9mSsKFX7VcMl\nVxJv3e6LeJZAqNIF+Qkp1HqgZAKE3Z9r/9hcSn+bDCWJ8yIPPZv+37va+Aeh\nF7J+\r\n=hMM5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICBfhRVlQKosrF/pRNefHbgvSaPvsl028xl/wCSOq2/BAiEAqdW3vDfmu+33stU9ED5hFU1V4Y0YqTiGFPv9ZjzQtW8="}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-ec85decad6ee3cf321864c64f23fdc948b871401_1620400095270_0.25292676507450484"},"_hasShrinkwrap":false},"0.0.0-703e5689c32d07265f61aa5b8e5947f674c40bc2":{"name":"type-route","version":"0.0.0-703e5689c32d07265f61aa5b8e5947f674c40bc2","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"703e5689c32d07265f61aa5b8e5947f674c40bc2","_id":"type-route@0.0.0-703e5689c32d07265f61aa5b8e5947f674c40bc2","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-hBkFF57YRzDQ2tQcGLOO/5xCcZ6rRlaQjkczZq2obZDrO9SNw9NHWxto9JIvVXsWijZrFjt6pyZoo54Dd0rgQg==","shasum":"9a29d432928e5d421513eb0bb3c43abe23b10b5b","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-703e5689c32d07265f61aa5b8e5947f674c40bc2.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglvP7CRA9TVsSAnZWagAA1xsP/0AJaAX7FRMVJm+P0Lmi\n+xkvHOkJGR0+WXE2BI+E/XpDV6ameBS7Xzrojn1AkS4per56VwLX6PmOi1vH\n7aO1QljJALo+E0Ep7sVBURk5IwGwb67bpViomK6nUL5s0Qao3Oa1s7GLaK3U\nE8cnu+7z20ulFHpZTmkmpcbh2nySSdf6mk4TFPeeyNRJBOzK9nkRXa3+rorD\n8GcAwjuRjnIhssvdOaAjrWE5ah2TZjBTOtYRkLrzFHrjGhiTV1+54ohZfeln\nRwSTUOZzEyrwfRzJqYeaX54xOoaSEkHZEFzLi9XTGbIsufZ3ReKjcqG3PFZA\nj0xJcHY+U32hdshMcchj0U/coIoXoVXtYE3ahUJNSzhJbAaS1tFZ2lll4GVJ\nwNK/K0tj/kmG1GC0OtYpu5+ENWQQXQQ1O2zMMNUFKtARbpsGjQsW8eU9w//6\nIudvsu0Z3SZIOS1yGBnPT/FFhN9EpJJszbnoGb4CQTb/99BPByrZLhQdUhIX\nKveGsYW1KY3D0iO3p4gTFReorcg7TUU1uEOiYBocSZsAMhuE4k2g6GVV0dcD\nUOkeVSw428+liatHPZ4vWL6aFvuDXnLbYAFkpgQDjQQsqMWONKPVlodGGyyV\ngOxSC4284R7VyCvqSCDUOLhinpEhbAqLFhdUs8/HXjgetOuRyQqEA/0qsxuO\n/Joq\r\n=Oate\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFdt6ReiLVTCOzcCOClutEVdPv+1htbbYrJJv5LkgfLZAiBPkPsKZJvNcgY0VPihNJzIvdEYA17pFIgEWi9xjwEwsQ=="}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-703e5689c32d07265f61aa5b8e5947f674c40bc2_1620505594728_0.8174559301311302"},"_hasShrinkwrap":false},"0.0.0-d540b383aa295776e50aff3d26a8ad4ab6aed72f":{"name":"type-route","version":"0.0.0-d540b383aa295776e50aff3d26a8ad4ab6aed72f","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"d540b383aa295776e50aff3d26a8ad4ab6aed72f","_id":"type-route@0.0.0-d540b383aa295776e50aff3d26a8ad4ab6aed72f","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-zl6F+KLhVzULBjKt3KcqqBWuPwgDj2YtRGEVSKM2f84x5YAi7xbU7egVitMOf/KMNYHLT17F/2Y1mBdyv4C4QQ==","shasum":"f75667e0284e2fe254818c9e4dd6a32c634ed1bd","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-d540b383aa295776e50aff3d26a8ad4ab6aed72f.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmT/PCRA9TVsSAnZWagAAeawP/26mUnUFohYOhSS+6nYm\nSJ3A78KFal2MRlF5zGYt1rTgX8fT3Z2nz8ta0+w9bTvepKhD8n9Fz7VOLmbd\n+lxxNtAMVsE49AXc0zvru0tXZYaNMEWr/DyFhCIi8NgcYD/cJfLcERywmL2m\nVcF6rnTcsLihLQaCQ7bVwdugTbf9ZI7XwWb1F5g9ENRUeuCg5JKGzvYMyhHb\nUWUr/C4jTDVPjJ1137hvNe2Z2z5kE15hRnoN2EVKkfLB5L7Ub2qDz2cwFDJe\n0LfCp5bkyyqA6kZcY0XKvChvCFTGDFaxDNuSMwfi5SaQSKoR94lIQJ1qPWQm\nKPkqtpiGeg0+twxX+pp7CHQvlKh+aGInh1oSeFmSbdEbHopVX0VGNkq5Oi8H\nDv3qeFgeg0W00dbnCMDcoi3Q4thiRJjMiP9b5W6URLT+v68l8HjOjIqHJzKf\nAcfCpZPmuGmudeQAKbVy8Z3huktlFrUVl+Zm1Mn1fwSzlFjjFWaEogtaadAy\nm8FR53yC4mytFC9xnlRWDjGkeKXQy07P9lTbI1RlYZH7KhJBCrtjmSHU9Pfp\n+hMfu5O3/54s2J43wi2Lvptfaqliv301g8EGnQsL6CuhiabtiNBfSEUTnel+\nxPbGHlbe9YneRxOckFUElLlGGVLhQqbqvjn/nRYKzPmZ4Vz1L+Dp/r+Hwi44\nwfIL\r\n=wJQ5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG/ETtZdenc/ixArZnq0UZhrpy2VG3QUPCrROGZlgMoQAiAOa920fhrCIMcch6IY7sgaZUQ3eCDb6YPDzT59Uh7HbQ=="}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-d540b383aa295776e50aff3d26a8ad4ab6aed72f_1620656079383_0.4873786117311085"},"_hasShrinkwrap":false},"0.0.0-71973fd948b74f254493c07fb993a231c104339a":{"name":"type-route","version":"0.0.0-71973fd948b74f254493c07fb993a231c104339a","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"71973fd948b74f254493c07fb993a231c104339a","_id":"type-route@0.0.0-71973fd948b74f254493c07fb993a231c104339a","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-lhDkWL2XG0f5bOdzJoFOekPR/oyPlRp/8w1mFa2PNCAhmIAB9V507lWCHPoSGW9gfNjM0kfUUk8EUAuwTGyy/Q==","shasum":"3023ae6cd6db9f470bfa611535706788218e3506","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-71973fd948b74f254493c07fb993a231c104339a.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmT/fCRA9TVsSAnZWagAAxi8P/A/zadllAPf8njyZTniz\nlatYzxsV1rrSiDRpcdnKxUk5YDu49u79LuQBM1/MqQUFnv1I+KN/8wi01US+\nDrWUYvYqL9QqUjuRRWhNifXT2jHRCOtOEUQRC5C62eJLlhc3tXjz64rp/Iee\ntPoKG4zzq3kJLtrJ7Dz18I6C63dBXWk4388/aC0AAIlffBOx0ylks23MQ+oe\n16nkS7WqQK0OOWKwWzQr1tSQauf3ZQtNJIaviRF3N8Ai9UC2BQB4hCsIUY5H\nSJTjvOgFYMZdeSCzBzpK3HK2NZ5D9OeMAMbc5wX6TDhrr2QwZZlMbpNe5FyG\nXtkx4FmM0h8Teq/2UXkvZjvf6cIZ82kVooJ7pNwAX4LLUc8N35njnH8bRvsM\nqUTqncVeIWhb/+FqIUrYq4BA2gQZIHM5Bv6pxO78hVl3IixbkkMJKGSor+dH\nluutWhokAbquBPFApG+yu+w4d5BC1uWnpe50am3mihN/QqWLVJI2sGYhzHKY\nd6/OMYeFQI+7m7awOpjM0qwJm42qXV7ZG+SpIEi/p8AtOzdbWZyq6gYcWdcU\noG5jstluB7IEyJsdLd1l1+P5VVOPR0pImq7Xjk3VAKyTNQqG+IHMaE73F81L\ndcnRKGh1Xcrn8j4TLY+Ic2EtyCdj83l2v6X5wKYqUMlA2s00L+XfI0p6Iqza\nSL9O\r\n=pZCb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBNy3zWuPCKwT4wqauVyHQxeueU5fwoPZwljjJqLN3HBAiEAidD2vecG4rma6cSbxVkqm0moFuxYgde9pqnw1j7uxG4="}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-71973fd948b74f254493c07fb993a231c104339a_1620656094571_0.2349793670401792"},"_hasShrinkwrap":false},"0.0.0-538459d5a8c95555580c74454d9099452709a0e5":{"name":"type-route","version":"0.0.0-538459d5a8c95555580c74454d9099452709a0e5","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"538459d5a8c95555580c74454d9099452709a0e5","_id":"type-route@0.0.0-538459d5a8c95555580c74454d9099452709a0e5","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-i8sspcu/tuE/+Y4g4o+8r2+Cj6yUSerBDp535bokpFpRbsFa5U7donjrno0P07NfxK7QExYZIfLjzimBirLXrg==","shasum":"192b6fa41afb04bd909cfd0bccc55bc79553f129","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-538459d5a8c95555580c74454d9099452709a0e5.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrPdaCRA9TVsSAnZWagAATD4P/3Sj0jK8JEHbiFv/ya8b\nJYvTCFdchAEBjBx1kPb7bn/uPb4VO723qXjXRABeA5hYTMi0OQASKfd6uF8A\nSXiENxw79Q9YS6edEv2W+uf+I1o62sJkc3RSYM0gLzNbdysWjldEn4k6yGD1\nJTDQ7uo9Ooj2rnlTv2EDZDPv+/D9cQLIiGlg6oHKIhL/u3zddZCHO7m9oC/z\nNgW6GiVkcDFo95Xrn4Az/Mht6upgSNCG3jwernJtt5l53Qm3K3zzbplC/5kX\nvBmL9B4nwTtL0SMPGC9XGL+b3vbONk0qngVq+53UmGedBFWVum2S450jvCAY\nIRKnZANmIhHAuVpTMsYF37NPsmyZW2fWCRnXIg9SLJcoNCS8FsuKd2s17Sm0\n2jy1D+Ej6DsZwV86siQOULnQd9+3HUiHKRZ8/w60+7bzqYjXFL3mvtW9k7lh\n6p3t920+8DhpDIGkp+9X+n/fMb/RdtuagGEYr+Itm6KBh9OPtq7qJglX2k8w\n46hbD+Ux9WAZvZJt043TLXjEdFMmGZTPomZFcrGHPPlvjHARR64rp96mx58W\n2mZ4On4SkgQ6WG6PDCjns7g5AfhEDNUJaL6KdMogV+yydk4jx1Be4MBCcYsL\nonQA+R3ehROc9hivdnPN4JGDZJss4oUywwVa4k+WoO73HS96w1EvvI/H+4c+\ni707\r\n=gJA+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEAc7DrNzF1UgKbEHH9WFJlv0Xa6e2rRFT+vXSufXwOFAiEA+6awC+hrEkOsa8A63+4hn1wKSMuTyFUFM4r9wvTfsao="}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-538459d5a8c95555580c74454d9099452709a0e5_1621948250284_0.4136576233796758"},"_hasShrinkwrap":false},"0.0.0-3b0b9f3a7b52ef438821f4c9dc2a69cec202c6e3":{"name":"type-route","version":"0.0.0-3b0b9f3a7b52ef438821f4c9dc2a69cec202c6e3","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"3b0b9f3a7b52ef438821f4c9dc2a69cec202c6e3","_id":"type-route@0.0.0-3b0b9f3a7b52ef438821f4c9dc2a69cec202c6e3","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-0Joj9ILFX+9q8G4gJSW1+mN7+xj82F37KSemFxXXc41luHEZ8jpjSFdvGCGYNCGViVoSZxEL1AJeHSaEDkX8Yg==","shasum":"ee49face9d4eb455a48b9b8e697ef85eaa4a8256","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-3b0b9f3a7b52ef438821f4c9dc2a69cec202c6e3.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgw1slCRA9TVsSAnZWagAAMhUQAJaSVHo/OzRyzdWoTMuX\nRwkQXB1mXCt/JmlYbWrOColUxP3JryigGoYJQnoQoENcfkOtUvrJiUcSudCn\n5hopHjJG4/eLtN9yaKghIlwOOc+tYoWr/HAM2peCSoG3PvCoPkMfbXGJUS9f\nKxA9G44NZNT+5lisJ8As/q32kmj7cc3Xjc4wfFsJnIezo5a9KtaH67uS2Dm+\nULOd56Qa4cEY6LtUPdFMKKC0UVPb+rYCCJfpmQWmoVImpz7nEj2xDfchjoPL\n+T5bHn+tWeUjPrHJUGbPc0BwWQtS86ln1HL76ra1nAkRPQ55jnv789wp+GUx\nA1sSPP5YA8MZYiRR5lSqYeK0DupQErfhzaj9Z2uEKAf4wVCzgb+okMJuJMQb\n3Yl5x6pX8kt0nk2X6XNNTYNjuqHy0tmtjXK4xDhXRwYMrDncjBHDzw0iKCpm\nkP0jomNFTtVTfhSIMX7c+9IibE6LPb6S/4QtgLtnlXUtTG86H9/C4JustsrA\np7y3WKB+FIA3ckuYL48s6Z9l3FsNCrPn0uDfOh8W/yp0DvbhT0uCpP3hBDUg\n9r9hyday1xRRYe374XJyDjBZL9eHnxtdkCF5st26N5LNHLLzkV0qkQf22qGq\nvTvmw8GlWd8xR3UU/ehsdu7BkokJA/0iwUTucJh85dtNHlzYOZ36Zsd8hviM\n4q/g\r\n=rZc4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDc98b99cd4oST8ThYs4R/3KNtVa5FgNGArIEs3ez16UQIhANrbyfo6CANoyyd41t7oIPE4o5ImWLvn4bHeb5Q3QXPr"}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-3b0b9f3a7b52ef438821f4c9dc2a69cec202c6e3_1623415589586_0.48740802632987856"},"_hasShrinkwrap":false},"0.0.0-601b401177d7f24078d567c104daaf24025c0b7f":{"name":"type-route","version":"0.0.0-601b401177d7f24078d567c104daaf24025c0b7f","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"601b401177d7f24078d567c104daaf24025c0b7f","_id":"type-route@0.0.0-601b401177d7f24078d567c104daaf24025c0b7f","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-MvHXI3yJuo7+RAOrMVzNKmUqrIJ3BtfKBgJPktmIkBkvlmj9aW2hjObIxMF5sbBD81nf2ZbNsnrBl+qVRP1ggg==","shasum":"5a1ea1e249d58e8d5506ac5a2f820e1a623e305e","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-601b401177d7f24078d567c104daaf24025c0b7f.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0P98CRA9TVsSAnZWagAA56gP/0s5HnBG02KkW3KSWmWD\nLypYFwFRJBAn8nWTxUkuxWMtVcUebt/E3NeQAzX+7GM1XihBv8mBrtK5LRTC\nvc+Eyn6DkabBb2sbWmX7pysOlDcdaDqoaAmM7++trOu/WuFa4X3ojWE84MxC\nPqOBD4ft+STqYI/fBYeWUsaR/pJkSp7XZocPS+MByNcQrVD0ecKzPn+JFhEO\nyz9K353u+IDnjxaJ7ad9J0hBIwmmCsc37knzFHrM03bTQWW0deYN4R3Cnr+q\nRyardwkbhS4bSj9tbeCYa22qAU8iRWuvpcaKwaAMobovclcYZFxo21SfvqDb\ngWXfhhZiJm/6T2xTFTNa/0NaCvm/Phr9/Ql1TQbVHp5FV0ULDGMyQVz0L+A3\n5aItA6sJLLkFECTIC6BJG1TB4EhrIXfekNomuTGDtrOOwGV1PC2zbb6ye61R\n3QWFeP5ZwUy2+YUouwRAjsZInoIxnw8aULghaygl7XA+x+YGPDrlZ5Ef7Yfq\neLSC8ftHMAsv6+ZLe7wWpGsREapx0eSaor6mvm2GYT8bdE1wN5GP1ZT7PLp/\n19ipzOkOkPFwN8Y7xT3YJRGwlP+Odic5r6smdDGUoDqW3DwNi0OS5T3im9zK\ncSqz9M59L4mjn/Q1HG+JcfJ2i9NF961pCUTHXfL7/cfI8ndD6n+EfR0fV3L6\nw8zG\r\n=Qsq7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCeuHVPXZd/TQQz51EijIqVX3cUZF1WLMaLT3B7f3gPmwIgBv5dU0+g/eqmvEytb4BXI+imIwBRKWZoQJzApcgxBoA="}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-601b401177d7f24078d567c104daaf24025c0b7f_1624309627982_0.6925897376142842"},"_hasShrinkwrap":false},"0.0.0-db69d59c8ab0e7d62a99c9eb2366590e73e38de2":{"name":"type-route","version":"0.0.0-db69d59c8ab0e7d62a99c9eb2366590e73e38de2","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"db69d59c8ab0e7d62a99c9eb2366590e73e38de2","_id":"type-route@0.0.0-db69d59c8ab0e7d62a99c9eb2366590e73e38de2","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-BIW64tNM8XuU7grVTtUXsJqXtzg/707ZkDPuWwM5EdVp00VNObenQ3JrTyetPIYvX8REeUDPeON20HH0WkGF9g==","shasum":"891849fdbdffdde7cf8556aa38e7b89517de0919","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-db69d59c8ab0e7d62a99c9eb2366590e73e38de2.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhEyu6CRA9TVsSAnZWagAAz/UP/2TouThwlT+UIe55JZHu\nW3Su/MzvlaWqDZhLXQCV3/71XSIrNi6JscGaJxBGMRrI+MUlDbgwNkclw0N6\nnWDEsGKSl1dKBfyAXljwx03YsEXPX1UvqckFgeD/9TpNp3RndKDpCm9iJb4Z\nKNHWUa4kL4lgEtQN5Q2IWxXxtr3CyQDU+Rb/tyUs+UEC3clpfmcTSYoZCAIF\nquu4eLpprPQU1RZ5fihPQVdPTPISHX4y8hAqKpngqVDdHSq8XaA8MHNyT7nJ\nTkvQsDE2X3UTSumewqRRo8zyFcOwEeX7M4wWpHF0VQiWNPvXGefcLu5N0EkP\nvLNxqDeV3mc35TiWx6BoDPkLk5IIEu7fuwEdI28oz2ZfbnzIOwVreBM8n6p6\nvfKZS+Jn/CvrZIUFyUJB/AzUu27D01JebqgikXEaU6G/s8+2sdTenW1nj4Mh\n1AyaonhyKVIsBJjqv9D8eIeLyyXs2aBoOoZosVFHmf+e9YS9+QlLvQHF1hRk\nVarXRD8YQAsCWSNc269YswPmMSq+Z90+bqKc+FHk6AT18yza+8jHkM2jnhAY\ne89IVJFmZAhJ26xvLI2U8166A6odiHBj117xRQFXifDCkCF9wkEn7pt6g15m\nSe2X8zXwnLLDvo5Bh6gBXhrPRkeE/sF1kUEOUgHk9vkJeAojvGfYplieRnlX\nz2MO\r\n=YxAW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHq0LmwpY4Ht5loVDMlM8p16xm3yzGP7P8mq91c6Mnk3AiEA0tuiJZzPt3vH4m62/o2L3eibDn2LCrlUqljJYWPX8r4="}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-db69d59c8ab0e7d62a99c9eb2366590e73e38de2_1628646330455_0.6591109982210663"},"_hasShrinkwrap":false},"0.0.0-c920b8baa6c7fc98c3c79dfb7eb68ebfcc1e33ed":{"name":"type-route","version":"0.0.0-c920b8baa6c7fc98c3c79dfb7eb68ebfcc1e33ed","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"c920b8baa6c7fc98c3c79dfb7eb68ebfcc1e33ed","_id":"type-route@0.0.0-c920b8baa6c7fc98c3c79dfb7eb68ebfcc1e33ed","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-TxfxAbLGbOCiC+86TGqInlJQ6Mh6YIe9wfgHCNEaauwtXbr3IizMGuvzw426KYLNifCCvC6aEsCqUJWgVi7/UA==","shasum":"073bd08f1c9173801051ccaae4f259bb63c16775","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-c920b8baa6c7fc98c3c79dfb7eb68ebfcc1e33ed.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhEyvnCRA9TVsSAnZWagAAX6EQAKRiowUibg8apY8lU3rw\nLiDMSySpcmvGqwhx+Vv9OWJoGSsOK22uJNL7SicjBaNKsyKU+t/Z+W7vMuTM\njVwfcAtfuKbX+KlC02zDnN2/GisCMSEcaCOfsFZsz7i3trBPPBDi8TEsdAqT\nUFtfHgCgBfToryLGN8JQIgsJB/QZuagyNYGmpmTh9/AByv8AoreKjuWPRNJv\nWyUCqECkCsazVWN1W0cGBZGNUon/vu4z+JrUv/j3bjg8+FyYgznLAoVc49HL\naiGKXdeP9p1Q73ZGVrmCbVWhVSuDbePhLH1HxKg24t3zFCgwNjrIKJgvlmZV\nJkOuUKjShoI2qpTvUovpI2tKS5tyJQh8AiaXw+nx7qS/8Q6RqSxTuIFS0scd\nG+IuGZbZiLEWZfwSBnpZmOTbgOJFozghhG+43teBoMAWV6wYFaLXY9C8py7b\ngU2ZW1B5TpAdt+8rg5HUCU+5k0pJCTP9BB5+lLsVNQNX6Xo1OCwqLT1G14Iy\nGUzpSTIK+pFHNzyfLPKKDrDtGZNi/GghoTCMaxIIAfIn5Jmodwi6rMSHWRZs\ntU//E3QGNNwrCTwOslY41lE2+hy3kc5NsGN+Tq82CnJD/81WFj6FYepW29xf\nt+1xPXYea0BTAd6rWaNakznCeWxvpYZ6tcWhyFeTis2bZCvFXagT6kuNfV7N\nbX5/\r\n=staq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHQaNkxWc3h0KvjVbfbbKz3DdgfNYXt4cToUPFkLJIQ2AiBbDZkmYUxcYT3h1SabU7hW/o2Umx3g/kces25XyZqOlg=="}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-c920b8baa6c7fc98c3c79dfb7eb68ebfcc1e33ed_1628646375402_0.3214231527719402"},"_hasShrinkwrap":false},"0.0.0-59837c5a166d9a123fdd6b4f8b2532e9731e37e1":{"name":"type-route","version":"0.0.0-59837c5a166d9a123fdd6b4f8b2532e9731e37e1","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"59837c5a166d9a123fdd6b4f8b2532e9731e37e1","_id":"type-route@0.0.0-59837c5a166d9a123fdd6b4f8b2532e9731e37e1","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-meSQtkRrojJIpH6HP7j84xUNxxX79PCxPhuv+UuDaVP584bQ0RYQQmrHjur1wOuD3imdgy+/33YjZviKQ3Tjjg==","shasum":"7231d412bc48c6e8166ff205e196d561eb8d0c41","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-59837c5a166d9a123fdd6b4f8b2532e9731e37e1.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhEyvvCRA9TVsSAnZWagAAhAkP/0mO22zGQr7HGXENY6X2\n9G5vDxcvqALydz+IVavXeO8etDcnKGEuCiB+L487oWNiRjmOtEUae33QL2jB\nQB0iTfd+oyKToWejj33wnDGU7gn7l9AcF4W4B4Q4JH33THeYfxj5X1WOxhUi\ntmYJcKNzgBruIEWhxRii7vOSbGQ/4v7uW6w1FVl7lCzIarld2r/rCD7xdteQ\nD14AwCvt0gXjNOWWRdPHKCv9sOJrnr1t3AtzIb2Ou28fbxEEvSiVOCKr/Kwp\nVG0eypHnhsPUPpXcRbg1QsGOX+j1R80EXEf6LfpcMNm04KrUoGxGHqUx8HOa\nom+bEnGXNxEnB37inX3iQvhp4oTmcVStsTB4SHJQwUCVypK5QRzO9sO3foq9\nrurGsN0BKttFEBfjKrT/VOBzHusy6ZADSYVg+Yg+wl4kIXLh07FHJnktUZzp\n+MuIQRlZlhlYQDOw4nN/gg3VtAyEkUFPIGhMwOJ8UV6I/F/KvynOJZ6hwP9q\nPZqywE9i4RFXKQPyyePHNY8DGp3a4ntTD7wyKIr/rTF3+dxoW0QE9W8hyIJd\n4VFyIpPM26JkuuUMKUjw9yjudLO+0rR+Iz8lw6dmGfxFJGhjUtHG+ZB/0mtq\nZCWJ+YGqeQk0pi4KQMCM1OKWbJ+yMxvkjnD+XVcIrXxwHdiLU1squCJuSxgj\nZf/+\r\n=Dcxw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEKbl/r0ea2i/RCb0N4V86+uAttPiAjwu69ggsQV1cnpAiEAwK0SW/IW3VcssAdWjz6p9zoD9aSRrGpm34PsX0mWOf8="}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-59837c5a166d9a123fdd6b4f8b2532e9731e37e1_1628646383746_0.19909396258485845"},"_hasShrinkwrap":false},"0.0.0-00d73b71a671aae6b2cb6a64738660a6df90316d":{"name":"type-route","version":"0.0.0-00d73b71a671aae6b2cb6a64738660a6df90316d","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"00d73b71a671aae6b2cb6a64738660a6df90316d","_id":"type-route@0.0.0-00d73b71a671aae6b2cb6a64738660a6df90316d","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-l2RbY/so40Zus5Djc/XGkxMo2sUazUlkq+surbi08FQHXGxsEtRHtLCWAS7EWv/SCG4bnX/Y2tYzqJXzIRu34g==","shasum":"712eb75f2339e777ec89b2c685031c6f4b61f413","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-00d73b71a671aae6b2cb6a64738660a6df90316d.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhE8mvCRA9TVsSAnZWagAABFEP/R3u3J9+epMIsvcayJo+\nsYQJqNpXu7il92Q2lWH8WUWLjiW1eGR/FWwknBenA7DehjlvBcAzDO51dwXH\nDpKqGVDjy3jz5/9Vh3ClPdDTfm/q3GEx4OpMxEoOImH7gA5aF1IagrVCiEtn\nsEUJ3RsRzlLamQ9RQOW9JV5kZS4QFPcJt70wfZh1I0gGQP0eyqBbvgEhpg18\n/XFVeVLDSLc8Y8eTVsa1ULFjbMXyJ95fr1ANojWZH9VGpcO7yFW+XFl9sMP+\nlrnAcD0tmoq9snZFeHYHN09t7518VvdPHlCDtcQalW2QAYATj6MUtzwLkVkA\n8rG4I5MqC2EU7ECP8tMu39rzalQsCKM5ofQKBORXM1MfNYsi57PClDnYcq4q\nB6InX2qYU8VVhrVBBe82+y+wggK4TxF8a/2Dm5G/CnhlxQu0GNRGNX3G/Y2Q\nrGHvHTx6gHPnNDfUu1M2bSyc01iyK3RSpKXGYuRycjTnH7U81KjJQRSgYGiG\nqLwLIo4nkbHsfhGL6QrHTgKToSN38zX1+TKohXTKO7IZRaBZ+60VeV+E30cO\nFf8L63OZ1/B8zm/96o9XfySKfyoBkcJdHi4L/ULAcGtcWoniCGlMZd+MBurG\n0jtvfsqopfGLbQYydlXM7V909dwaSr1GUn0yrT0IlO1vcaxUN6rF0I9G0pFC\nmJQ3\r\n=zGO9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDRYaKfaePzHSMH67hrYMK/YRC66KvP8WhJ77MyxVYkiwIhAJP2KrFTWDUWqFoJVUg8rxshm1dx84EMNYrw2Gz+iWUo"}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-00d73b71a671aae6b2cb6a64738660a6df90316d_1628686767710_0.7608798165420259"},"_hasShrinkwrap":false},"0.0.0-2b09b0502245efa68d7eb45c45724a41bf5169f9":{"name":"type-route","version":"0.0.0-2b09b0502245efa68d7eb45c45724a41bf5169f9","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"2b09b0502245efa68d7eb45c45724a41bf5169f9","_id":"type-route@0.0.0-2b09b0502245efa68d7eb45c45724a41bf5169f9","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-1HGv989h6Fn7wZ6zCj7mN7cDOwuU3Bz/g8E8jBI4gN68roQ4ITal7QWh+SoHERrYCgmQb66o2kEGS2Pl94wnfQ==","shasum":"639bf3ee27566916b386c2e9bd6d8b96fe2f2b7d","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-2b09b0502245efa68d7eb45c45724a41bf5169f9.tgz","fileCount":54,"unpackedSize":1190972,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGd6sOIOantm+oHTJRXvxjrbjGrShqzMUb8Jy0+WJEEhAiAcbn+IPz450d7Im3WK07lo5nrWommrerzXd0eny9f8tQ=="}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-2b09b0502245efa68d7eb45c45724a41bf5169f9_1632180898573_0.302679447538412"},"_hasShrinkwrap":false},"0.0.0-27031ce71c13a7ad199913a18fa97fb8c5eeeb0c":{"name":"type-route","version":"0.0.0-27031ce71c13a7ad199913a18fa97fb8c5eeeb0c","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"27031ce71c13a7ad199913a18fa97fb8c5eeeb0c","_id":"type-route@0.0.0-27031ce71c13a7ad199913a18fa97fb8c5eeeb0c","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-6Nmr40XNZf55H61unUpOy4KysJ7GhC79HRA4FaLvD0XIi0azkEbKejaig368JZEsOQneVMMJxMvOk+g7obq55g==","shasum":"45b6a55df3ea187f066769e1db16abe388e533f1","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-27031ce71c13a7ad199913a18fa97fb8c5eeeb0c.tgz","fileCount":54,"unpackedSize":1190972,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDsfO5itbt6qim+eJJSB4dQh0KhzciNp/11Q7tH6d+cYQIhAK42qekTnhlwKyK18B5PqoRNrCsJIz94yc7kJTwxd8EP"}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-27031ce71c13a7ad199913a18fa97fb8c5eeeb0c_1632262551076_0.7644379037952098"},"_hasShrinkwrap":false},"0.0.0-c73a04d11b04bc3da93e8ffba343a1994e2d0cc7":{"name":"type-route","version":"0.0.0-c73a04d11b04bc3da93e8ffba343a1994e2d0cc7","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"c73a04d11b04bc3da93e8ffba343a1994e2d0cc7","_id":"type-route@0.0.0-c73a04d11b04bc3da93e8ffba343a1994e2d0cc7","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-+Xd7JW3zy6+enbEWX63NijlsxpavqPNLcREkHofxiWGzBtkAzD3SDlGlrm4VfPsL3KO+lpgC79Usy3XSVGIyxA==","shasum":"35ebc9e2d0517ebaf661f7fe218f0dc7c2ee774c","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-c73a04d11b04bc3da93e8ffba343a1994e2d0cc7.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4EVcCRA9TVsSAnZWagAAxGgP/16m+X2qJ0DRLQHgR2bm\n7semhU8k6GszskWIeKshDg0C/bk0ENUdBAA/TcAMyJBthp5HVAiAHonJVvIJ\nDj7nqtWQGcP9zUWYMsb372YkDyDo941UlUQJZEX35nizco1rC33tfagWRsH+\naSPMys9VnYyrGhbVp2wVNMrbO4oQBd7y5m40YpjGO0jZxaw/26XBqvz7lNuh\nsFvBGMyiAQMqhDhm2QmN2iWQzs5hTG7gOo6w1I7YaOAv8Xpfpr2H+fVxCjvr\nYW4iF7vYKzJlGQhv2m6roMTUhlVqzL1IcX5wmLGlQM0XThI3DCnhiIKN6oVs\nRzxsCkTGh/QmJzp/9qgh4vM3JDNBuOct1zLb01qI57rh7LR/bjX1HfkDlVTr\np4HEbHnfdw0sL4Rl1iH0r7MyddjcPJwXwGtnylmZo3TUP4hlPGTwjHX/gSXH\nEDgwrV2I6SbaJssRVAbZwHIsreZXPkFw/zFNtJPG3d6JnKp52AM3HNSZ1WUr\nJuMFFzYf1evv+OXuPdFU4w8y9AWPXKXnr+x4065POfvbjOR7kaLzGpvz8f/F\nMB0gYRb73m87XQzj5i2RBVuvFXOYc1EJnACEIDzTwDp6vajB1KxRhaDSQ0p8\nSqskOtQ5ehcGir5dOydjL1xtsFU9d4SpdOiO6CP9eZR+rReNJLPSDtlbSNSH\nUF49\r\n=eoav\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBpfWj96KUM2mpIH0GtbMBtIy6Fn6RT4PumOMArLhxXkAiAiwdd8UHBjqU70SOQOVKg+xv1/bT3UBarplL1Suvod5A=="}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-c73a04d11b04bc3da93e8ffba343a1994e2d0cc7_1642087771948_0.6469646273765439"},"_hasShrinkwrap":false},"0.0.0-289b67e369f290d340ca106cf0d1121f59905b3d":{"name":"type-route","version":"0.0.0-289b67e369f290d340ca106cf0d1121f59905b3d","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"289b67e369f290d340ca106cf0d1121f59905b3d","_id":"type-route@0.0.0-289b67e369f290d340ca106cf0d1121f59905b3d","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-jOjxOPvC5VhUou0bgB8V++9GWtKQgVDTSU7Bj7/WaOts7j3dJ9AGUnoiPRgYpL3qXM61R/EwPn+mNMGGWyxxow==","shasum":"681e48d611b54ee2dbe27efee42a48c43cb951c0","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-289b67e369f290d340ca106cf0d1121f59905b3d.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5s3ICRA9TVsSAnZWagAAI1QP/1fwnlBpGy+g7pg4wc9z\nksGqXzzHpzhEpeCUHygtZLMYf4EzYuI1ZvE7nYK5MFm15KGsc5sRi2P2CLQ5\nmZaqmFbEXtctq+8778AzA9xg3SUNrOmOzNdr+Y9UkpRa0CajnY9YRnzdCEt6\nTJtet6eFrPJKty2vMN+cBI+X0gt1ZP2ytFQ6KfGxcx08tG30InjvK7rsG7sw\nkngvcd4+jKYodHs2g4enrJNG+VKgbcn8QHEj5DsYbL4tbV0nPYgFLTscjVAn\nJI5JkLqxS0/nBl5Kz7b6N3xpJxSenXRz8YB5Ek4oEHKHi85HJrVT7Riv7ra6\np33U4v8VrL4VIQbeUKxXCGp+oT+HqDGE2WuRerSttRuM8FRLdd9u3M772IPm\nYWWQrvPNKUGIEkXkk5xsFaC2ZcdhNWa66POBMV10v0iJaa2P3mJJc2UdF6qa\nn+bxdCF2ZYGb/kc0fuOKuvSoPZv3OvmZY0G2baBoIbh1QnwFKigBLGUox9pV\nfVHTUrYFQWh1cMDK9AOVBLNzgcqLgDxFah/+iWFJeeANTceZuMbaeohikjdx\nbemXNe0s4HUtJy+08tJ1JclADCZ0UlWGXkRlmRNw23BZdodkxAYSL5UrtLIU\n3wjFzL9cNY4O0//EhRkYblwwt976/oDTyRAkX7Eg+Da1JF1uU57eRbQSq9Zy\n51w+\r\n=ScSa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDi4uJvxLvALAihaU14U9kovt0f6NocULB6BdxPipfgcQIgJU830sDU/MCUz1bQh9uxykOuHGlI0yhWkNvbyt/R42s="}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-289b67e369f290d340ca106cf0d1121f59905b3d_1642515912198_0.6443861643443953"},"_hasShrinkwrap":false},"0.0.0-216baed8006f356729af4d05afc9a5baebf1ccd5":{"name":"type-route","version":"0.0.0-216baed8006f356729af4d05afc9a5baebf1ccd5","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"216baed8006f356729af4d05afc9a5baebf1ccd5","_id":"type-route@0.0.0-216baed8006f356729af4d05afc9a5baebf1ccd5","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-lxIFQV8mJC5Ty/t8bgxSylbNwqw4hJh6buUWCBhDEK/jD5OOVGRw94/HqZUbqpCc1DGw/aGTqKlqDCaODEDg6g==","shasum":"b037a0018b9e412c1adf83c5fed69f07cc246887","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-216baed8006f356729af4d05afc9a5baebf1ccd5.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5xwNCRA9TVsSAnZWagAAxFkP/jQk5yGt4eLL0Qe0Ln/5\nxos3yCS9nmXVGV8zZc91z15PsfqLQvH5jZmgnFkNkR46DPLAzeOh+fkUstfb\n6nJ7nOeJ6JBxwnS2/V/EQE7xtB/CnmzNsj4zaQvp73U6Y7U6pnLHdFxmEDlg\nz/yUnT2mFUe8zP1Ue/3I8k7maMSVpcyKYvD4946tWBn+QlOCIjn47WprysCv\nRcOd8UV5SHkrDbDogvW/lWKqIpbqYsahF0Z7aP3WikIwoGWT52fgUS4Dawzj\nDojOqVeKT7/dftskYBnWtr/J95fQQlArPvRj8qFOG0prDuHVXDUqxRBUO31E\nOoZjUYbdQCPnfvF5TUaxr4vukEpLoOyo7z0cPatdJ8BNwxTbyltMN8JHrC1n\n10S6Z3ikdHtQhC3PsBreVmN3BcGHo9H4OimaS87EZgHtvlRi3ahJSNXjZJUa\nQuPksmy3gjbvhpqaUNdnLdBSXqC2B0XzkynrmnmRTCYz+rnJX/T/6oK98IQv\ndWl1PbVc5ZsQ96Tni/UE7UijLuYfRD7IZTbHyicWaAjH0kUh2PZt4cFz5qRx\nr27/NN36XZ48Zhf2aLzv3Zs/wzv+G2TLb2DBrZaaCu5zcDPFycr4ioeJjvYG\najEkHwm9G+CpZbK277mwmUUA+3jHBOI9IljNGWmHugTTNsi8BNL22xKHdeXv\n2v7O\r\n=UuOW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCqOdjyb2JkzCHTmDCd5AonN3PxwuIrUnY+z0Lo6kaDxQIhAOVkllj9J5Z+wlGejwBl55L1HHJkQ7pOQbrclb8DUOsf"}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-216baed8006f356729af4d05afc9a5baebf1ccd5_1642535949553_0.8076025499940285"},"_hasShrinkwrap":false},"0.0.0-1d282a835512161767258ebb39fd1a3299c29ac7":{"name":"type-route","version":"0.0.0-1d282a835512161767258ebb39fd1a3299c29ac7","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"1d282a835512161767258ebb39fd1a3299c29ac7","_id":"type-route@0.0.0-1d282a835512161767258ebb39fd1a3299c29ac7","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-pIpxaNpErwYiloUklzJaaQPmvcIv/SsWgPnNFRteZ2ITSwy8IGG1ycxfYmUcFKdILXbV1Mv0pXzUwwTjEUODlQ==","shasum":"7f866578ae745a5aa7a27d4e4a86bdef1bdff008","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-1d282a835512161767258ebb39fd1a3299c29ac7.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiBs8/CRA9TVsSAnZWagAAGRMP/R843v01bvT47a/5Loza\nmwo1Ikw+7u3hMTbXc7Czr94Cl7lm+kGf6M5MXfAxTMRynRAvAwo7bRb7rBS6\nm+Ej0pkOPiqPfenc0f1YVu+sH4AjnzjZWxlm91B4GQsfTf4Pht3U8sdd/EpT\n7q/S87VmTrJHVl79xK4TAUSds1qMbZmAh0Fo4rVCAxXRHBvKBlLwrYRIjBW4\n53nDzO5WO4RULoexfCL1Ev32nX/+j7AB8JBitgCkzjGZBLa9go9M4F2pF+ES\ncG2DEhnl0PaJn+kzGV3vzrGeJBeC6ZgOASKhGW2GI8OzRulm2EHdWnPOKYz+\niwyKqKYrdw4sI+ojYKSCHmb7VV6xRmNRdciIZAPjEAGyst1ZrbENFbJxerFu\nfnhZz565qqCsrsKdGpRJkghLrOWWyabuAH0WauMTwX1lR7sv1Rko0qcY18HC\n7Yz1GMQTkwmk8qUv9qKVeBPiAc5C49knIgDlwwJgLcJHZSvknwbSysamzGab\nzlqgbb+a4x8/DaSKCTbx6dd82d1A4epdIrlmOiyMpKNFYVzyUC3fCQJTcGRx\n9sHedJUE/nP8JLCDPrNd2TmJhGj4DQFwl09i/dUHZAxwVUSEnZiJPYM617jW\nLLTHxHRpfMpuPA8Xz1L28LE42sjt1iqJdRJ80+XjeIi/6Gh3SnxieNzWKdh/\nCrwc\r\n=QMv7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQNFQXqlXiXO5ER3Cy+SKW6Xoyi3oBBGYbl9MSDseTEAIhAP8P6NdjuHlZPkomgT4ZFQA2kfgEqL4U/tmzZPjf6NQ4"}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-1d282a835512161767258ebb39fd1a3299c29ac7_1644613439435_0.7374828467061774"},"_hasShrinkwrap":false},"0.0.0-4180f7249a189c29f25214aa2c16e0369756920f":{"name":"type-route","version":"0.0.0-4180f7249a189c29f25214aa2c16e0369756920f","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"4180f7249a189c29f25214aa2c16e0369756920f","_id":"type-route@0.0.0-4180f7249a189c29f25214aa2c16e0369756920f","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-WUJssPPONEaGp7o6Kox3aVXxGyc1jnhdUyD32K4ZVZgIdhvA7vkqWTO9eZaKzv2jxj7CLzSKF9h9dVekjxEr2w==","shasum":"d2f32a94144e8b3c0be8087ffb510eee6f4f957a","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-4180f7249a189c29f25214aa2c16e0369756920f.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiBuV0CRA9TVsSAnZWagAAtNYP/13xn3cJ73HbkhU/+7fH\n2OcLjun/j+G5RIk3j1JhCpZrDuNVxDF/ofBv2xUkqfwhu8FV8DYUGPTdXQq5\nn5ufGZ0d5HUOLzeSJIqSnUKu1gJdFLhrPYCiPBgNflTNdtPvEkJIonFL88Bz\nrVJ9EQnHMLsYnfvquCwQhrZhAdrBKNHzGJb3P8YH5A3UaUGKsuniR9AdBxPQ\nkACVtDxp/+KDe8SJUgUv10NjpaGMEsa3WS8/dlorJDrDJIDxlZ1JHcNjDj/1\nHZwgrkCi8LEIEP4sxOskPbzoSXN6LqpLajzrmcQ46UGL2Y4uLYf/QhdD3cKa\nuSoS1jsO/PwmmXBEMglKrBI4Q7ceCmlT5z7LJoz5mEKTeoINpgYeJGL7kqom\nrPGOpgRHZDIqzD2lhpLLihuk4eiENUdDVT7da1GVQETb6dfvYBJYunWoaR1J\nPcrcrFaw+E9DHex17j6+W+c6npMX3izxzDYxusczApldGc76upY8CbizmUIj\n89+a++r7ubs3G8iOEq6nL6G4morOjhDnNIwog6GyhBUtewhUGtN71jD/JEoP\nT//UWVS5zHxCYXpgAZ1An8TuD0reztrsPpkYLaKgIIskLtlWuWEdHpBI0T3/\nJQAMn2zsbOYLR+yA9Rdg38aBgeMTpekz5CyB7v88Hp/ozTARk4WXVm0FQhqc\nMlYM\r\n=60wB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCukgLgxf+obVqu+UXgQKcHPX3nKDpJsU5zJU8hihdqPAIhAO/ioI8wbPTgpOaq+YP5b8V3kCRGfqaPzCznXmi82hle"}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-4180f7249a189c29f25214aa2c16e0369756920f_1644619124041_0.8841977467821918"},"_hasShrinkwrap":false},"0.0.0-59eb72cb5e0293bb4d21a6e942d7f8c7a94da7d8":{"name":"type-route","version":"0.0.0-59eb72cb5e0293bb4d21a6e942d7f8c7a94da7d8","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"59eb72cb5e0293bb4d21a6e942d7f8c7a94da7d8","_id":"type-route@0.0.0-59eb72cb5e0293bb4d21a6e942d7f8c7a94da7d8","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-40YXrf2/RHdFQaUlxrrUJn2+jCDxMgc9Ao5v8p6oPH2r2DYDV4v8evTkQ8fTa4TbbjisEgpfuOTj3PPVQTIlgw==","shasum":"4c44ca1d55ab7dc1bfbe4b4552a949a578ae3a3c","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-59eb72cb5e0293bb4d21a6e942d7f8c7a94da7d8.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiBuWdCRA9TVsSAnZWagAAltMP/j/RNAVg19KgEp0Hr9Tk\n0yGsTvuB/Glf0EkBa6Smy93d09+bxPFjg6beLHvJgy2grMbqKo+y7RlseQEV\nfOwfhLo1OnGxWVabgo/2S1GzEtSPoEbDmY5XpELIIu0J3ebVpJ+w7pOCfKs1\n0nqrof1IMMbTfrzDBS9IeQ8E8V0CwUUOdaF14GrJu/ano+3BlyS081OeYvBN\ncZY3c7lk5P/Z89M4XvlI+a1tNxaxpqAdZL/vq3rM2akWY3Z4poTEZYnUN8sh\nNTU2UANQrxpCEx6Vohc9apjVC0FdVNs/no3EDEO6ppH4HHcqwNuAcZS9Jlhj\nznFq1bgbixsX5yW4iMX3DbK+vZr/Fdnmf3pFq+uewii3ssbMGgS/K8d8SOg2\nBRhuLlZ3mycXNiSFAfs/vYtVbDHfLziCl53muGRchBxH7rjHpRHqHgy725rb\nOqV2BZCOQzBT3br/yFQOhTzskvv5akhu5NNW9gSvi0aqLGJ8Xls3TJ6WK9k9\nR/W6oneeoee3fkrAtf2PI8thOxDrX3FTPPWGyevaSPunyh69/rFF2mKkRn0h\nnNFvg0QQ9MoZCxxgA9l354S9MY5PCLvPXxUgK11A80aRM+HlojodU+qMamfs\nkK4xj4Kwh9TbPfCFUawq8/5Iff0xWOveUK6sXpfJuNT+8uQK/uRKfuVT96Gk\nBUgD\r\n=R4yL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCmblZaHieIN3l3Ns6kvu8vgstXIApuRD4du06Z/vKfnQIhAIlwFRg09pmrGVwNUNWSXOtBGoTusgWa1uOHRXbkQ9jP"}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-59eb72cb5e0293bb4d21a6e942d7f8c7a94da7d8_1644619165571_0.04676737698578526"},"_hasShrinkwrap":false},"0.0.0-e15e17f91099fe40b6520e395c13b12a256e9f6b":{"name":"type-route","version":"0.0.0-e15e17f91099fe40b6520e395c13b12a256e9f6b","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"e15e17f91099fe40b6520e395c13b12a256e9f6b","_id":"type-route@0.0.0-e15e17f91099fe40b6520e395c13b12a256e9f6b","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-b/AiXMIiI93oaBFd4oeQR7sxXYDfv5XxTc5DLKMijKgsdLZJjPifJ1sxbWcpGW52mnvPzPA5S+OO0OokJHDBKA==","shasum":"04f233efa782e8d719547a57b656aff601c0c275","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-e15e17f91099fe40b6520e395c13b12a256e9f6b.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiBuWqCRA9TVsSAnZWagAA7PQP/igwZmRIuqNJD0apyJuQ\nNjkI9R3++zVytnzuV+RLsdKPhqsLU+FIZGHyBw4sDQheKWQg9sqpJmTdZ2PY\nUrZlJAna+mS6reWgiLPW4lhUb63z22xrg9RwFtdlJjPxh2FqD3rOaTeL5eZZ\nim+Rr/PhDeMixnWJL5oaWE2vuTaWCuH38giI0GJl1J1dtKD5wuaptYf3SqXJ\n7JitYBB/mPZ9WpH/C4i+HXyTpqmwrcYgHEzzcf5i5/uEh+cH2NY86uURP43k\nDsPvOk4hRR6lJsfR1Unpb1XUzMLG50p92wLU611pbGNlntx/6rvO7MdtcJIp\nrywDDRQFhe065A2rtZImGkXCMHKZaYo55XuS0SGPBZne0KmhpskWmzp7Ctab\nOVqTqDseiaHRTG3oMaTMZINdJ+OXaXaprq9OsZNINFASyVP8R5sFyeRnrtLh\ncmTolwNdZE5WJ//1YEy2/juq/pHQV6GGrUkNpR0T9NoW+ycNFba7/BUHPs8k\nPj+rTkhEri/dUe7qfk3qWnZ3JaypAimFosFZhYGiVd+VwtIy3DPCG9X/N5t3\niFPSh9poHcIje5mmqDZDqPsMmDzk2chNCjLIlzM3DTXAvvN1syDDDPn0adph\nkXubPzY38fAnQtQsGIW1kAkvXeB4mo5la9KQ0L7Xv0QjjuebqOMpQboFKiwc\nkhp5\r\n=oAO4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCNYQK/r3w0/B6z5YYCF/jUZwBTfVFghpewe03kyfxrvQIhAPHXTPRVAeRIimQfrOcvnXfkbunW1DtMW0gl2CEAM5Vw"}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-e15e17f91099fe40b6520e395c13b12a256e9f6b_1644619178362_0.6470417528999661"},"_hasShrinkwrap":false},"0.0.0-e9c5c4ef07563a2d59a72576722de23eba36effd":{"name":"type-route","version":"0.0.0-e9c5c4ef07563a2d59a72576722de23eba36effd","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"e9c5c4ef07563a2d59a72576722de23eba36effd","_id":"type-route@0.0.0-e9c5c4ef07563a2d59a72576722de23eba36effd","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-7m7BN9etvFzObrMN6QXHBsrYrS4CP/2fpWJI3ekMPy3ZDoWYpscQaWoQRMSTNtmTCkm7hGoHXK2LAYxHfcIwwQ==","shasum":"9cf7d5e497e0c61d0aab9ebcbd4a8621c1a5e091","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-e9c5c4ef07563a2d59a72576722de23eba36effd.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiBuW6CRA9TVsSAnZWagAA5OgP/1jWL4CbDexk5PKmj63L\n6fuvuVvc+oPQvTtMlGrNEm83XRuYbpp5eOHEPZ73+/YXTuIgKly9TtI+2RpH\ng1Pu14qYXTigihqf87wfhnRGx1vKtkm4vGcWDIZVLNEnmH2r/3qsWuLJrGF7\nMsZvmWxawLZ42Lk7YlZtAMkI+LFAqmq+VYm7KSi4ebJufgHXy2tcSFaFYfQA\ngHX0Vq0VfxGMs+O+DB0mAUmjxGzRxKBuJSqoK7rgvd8u92jinNNZD6Qbd3CB\nfkfD6JyvYM1O9Mxzfi3y9m8Dq69ZE1Cp4rIUSVLefB5D0wQt6zMVhRtsvsFQ\nrsDb/YBbNFMdin0r7weUjmHxz7amc9Ikb8rZj0qRGTLJM5Nf6IMY35b1PHOD\n9/Zvhlkr0OxKYnj7hHkHo1evru/ni63EFSOZOkklA4nJ1BLKTvKqN1s2h7+P\nh1Doe/aTHeE7aWXAtaBNqgA6YL8kGtLX+7g5fNtNhSb5G3JAjFOUZ7VXar3D\nzRfip30UrM8qg9V3mn4wbG2R3IJgFmQ+vU+3Q/l9MXY1bL8EYnDuCGXAHWLP\nbRad+j9NvCXWFlOgs8rH4nkmexMU6LUktVYMf3q79j8eksfI9OIEZcg9QMrD\n6WmBCau2Dm7iwBbWMCbafmFGV4mdkKGPnkbEIIKeXkzD16pocoLamoZNWJEn\ncNJI\r\n=xAsL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDLHSEihEwMvhTH+4RuWjXC9pM5IwBG8Wj7zr+7fEtFqQIgHGB/DQL/vb/1xuGW/ZIPf/4QFDxxs/r3hEE0NdYliF0="}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-e9c5c4ef07563a2d59a72576722de23eba36effd_1644619194665_0.45293069531371355"},"_hasShrinkwrap":false},"0.0.0-dcd062debfa27e984db3da96a5ec3f539fee8e7c":{"name":"type-route","version":"0.0.0-dcd062debfa27e984db3da96a5ec3f539fee8e7c","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"dcd062debfa27e984db3da96a5ec3f539fee8e7c","_id":"type-route@0.0.0-dcd062debfa27e984db3da96a5ec3f539fee8e7c","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-hAIC08naM9EtKqmL1N/aD2L2rUeGs8G3NgB1Q/WKEsagtBvl6/sp//JjmL8BZCmU97yyqrVPesuOXyEAREKWng==","shasum":"9cf04efadf3a8c4ce433e57297d6f742eabdb57d","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-dcd062debfa27e984db3da96a5ec3f539fee8e7c.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiBuYrCRA9TVsSAnZWagAA33kP/RXFZsjYUa+NfHTJiW68\ns+VqeW9PzuQGXqvwhmlJIPnEUBdVlpOWQ34BuZPaNbInehrWlS8Dhad5z3qD\n9bzwRISl0l+Eau6MUWyndxdoZgRzpbtdZuxfR+HZKL5svffyyOzBRbWUo997\nQiVolKdSS1lsOJQuPz2eGTRlD6BBPTElMKgjwlI8EwVCzUMJYNcq5sbz2nAC\nxtmVzSnoy5JqFndDAv4RlLvNUYhfUSvE8b+ewf9Pk6Ndh4Z+5+GUgjJ0prYt\nKm8ygA/34n+S0CvPKJVZwR3TSb2vc2FIb74wSH2cU+eYDVLAJgf7rVhI4F66\nU7xBPmsLnggwWodQ248yyP3Xu4qvekse3DSL9PUJPdoBOyvBSZGVSxlICwmz\nUphLh2ylKEvQ64OA7mBHkXNFUtggkKwalu1xo7+jLDqD0/nA8l1I0lkUQwnK\nxgAheHXSAGp1WEiPJ7db6QJ9/7Z1u32xUh3dtcKcCB040xKn2FxQT/pUCom6\nYllrf+Nniu9HS4B1BC1B1Ful8Vxv7kJmfvikdjg3gIW4hibF3NDO/SGgEPV3\n8cCF4it3rmNaf45EFBTlvRDqTcpUMYWRlBxK+33ekIJ2+Q68fa3LUUQr2f0v\nF2W9Rze9TX7d6pg41TO10FtFjxZpayxiZ54o3+vdUpGjFYnwD4FEO/7sl63W\nzjO3\r\n=i05v\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID+cnkzx/njPdiV+IJ8W1sPhVXgraDPJTgfxrTKohxzkAiBxnyc1XH+zXLPCSR43Ls6HP5LTSSlWPHhTDo6m5JJY0g=="}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-dcd062debfa27e984db3da96a5ec3f539fee8e7c_1644619306979_0.21068565103394277"},"_hasShrinkwrap":false},"0.0.0-6dbff25dc7d330b1e6c1bf5814b5f5e11c7ef3f8":{"name":"type-route","version":"0.0.0-6dbff25dc7d330b1e6c1bf5814b5f5e11c7ef3f8","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"6dbff25dc7d330b1e6c1bf5814b5f5e11c7ef3f8","_id":"type-route@0.0.0-6dbff25dc7d330b1e6c1bf5814b5f5e11c7ef3f8","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-O8q+1XHUFGifoGYzhvg5DzY3ABDqidfbxH8KhOz6+QyQXAVz/fZXo4hTIekGnqtWGNuOCHlNFHqAJL+RFOyUrg==","shasum":"fad088c37e5133ffc82e81c3674e5642f9ec8d06","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-6dbff25dc7d330b1e6c1bf5814b5f5e11c7ef3f8.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiBuZACRA9TVsSAnZWagAAcPsP/3I/GfBK9+LR9YRur+2Y\nqauNym+3U9gTmAqwG8bYlY69xHivmBdDZABEmisSVDsH6UE7UqHS3rsT6scw\ng//tXZZ32NKC4ih33bAC0cQF7g3HYkIDHVhUustQ8AOab8Vk5NupOkV62C8H\nOi0C6ApHlE55sWF3FyeB+62UmfCVZ3UIQx14vwqiqpoZuGWVevv+aBEtGPp3\nfpcM9NFrrpjUwz9KXye/P4LcsojaKv9MBYvO+aLkvX1YE468xK+6tn95ztgG\nJZ9PhZ4IoW9oFKn0PUSPbbL4pr0EQKCRw11aQr2ML8SeaCFqw0xk7oTuIO5K\nRKbc++afK2rZCNN1EGDCjL86a4Jx1CCDsyGtN5tkptSYdpTDhlmaofaALfEt\nTiBcE4tibxFZLvXoqj82VATIrphPlbd5G//g16nRtbSjwlmBEN152Kv5gzYb\nYyrqjl7BU8C1wXJIdYlnkVCLDYhwHtS3Z1wVSMIzHt6pfm5w/wkdJXPAstNj\nH6Tx8fZik1fokdEWS6zh03+nzxVfvVpYQ7Zkg64G3jiOow81N5KrYvSmVC/W\nMBP8LRBqRcnHf4/9PB0ggAYDZMjNS1nPUTXNRWhtazv7SNLJdc/Mcw2Nxsvn\nJfo+F5xHTHxJYwvDLkO7wYqfOKxOtEX7NyeApyfbprJuBHCkBnTNBJA624DO\ncfnZ\r\n=FK/I\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHoTeK4qp6PULBtQBTJg3RhZ2QW4r/TCrUGavsRCFYJIAiBslA3k6HWLjPPcE67Cj9X/iP7SkkVXMiA7M3fl1blX4A=="}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-6dbff25dc7d330b1e6c1bf5814b5f5e11c7ef3f8_1644619327782_0.27139902050296283"},"_hasShrinkwrap":false},"0.0.0-230990378b104c94df485472ed56d3bf421b1090":{"name":"type-route","version":"0.0.0-230990378b104c94df485472ed56d3bf421b1090","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"230990378b104c94df485472ed56d3bf421b1090","_id":"type-route@0.0.0-230990378b104c94df485472ed56d3bf421b1090","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-N2iE2T28C54dd9XQxMdOxydp570K1WNquAMIlLeYYaY3J8fZw7Yu1m9nYsp6I0Obh4aiXEGJ1fQseVeEyBSRCw==","shasum":"801f7d18892bb6b867635a84073a689a89c3bbe3","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-230990378b104c94df485472ed56d3bf421b1090.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiBufOCRA9TVsSAnZWagAAiVMQAIiX85yAkID1LxqohS5G\nLWwbUG/3BIEmezAWsFBnQaaN+3k2aEVBn2OHaNYl1xNmM+cuuA5rsS2/EDUy\nBaoDZizFUUDnWm3HDYJ46EAQLj2/XhULtJZJp4cjW7otYsBBh+uKC03x5g2m\nqXEOU3YYEb+agA3nS2sEdXiWC7WKqaGl+hxkk9UPTeaeHg7CNsa84D/P1K5F\n3VUxkTXHFNUNryX4AcYCjbNrjY7YHkWoUaH1MFG+wYgJMtVXvru7IiCGP6lT\n5FeB9/fSHSTVDW2Lp3/K5SARKGSvb0xSU0xiUuAsJiElDUO6tP/Fkvt+hPoI\nFmgiEpLp1l7mZXqFqQsuWTwkQC9AUPPZC0QmN/1/84j+d1Wz3+dNMiymqQ9i\nT99CdySHEvMzTK0jpmVOZkEO5zNZWEG2xfC5FpI+Fukbz8WSobWe2/Nt+Oyc\ncaQjuFUKHTHev7oDuYs+fQRG6IOj6TJOVTvIfk8Ewi1Jixnn6po35U17n24I\nEe2b6dSusJNvPLMgWZvaMPvXLtazd3Z8o5XlVUnp4zuTFNPvNcTbCq8fdSt8\nYxu9Fy8by7fHIf3a7152nbZiq7/V0KSmxZDDuSgaopOpx4kSTxTRX2DZorit\nJnCENt7vNy4Zmuq3/t0zBOfYvav5pbBNWiK4HZP2+PTBYQZBoVYN7HIUT/so\nH7IZ\r\n=DLjy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBttfx6o5kORu+WD7dylJaiVMtS3/vH8RnSJvZE6kwNTAiA/JQ/wfzOhQGmxfQtdBuFsxSyQ8RY4qTAXOO43qEyuFw=="}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-230990378b104c94df485472ed56d3bf421b1090_1644619725585_0.8904346170973978"},"_hasShrinkwrap":false},"0.0.0-26f7d56f6e6fc8d5b119181d17d3345f379a71a2":{"name":"type-route","version":"0.0.0-26f7d56f6e6fc8d5b119181d17d3345f379a71a2","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"26f7d56f6e6fc8d5b119181d17d3345f379a71a2","_id":"type-route@0.0.0-26f7d56f6e6fc8d5b119181d17d3345f379a71a2","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-xe0vK3pv2bxBgx337omrl1E3rPlO6R813vnT5d5+4TVtw+EZ2w++4bhHZRcMZzrg2O9jErO1GYJJW1C5BBqvdQ==","shasum":"28228d63bf84f97d7e61deea1ede2cc1e34187a8","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-26f7d56f6e6fc8d5b119181d17d3345f379a71a2.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiDxu/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpZuA//WtaHNDLA8we4LcPG/gmnQyqtf3UFnfpF59qcyrt5GqV5iFLW\r\nfUTOKgO1BqqZNKDL42sPiABg/rHmHGh9bJrYD1nCPgAzNMMUNtr2LIEyt2G1\r\njQlSqxDPUne8/10kAogLFgFufCpkAAL6T2vMt0ikjsj8+umA6xnS2IkKUdDG\r\n7HD2d6LU0ReIV3Q60NZ6evrYsSWa6C8hC+OHckSveSx6ycvYroLYFL6N9jnj\r\nezplMeRNcsOCCBDidni/z27KW31RrT72/hBKbG0m3ZND093WAzpbnbWy+Vnp\r\nG/9YImg/fb2q6UR4Gx5MH+SEb6aqGweJfeSRvm78OMMLrjSJCuBVlb8Sb9Zv\r\n+vbZ4vYOtOw17elgL+frJ47smA8vkZXfdR8oqB7Phu8VCh2v6fKYiY6+AlLD\r\nrOEoD2Sm9nGMUqq9iu8KjK4RXzyFFH9/EhKPyQ0HalTHaI/qcI4PEiBGCKvF\r\n8XDR66cKJ2LSqG88WNoqJjWl1oaA6dD7wmZn6DY2lSO9RV7+UnfZyvL8YFJI\r\nlxwm7OtqlZob/a5LGQTolWEhStEDLg7hWtnEadl1YilQFebhz265QSY6sAEL\r\nUv8N5oclii7HYzETbQ4y76iOELaMgMSjlOFkcj+UQisXVTJPwMg6bMspmx/D\r\nqvRWtrZmsJIj/Y8uopro3YgHg+cTZ5h/UOk=\r\n=F5yN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQClPkVekXaBXIL4kO0lAeBiBuLRhECHAkG+Tj7/v2Ez6wIgb7xvo0wybpt/sUG+X+FVeKT1pSrCJfdok5D3sZmwZ2E="}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-26f7d56f6e6fc8d5b119181d17d3345f379a71a2_1645157311686_0.3068779907413264"},"_hasShrinkwrap":false},"0.0.0-168ddf92335d0cebda10b8af98598fa6678d7bca":{"name":"type-route","version":"0.0.0-168ddf92335d0cebda10b8af98598fa6678d7bca","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"168ddf92335d0cebda10b8af98598fa6678d7bca","_id":"type-route@0.0.0-168ddf92335d0cebda10b8af98598fa6678d7bca","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-tFq+ddXDf5KpcPe1Lzxz/zvpSovTue8m5U6EdE5W/23f3wI6/McSIebb/Nc3OsosrBVvtdbV/TdvxPrq0l9SEg==","shasum":"70b795d28098699939a61b7cc3e4752a33ae354f","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-168ddf92335d0cebda10b8af98598fa6678d7bca.tgz","fileCount":54,"unpackedSize":1190972,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiHN+5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo5pA//ROSEqZ8A8rCC4v+/MtLkii5SukgV69D1pERFwbcmAMIiXAR+\r\nURHUiFTWdXu5w+sHRLnnMleINWw9ciQdwn6S4oBfogBhC1NeqScdi8kD462r\r\ncgLgYDalEihb9S4uoMTqNzqjKQ3UnHB9KkBkwpTEZvUNSIbZ+e99Yi25U3Ac\r\nJ20G0QtrmUIT/ucXGT0ePwKNuQf5WaPVRjKx7tqIeYfMRpMgcK7s2FGr2ZbB\r\nPzEo3TOgj+HVWvFpgnZFohDFaVekJR58RJFnUB1gosak+6GUDnU4otZ17bJf\r\nbkrMELYldHFnII0yDUn907tKd8YyLQ8xlfczu8gcZoBXG9G67JX1MNKGNz92\r\nLTgx6dqHRcdY3wP6G6TWFjjn7IqXJY8glPqjpeasN0W+RwoLjqPJVDFQ0acN\r\njXeHo2u3u0hhDbhUhYUVeA/wwPs3F6UwLzYOebse6Exi1RaNRHafaRB/RUzB\r\n2Ohda/9+hP2dme1DWaEG78FY9N9E12wseH+pVNLJ/0ffZXIAsIBpgTnCgHKW\r\nFbgRPe/q/257QhIocw+90eFRroBgq5pwxBer7iNqoORn+qRNk7SE6NT9S4Se\r\nd/R+fkd4D7IGp+vwUWMrnAym98NjmQiunLLLUIsWaZx6k8U0Ar3crkJs7wzg\r\ngefU/G7ACuxCKLU5weZ3jPysagL+9ZxZzZo=\r\n=WwYc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFmNnE8ysPD6Vhq0A/JUvUAQcWQ1QSi/iK1rPzKwHJnOAiEAplCabq7xeVhcwVw3J7rb1kM6i9CjP0ANZtqt67vmSpY="}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-168ddf92335d0cebda10b8af98598fa6678d7bca_1646059449554_0.9497381720287186"},"_hasShrinkwrap":false},"0.0.0-0edf6c7cf553ca809fa2aaf42ca0b44bfb82e8b8":{"name":"type-route","version":"0.0.0-0edf6c7cf553ca809fa2aaf42ca0b44bfb82e8b8","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^27.4.1","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3"},"dependencies":{"history":"^5.3.0"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"0edf6c7cf553ca809fa2aaf42ca0b44bfb82e8b8","_id":"type-route@0.0.0-0edf6c7cf553ca809fa2aaf42ca0b44bfb82e8b8","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-pJSOu+27P+b2qpNvIGag3KWk4j/SmZB7T8hpFmTJ7WJmKY720435PCWmsPzjTBHxUDBjTuJ6BFQEkXnSwRthvg==","shasum":"5f0540ec90b0aa04a237b9adb8779aea6775bb12","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-0edf6c7cf553ca809fa2aaf42ca0b44bfb82e8b8.tgz","fileCount":54,"unpackedSize":1185611,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCPjRYEUKTjxyng16mN4AwTh5kfM3MLbc6fex+Urf5wmgIgc91mqlloFyehiZHlrMYMjLhcwrkopQnT6kNlJYUF5LE="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRl/IACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqo8A/+JL6Xry/8kAMqfYTAfW1iNJp0pHWSqUkisBawJ4URnHjfJvWC\r\nI0RzNkqQ9spCS4Yo8aJ8eZxfaW8bSo/dxHOPkTrcdktc81u9dKJS92BNGDtV\r\n2O5ogfVEJ9X19nob1GdjWYRHxdPhUs8dNBk/UNQPRv+/cSizrpMHKrBVb2No\r\nSdjh6LQx1TMA+1GJgSk3hFu2OvTmz4V4XzF5x4Sy1iLiXWYHOSzWAiMwYT90\r\npeZJImQP/Km+GxxuE+ijHCfdu7RvP+aF3jdoX4i8DBX54gEfNjxk6C4Faujb\r\nd7y8LYt200rHeoT9D8LFWpEjMJXbdqrmWp0v6dGTh1//qlszuBSj5zYvehNl\r\nftR9xy0+RcpBrXW5sZm4gsIpWIcHqmSge+s6Iv0nyAJl1fS9NCwreQpg0q8/\r\n0vttFZyj4CYPZQdewLAXvI64Zozl52SY2+ZLpLtMsZ22NRNFsS5oK6+NbWtz\r\njHj3ug3kjVrEhm8X5ORUn+viEK6jjBwRQ/wM2/8L+NpcoBCd5MmKfTw+P9o4\r\nqcRbmRsuF2V0oLbSkSEeeGa3eZ+nEBGWGYzZE2Gr1cYDfhJJfuU0UxeZu10w\r\n1/yVziMg+0c7x93L2bDdqRljjpK8Qh9I6OCEhXOxiPtHBiaGSEMuDHtpPoLR\r\nZ/Gz+WJqUw7kOwhmvT0tIDn6YKGngQu5pww=\r\n=PVQb\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-0edf6c7cf553ca809fa2aaf42ca0b44bfb82e8b8_1648779208395_0.847753159071676"},"_hasShrinkwrap":false},"0.0.0-acc26f11821c62d7eeebd8516c0ebc3d1e3b5c29":{"name":"type-route","version":"0.0.0-acc26f11821c62d7eeebd8516c0ebc3d1e3b5c29","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","dependencies":{"history":"^5.0.0"},"authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel ./src/playground.html --out-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^25.2.1","@types/react":"16.8.8","@types/react-dom":"16.8.2","parcel-bundler":"^1.12.4","prettier":"^2.0.5","react":"^16.8.4","react-dom":"^16.8.4","rollup":"^2.8.2","rollup-plugin-dts":"^1.4.1","ts-toolbelt":"^6.3.11","tsdx":"^0.13.2","tslib":"^2.0.0","typescript":"^3.9.5"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"acc26f11821c62d7eeebd8516c0ebc3d1e3b5c29","_id":"type-route@0.0.0-acc26f11821c62d7eeebd8516c0ebc3d1e3b5c29","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-zAQZfIDuycSoH3T7TQlSx+mv2hxGr+LhTDZsamKy7zK5cwldXBidRd/HRPPtA/Dbeu2uOq8frFiHcUkuo4j3lQ==","shasum":"32e25aa1ecda957fbe2506d807b3fe9a254234e0","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-acc26f11821c62d7eeebd8516c0ebc3d1e3b5c29.tgz","fileCount":54,"unpackedSize":1190972,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG8zRMb3Ks+UX31sQTed6JYsk2PtBUjr8N1YnGh+7rI3AiBrnGrAMJxEC5AfFdGlg+P1x6UJr+sYuoKifYzh9euXnw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRl/MACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp5dA//aO+z0ZwsHDYBTap6HKocac3m2a+9VsK8d/eDX1Ab7HWnWOia\r\n9cMIB92bICmzNAqjlw9806ysb7OggefyF3IDWNqsqvu9WIbs1GjyC0voPtCr\r\nWx5kRsI7AlOyYPN3ErMEcM1oDBb+/x65sovZUvAUCvIBYZu779ZZcVNeeU01\r\nCr6rP/m5k+5Z/ob8tl7pjPLksEaUKTjTs4NnSaouaQycj14HN8dumD887E4Z\r\nHsnzIHYEhOMD9M+GA4e265sM+QCr5V7i+Dsywr4KJrz0l9vjJcfW9A8nKYUW\r\nizos4p5IORrpJqyhH52djkDDOhk05haLVz0zbLz7cMGM5BxgBw47mwWk8VdN\r\nC9+PQY3ND9sVQvHpjgDj7G/r55yDZeUzyTMHIgXK3W0urYXoHrO6Ktl1QI90\r\nmDXNECiN2nRR22qumnH3z6E6HCEUHbDRcaRrpaE309fSH7cSMDoZu+5CkgvJ\r\ntU8MfJ8alruuM2CAm0Iav9rObz3IBNX6k8prSz7NXeMDWUBy+sEcXZXoU/9f\r\nyzZH8np+vovoDQ7I8DN77fX6QnajsmJ1S6uDjraHc6+xl6iXyPrhKsWjy3sN\r\nDJWRxaKcxoOyNBs7mvievCMh7FKvLTm/r6uqn06fZjaBlAtC4Bbgmh4A5Vov\r\n9FrlrDeybPIriFkSAkyi8vjJZkI8iw6hLL4=\r\n=zruT\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-acc26f11821c62d7eeebd8516c0ebc3d1e3b5c29_1648779212322_0.18069455183995098"},"_hasShrinkwrap":false},"0.0.0-00bc9a83f886fbc32cf48bd2e91ad439589d9b64":{"name":"type-route","version":"0.0.0-00bc9a83f886fbc32cf48bd2e91ad439589d9b64","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^27.4.1","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3"},"dependencies":{"history":"^5.3.0"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"00bc9a83f886fbc32cf48bd2e91ad439589d9b64","_id":"type-route@0.0.0-00bc9a83f886fbc32cf48bd2e91ad439589d9b64","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-RSGhtZKLH9xkUHHjW8dt8RouQ09sef6HRhEmSwdjwaJMlD0TukRqsUonii0tt6Oqn2XjRM5XGtqaHQP/mJ5cBw==","shasum":"4de7533639ab26581674bc8777a7c86e25b4c79e","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-00bc9a83f886fbc32cf48bd2e91ad439589d9b64.tgz","fileCount":54,"unpackedSize":1185611,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDqn0rGFqEYZ5Jalqu4GJN6K3eyJ59MwyWMhaniRcTzfgIgfuOajG/S9By92Sy82Zjis8bVoQuCVH/3GSauqANMZBE="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRmZOACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoIZw/+I+4kbLFIHHoa4MRCRiNP3iCiQrNnJvs6HQgHlUlDDIR6RQdF\r\nKfnmy4E3dnQy2BQ7s7q/Cpe1/8UK5Xq+EUqNS2dUJfrA8Ne721MJwrJjr4Px\r\nb/zLMzm2yV7Vf4XXhEIEZRzmlN2tjqKUNArw0WxOOQ37wArzH066H3PUl85d\r\nSzmox3vxIENLYQO+NMXb13uLHjAqgDSGK1xDsC1PbZ3TNaOjNV5bp38LepMc\r\n4yD9m5kl+9tfqwR0+aG1wtf6OM8zJmGOqD9lB8ZerDykq676u+vsx0K85mBD\r\n4fMMUuIu/HVeUJe/KJUV8op+wvnL/g+TihmQOFJYb/Yo+wHSGqVZStywEZCY\r\nINtNTo+2dzD5Qqi403/aQvTANfG5GqYRrnAFicTdvSrJ8KQ3x0YcQ7tSRTFF\r\nMcgIrWJs/MTufUoj1eS6xCM7QRnmKf8e4bMu7ErQ9tpDvfiunQxXsqCjEy/h\r\n4n9+E9g5oUf9BheMjeeprnTm4qQbR6VQlrijMSiXrSAmNvk6ESiCzfIImFzY\r\nmqWeI1wnYCTRhJOBGm11U14XehTAsaFmbMNfsGq6uQ4XwetMGEKNrK7Ik1JX\r\nWuXiCwFVllhbpRjjOVyVzxAttYW7oTTv0Zaf6X22nbAvaPF0I8TxBu4bVQDw\r\nnByIAkxDoyvU3TQNpCYgkxY78dM3BRuixGs=\r\n=bdpe\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-00bc9a83f886fbc32cf48bd2e91ad439589d9b64_1648780878331_0.252725905521509"},"_hasShrinkwrap":false},"0.0.0-106099d93ff026eff4915f4a58eadee1c35366a6":{"name":"type-route","version":"0.0.0-106099d93ff026eff4915f4a58eadee1c35366a6","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^27.4.1","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3"},"dependencies":{"history":"^5.3.0"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"106099d93ff026eff4915f4a58eadee1c35366a6","_id":"type-route@0.0.0-106099d93ff026eff4915f4a58eadee1c35366a6","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-Vv7U0EXH4T8hBpQb6YsZid8Uj6Z1xPl8upRktUVQdXMTFxgJ6QmO7r6F0xw2Vf0FEa78KJJyQW83s+NBqpwexQ==","shasum":"d9001d69edc149ddada7d750ab6d4f5303c421e0","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-106099d93ff026eff4915f4a58eadee1c35366a6.tgz","fileCount":54,"unpackedSize":1185611,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCqedIAW8+H9ANvkFhHSuY8AUiuUP7hCJqtxsYJAjfcRAIhAK7yZC6IRoT1qs/OtDFxOcSrmJe2oMn+cmvMHsMyipJT"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRmckACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq1ShAAkg3fi7VVKszU2bOULwUqvV3ztk7MhrPYRBqnqXrQ9Yp+szTX\r\nNguW4xm++GTEl5ldV40s+Qeh/mM/t1XlYk2E9xZDvn7DiAhOFhpL1nEQ3Gz1\r\no4ztEX4gi+4MsSODIpyE6OmF8wOC3lguaczY3WQCjclJzFWh0YICEj0a8fHo\r\nMmbqFX8LqfSi46lc9LKKR97JpsU75TGAIgzyNyAlV3lQ6/LX1dBGWESDVdE7\r\nauZC2z0dhSjp1GegBrW/Hyas0tF97sovuqwfO6x5kY0TB0Edidax5cp+ish5\r\nWPGK21+hZvnuxUwHsx85rM2m1s+ZHiPHekjkhIsvcT26j8rb7aFT+/cAAN9L\r\noYb8wzWwZvhzDGsG3FmZGdS8OcxuVjPppNOhZbUBuy0p+gu/Uhl8mXBsq0CG\r\nVZ2uHu6tGN7EkuPGswzUjnTlSXgRqO2UDg82VauL3UuBXNuqOOuVzNiXssU8\r\nQeHOafR/cLdxRhB+uMHzFQpFPQcio66iYIEVkzxXpcACA2XfNcMwF4Msk/a+\r\nhEI4JpgHZfkwlUbj6TJqXh8ny7kdlp3Ug5GOHkoEGspSSSnp8snDvXOMDetr\r\nNOLZ7qGceitJZlkE06kNPDv3yqCwmUN/o7iEOGiIoLNks+gccY7YXR8ClEbS\r\nm5xNuiIa2Et/WQSCNOaEY8nxeITiPnoh3KU=\r\n=pE9F\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-106099d93ff026eff4915f4a58eadee1c35366a6_1648781092279_0.5542467933113591"},"_hasShrinkwrap":false},"0.0.0-141f968ed747df82bc52661e88883d111c62d21f":{"name":"type-route","version":"0.0.0-141f968ed747df82bc52661e88883d111c62d21f","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^27.4.1","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3"},"dependencies":{"history":"^5.3.0"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n\n<br/>\n<br/>\n<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org\">\n    <img src=\"https://typehero.org/type-route/img/type-hero-logo.svg\" width=\"225\" alt=\"Type Hero\"/>\n  </a>\n</p>\n<p align=\"center\">\nType Route is a <a href=\"https://typehero.org\">Type Hero</a> project.\n</p>\n<br/>\n<br/>\n","readmeFilename":"README.md","gitHead":"141f968ed747df82bc52661e88883d111c62d21f","_id":"type-route@0.0.0-141f968ed747df82bc52661e88883d111c62d21f","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-UJqWSo5zX088nmIxNGgA3SMnuVGt6ypQxcb5Rus99AQKyOKXgFp1saoUw1M8je5lI6ePocrFPFGPw97gDbHQFA==","shasum":"e289324b9c864c25a51789359e8b163bd52035d6","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-141f968ed747df82bc52661e88883d111c62d21f.tgz","fileCount":54,"unpackedSize":1184056,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDmCp+QorYVZS0w8jwf+2i1vkwuieExXp3iSAHZgMcukAiBPp5Ep+/XyzmRuRFSYoGqcLEkDqpijoUHzWTD0s1tTrA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRmsZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmriAQ//fKKe1D7kkcLveGWgDUCQGS6I6VHsWhfqqhQ7SLVnzzoA2ysc\r\nsyakTaJ2T8Crlw5v772nrsV4UgnImCoaxdfcuPh2KXylYMPspKqaMGXpuH6i\r\nvydH/6T7GZ+M14b501JfK1aRhG3Yv2PyItMYRvEMWUSI6M7M43NtbLXeIeP5\r\nutsWF+EbpZUmiA48q/b267i1rBIoZ1AA0a1eXm/JWEguEPPvefkXV4xxXnAp\r\nAmoRe93IJVeBRuiEiuPx/ECbROBKfb6MnjqsK1JLex2fiJ7T3313u0pMtUAS\r\nV5IOe/U9qZgooKFYVzFxE0IfoxyabW07cduxGMbvZelnuigqd49QeTZhl3dm\r\nywV1cDIiCEblna65z+ew9nFET+qquneeCYESvCyaJzaeAOKqHprLTApeE7z2\r\nXJ8f1/K8PgaSEKgIeOgMG5VcfpOwPyGkShg1/LzfiKWiat/eTWIS7FfQe++E\r\nv0+yG52lIfhVpTgl6Jca6g8VawWzLPc+oDZkzRodkhmD5jplz/EePggXJWZH\r\noy1Lme1iGqzUr86uKU8rQbtxp8hBgKHL9qcrM8kt4HCEhnJheFWerPTFMuF+\r\nWJt2AYwd7cZVkwdxoGlMsetPgPzOL17vX3Frg49m+2PsWZktsRwjxK5XFnVg\r\n0aV682PlVWOi2Ek4G/mvnmVZoq5Qy3CC7q4=\r\n=RgmG\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-141f968ed747df82bc52661e88883d111c62d21f_1648782105193_0.31633981793309784"},"_hasShrinkwrap":false},"0.7.0":{"name":"type-route","version":"0.7.0","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/typehero/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/typehero/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^27.4.1","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3"},"dependencies":{"history":"^5.3.0"},"gitHead":"141f968ed747df82bc52661e88883d111c62d21f","_id":"type-route@0.7.0","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-lEufcORcaJuWyeGC9WnJ9n8kGLQVVQyeGWEPmo6k8uT9IKailBfMFJ6vEWvM1jNeFGC9o1y+HhdJ4NkMW6kAKw==","shasum":"bf8a44b898dd9e4d184326dec86bf6e34ddc09f0","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.7.0.tgz","fileCount":54,"unpackedSize":1184015,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID2ll7+bJ0FMILMf5C/InN/nWPbPHOEMZZSDIS9e0hmIAiAgcppj5vSoYGz+RVDWjMK62CRW5y/2kIGKGAmVy2Vxjw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiRmv2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrzIRAAhXcsuds/n6HfCtbILsZ7a+D8wEoYKTF8M5xROmo3i16iw3oT\r\n5wjKT2LlrGPBdonosDgBi4sznKU4uhnUW9s5N6VIrTrPgqEdI2FEDwq/y1IU\r\nOql35FsWROG/fzhAmy1fp6X3Ojuajxpq1PgrNccO7jmr+9tO3n7AmzJobS3E\r\nNDxPTTI97VGIOKfEpvH26nSx3InxxG04/gfL0bRCIgHhOOEnhIelXTJUrsar\r\nrLAR3d6qhhZbzykkPkn+scbB725Eu+VqYgUayt2gWYJRwHOdIJKPA89ZYQXa\r\nc25TnAKtOopYdYownDcrEhG5zt+w2KmnBHL7Iru294GHpTqom+IUQtP4+Gox\r\nOLRAzvouJA6qMstbn9X6WECTIH5vNd48Ge+l3ZvD3EBUpRPjdBZPerCL0Wlm\r\nuKSAzb8c4aiYYXFeYL6QeJrQpts4xUa18NSucU8SBHzXGKlYQwJSMKCrALDS\r\nhozuDwObWWm7DbXyrWMc13MK6JmUsx8R6oDNNsIOYjVVKmfLEqrpJZgV1oQO\r\nUqIWbJlBmvSCL0OyQOb9HVpO3d/zvES5oNe7O3qcSaU/etDiX2aHkv1HkXRp\r\ne63gTibpSUhAetrWJAU2pj4PH6D38a5BKuadeU6R4mV+XADc/Bpr0L3b6u2A\r\nkbswqN3fDiEcj2pm0yXRLy1aDncFmcFtUmA=\r\n=Wr97\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.7.0_1648782326328_0.6026821876290693"},"_hasShrinkwrap":false},"0.0.0-9ae00701b7f3e14de67c6b4141da704716f64c2d":{"name":"type-route","version":"0.0.0-9ae00701b7f3e14de67c6b4141da704716f64c2d","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://typehero.org/type-route","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^27.4.1","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3"},"dependencies":{"history":"^5.3.0"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://typehero.org/type-route\">\n    <img src=\"https://typehero.org/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://typehero.org/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://typehero.org/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://typehero.org/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://typehero.org/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://typehero.org/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://typehero.org/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://typehero.org/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://typehero.org/type-route/docs/api-reference/route/push) and [`replace`](https://typehero.org/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://typehero.org/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://typehero.org/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://typehero.org/type-route/)\n","readmeFilename":"README.md","gitHead":"9ae00701b7f3e14de67c6b4141da704716f64c2d","_id":"type-route@0.0.0-9ae00701b7f3e14de67c6b4141da704716f64c2d","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-pW0tzqOT6mGLwkPgJ1oOzD9pBr+8gpkbS0EHDSVAwL26ANVHemjhdlSR08Gh445rvbHTpel9cQWUR6TYCPIpjw==","shasum":"b9f133e25126d955bb89b9059bacb75e4a25543b","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-9ae00701b7f3e14de67c6b4141da704716f64c2d.tgz","fileCount":54,"unpackedSize":1183754,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDLGC/6WpZc3lcjVIR+Ey2Y/fyx2sRe9EK0o0HOhecl+gIgILgThzJ98TLFwQzpEuo6UK0V8NoHwfkOvsQ13KfSVVU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiT51+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpugw//Ys32AnTxTWSeZHJutVLcdshQwkZhEzYxfD10PW/ojvmk+kLF\r\nX4akRVXge70mBCE+x+gUaz7Gb24DKx2wHTM/y4wUlJYpPaZ7YFU0BjbF4tlv\r\nkwdLXC1tFebWJoFtm2q9NcA3wVedKBixfZ8VaUMSvAHjCJJvSeHqmW6eNUfH\r\nrxVcSp3ZgxVDR26a+v9enflrviuXtZt72hPZnmF0gpXjYnNCerA+VpdJ/5De\r\nmE+jBcdJHmuVY26m1zFwPFBlo/aFWiS7X7w1p78gLCF2EtZmZAjGWG/qwIB4\r\ni8IQ80q9eJI1d0rmE0PBuZc9SiRHYnJSRvIOP5Vi5GdZdxeSO0EHVdJFVObI\r\nza6Yox8ZV9QAy2TdaOYPv9pE+4nPlXtWKIpffv36RV2f8ya7yYNYqOgn5S1n\r\nUU3xl7CHhZRcXsHl050qWXwZCnrZlesspNHYPH2+xwa8Ugz1LqWvJEppp2wU\r\n3zI3twBcwdGV4QvKnAEnJMCfbtTXB6U5pnlrg2Debb6MPbPpbuiUDn28xCTL\r\ntf4QG28wqGV5PelzlscWUmgV58/tZVIvrrDmKEg9EsIXB5v9yLWONFxY1oMO\r\nEXf4GVekK4EV1PzvnoEEQ/6X2EKW2D5RDdZEKxyqoqm9/w1EfW+6tZpGkxIm\r\nXs5UnKe0SuohmE4ob+pJz9mWsapn7EXdw04=\r\n=xUhL\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-9ae00701b7f3e14de67c6b4141da704716f64c2d_1649384830144_0.793184250103028"},"_hasShrinkwrap":false},"0.0.0-d0b88264b4168a85e3af5b0f1447035fe3a9fddf":{"name":"type-route","version":"0.0.0-d0b88264b4168a85e3af5b0f1447035fe3a9fddf","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://zilch.dev/type-route","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^27.4.1","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3"},"dependencies":{"history":"^5.3.0"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://zilch.dev/type-route\">\n    <img src=\"https://zilch.dev/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://zilch.dev/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://zilch.dev/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://zilch.dev/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://zilch.dev/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://zilch.dev/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://zilch.dev/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://zilch.dev/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://zilch.dev/type-route/docs/api-reference/route/push) and [`replace`](https://zilch.dev/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://zilch.dev/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://zilch.dev/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://zilch.dev/type-route/)\n","readmeFilename":"README.md","gitHead":"d0b88264b4168a85e3af5b0f1447035fe3a9fddf","_id":"type-route@0.0.0-d0b88264b4168a85e3af5b0f1447035fe3a9fddf","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-zQfmFkJbki6AtHNdg1Y6PzcEIBPvN0Vihc2FzzMr5X+O3zH7OrlVwOsMEQ62QDMpaC33ced7y1k8Z/Nhv0YAvQ==","shasum":"04bf4e2065715db8268ac57eff96b3f728b44455","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-d0b88264b4168a85e3af5b0f1447035fe3a9fddf.tgz","fileCount":54,"unpackedSize":1183544,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFNEm6LijrZAuJ7kd/VNkSVijYTcgxtCvJ4c2ewRTmDgAiBvc+VJhFMWoyz59QfHDtPrKeipObsllrIGR8WTybgP2g=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiT6WWACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpwgQ//V/B+oD11sub2/tpog2JDwhyd/sU2unNYuo6iseio0+KyK2Ux\r\n1fQ9fKIBql+64EiSe48Az2TJjCtzB/dHWN5AN/XFD7ObUE4Yjodj678oz/Tz\r\n12QY5OPq61SW8zQYadcZtok1i8DBltUctWKaGotWQzV5fWLfLjlgok+vorjf\r\n0fij2Y9DBRJmW2qQl9BO1JS8zswAxeN+nTiabZFGAktRXALY1gJ5z5p5F4C2\r\n2cn86UiRRuVm8ywI0i3kKHUkvl2bsxF5hnau5dcIggheZCwXraACzDI+zGlh\r\nLwPKeODELzPxmOYhz80Wi69PVXngliEz8SMpDYKMjG/fQKfXnxpXnxCp8/tU\r\nIH6P2376kNatnWxuDNwjtwl0HzQm6omYYDPqnrpIPwYCcOuLYS1N+vIrZnwo\r\n8MVNHNXMf2YAtDMtimkfgJ1HGq7QL6E5lIy8djETxxP/rDqrD+rPB7RCd2Gh\r\n8+1MnXR9/alb77wA96LslOm/wlK5gL7dBRrgdYv8dw6FZjNscKDsiMk5Qrc7\r\nLLlp6dLCytfwP2t1rQLO/DTUq9B1c3r/7qyXtDUe+Mosw09Bk82dyWD9QkZn\r\nZhCRV2aIX1Vn0Qh5SEK4mzGx1V71r/GHOqyNaQtpkGVl8dqrZNpzbQn6vOKk\r\n+DeOEO4TfJTJwmRwa/HEtmxypxE2tYmxvqY=\r\n=WDd/\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-d0b88264b4168a85e3af5b0f1447035fe3a9fddf_1649386901870_0.15757500409150027"},"_hasShrinkwrap":false},"0.7.1":{"name":"type-route","version":"0.7.1","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://zilch.dev/type-route","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^27.4.1","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3"},"dependencies":{"history":"^5.3.0"},"gitHead":"d0b88264b4168a85e3af5b0f1447035fe3a9fddf","_id":"type-route@0.7.1","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-d7A68VZKpinrxwEw9O63BtjPR75DUu97fh8kDPMF02nBbsO0d+mYeaCFsr4VKA8lTsSInvYdCOIOzljqynp2Tg==","shasum":"5ddd03fbc2b26c6dd85a0b15046688e0094e85d7","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.7.1.tgz","fileCount":54,"unpackedSize":1183503,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBSKHpdJMde7TizdR2UuHxUR5eAarmSxChTh1JAFIyKOAiAn0iuQ4j0hwLv752WUNV9shECjMQ+dBfDvsswVvNiJBQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiT6ZzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrnpQ//TMGRtQfrphSw5hFjycPNRBoJVF60vojjLurGThgXhB1UoW4n\r\noiYRgSbFIcZLUpRNI1zkDcWLU8urthdjesBUD18WrHRCIyeCYXLr+iKXOjCZ\r\nMTNcMHjLkrtN747U1rP9kEE5Kd43GYCyvJ6SjBzEmWK1UShqvkizhcrcPbmh\r\nYwOeDHfpCaemWZmzplziMUI5UGjTgv/spZohi0UuqPFVPyr165amIARTvhfu\r\nk8z6M+Otn0VuZVexH9VAIpfWzWuqiukEiRmY3pII/FyjzFeDeVFT/6hwajlR\r\nDqG6Tfy2NawgmT3NjTBgdUt5JQ2DKKSLGyk2qb0xLbah7UPeu/D1iFge6asC\r\nL/f9WRGjO+COgI6HRm35eA4MYx6TsjXWCTAGUd5p0NSKzgPyAIZgCFStKnNu\r\nGi1rlX3MsOL9F4CA2dc/IM3Kpk/umaJaUsPyM/Tv2S85XcUMfQLTwICG5m7t\r\n0U8v4A46NJSjHpLHC8oYCZ2d5UZ42as7LXud1DVdVPWM+jZUezp7eEd7Ep85\r\nupaEnsWe3bf4PTKvwyltigvuVbAsSOdAv1+1I1HgxZK/WfPvmr4RySbcye9P\r\nofn34MQAAhVkNjKMThzvGp1vw+pR0HgRNIH4Kt+TTIm+GjHA+TA/4wGyGDbJ\r\nMV3Jzmwjbar53AStjXKRR7tuCWBWhyvn6Us=\r\n=6Kqc\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.7.1_1649387122844_0.1518168529900843"},"_hasShrinkwrap":false},"0.0.0-4b0707379a13e71c169f7cf074a1a1ed12d41d8d":{"name":"type-route","version":"0.0.0-4b0707379a13e71c169f7cf074a1a1ed12d41d8d","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://zilch.dev/type-route","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^27.4.1","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3"},"dependencies":{"history":"^5.3.0"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://zilch.dev/type-route\">\n    <img src=\"https://zilch.dev/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://zilch.dev/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://zilch.dev/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://zilch.dev/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://zilch.dev/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://zilch.dev/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://zilch.dev/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://zilch.dev/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://zilch.dev/type-route/docs/api-reference/route/push) and [`replace`](https://zilch.dev/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://zilch.dev/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://zilch.dev/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://zilch.dev/type-route/)\n","readmeFilename":"README.md","gitHead":"4b0707379a13e71c169f7cf074a1a1ed12d41d8d","_id":"type-route@0.0.0-4b0707379a13e71c169f7cf074a1a1ed12d41d8d","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-jMs1zo9i+dfQIyeLyHSlQ7CSgCHIKaQq8KFcFnSnE0Sn11avuVsjVNYgZ2MhQWRkR8xNfcoegeXpV6K2Ihusog==","shasum":"4a64aea65d6b8d9c0bce4b956bd4cad2325156a3","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-4b0707379a13e71c169f7cf074a1a1ed12d41d8d.tgz","fileCount":54,"unpackedSize":1183544,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDsMSWRGiWA0YFYtqiNTyXzIFRki82M8YrXsYnocqxNzgIgSm8DoH+6vA89Gbn6SC7jE+9cv8mk7SyCZ0EGomJNnzQ="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiT6bMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrIDg/7BJoZ19eD3wXNk5eUaJh+xqQ+LgKbIe5v2K7NmuzAq7pB7lyG\r\nOLXGh96gr8Jo4kO12ZP/4qf7Ln1vnrqhiZ2FzsCK/WHAQzaSdQFgk6qFFlvN\r\nDJ0TpZRIILIms8//x2G11JxMJN3CGO0g+ZlgHSVlMUc0OjTVwSATmym/xlAT\r\nHvvFQoxesD7GX1643sP71/uwprgRpzFAWz7h7bOsHEw71rVPJclA9T7LcZFn\r\nTtGFqRyp7hFvJWz2Iijd3piqje7kdZZ4uZtbqF4+PBKFtk818kVfxr1Gdmjo\r\n5bjwRbMOY+N0SpDRjBG1NwEHkGdp2lY5VKIgECFiTgm26ONJsYGfhmGA0176\r\nOZ8wtki+uzr0iaq3qYsEbhLafOQB/Oqj0g7O/TufISCYkM4JsfmqK3td8S9D\r\nzK32P4ZXZLbN2iDNaMlfUFz16C0MkWGFwCZ9LMfZNv4NPhfNex3kv50oV+Uc\r\n4DfcEYNISLtD0s9k0g6izV/9HbGOKU+qiT8tYyRR0IpNs5cbvgBKQHdLvYr5\r\nQjYdJdvnqdFMd1Z/hrLVbFNvKu3t8mO7LCn0D4idpRIlm3B8cz07+kC2cUN6\r\nBF4yKHM/cMYUZr7zSJm41WIVyXLCY+iM7gorlws6WExz0YBSvG5v7VVp0UZc\r\noaGTTH+FXzDKJ9CPAnSAJpcrRrFSiZdtHh8=\r\n=Z/WX\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-4b0707379a13e71c169f7cf074a1a1ed12d41d8d_1649387212110_0.8071911423717502"},"_hasShrinkwrap":false},"0.0.0-ce3d5f9dac50818f590b375887612a3224394dbd":{"name":"type-route","version":"0.0.0-ce3d5f9dac50818f590b375887612a3224394dbd","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://zilch.dev/type-route","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^27.4.1","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3"},"dependencies":{"history":"^5.3.0"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://zilch.dev/type-route\">\n    <img src=\"https://zilch.dev/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://zilch.dev/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://zilch.dev/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://zilch.dev/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://zilch.dev/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://zilch.dev/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://zilch.dev/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://zilch.dev/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://zilch.dev/type-route/docs/api-reference/route/push) and [`replace`](https://zilch.dev/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://zilch.dev/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://zilch.dev/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://zilch.dev/type-route/)\n","readmeFilename":"README.md","gitHead":"ce3d5f9dac50818f590b375887612a3224394dbd","_id":"type-route@0.0.0-ce3d5f9dac50818f590b375887612a3224394dbd","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-2q+YoOAA19wPokc17dO5aMCDyNDjOpBWt4/TuXbBN5bj7KyXw2VYTuU+h/xSauKp+I1FRPel+LczS/iLiR2P2A==","shasum":"458c7b8c2f4d0dbafeace9609468a91dc33c362b","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-ce3d5f9dac50818f590b375887612a3224394dbd.tgz","fileCount":54,"unpackedSize":1183544,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0HAgYLxr0SlqtaDFygTQWebiOA1z0T1II+GtAB2/GegIgGYiUNJxAuDmhgolycZpEB2Y9MhBCwwkJzFotUY2dLK8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJitkQuACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp88g//Rw2GYZmsqNObEcdcU2pbZRI4oJ/4Rq0FqXmGYcw3+61cIXgw\r\nJd9Y/LKuiyPrcqiFrtT1iLlqOag9WZy4ISv/7EXNWGibH2aRXMOGf52AnJMA\r\nTnwtENWgVoU1qzJbW4Nvk2snhm3++3wUrtUHIkxVR559LkBviiUcp6IQhs5w\r\n8E6g7zwOeHIz1KCyzSEiedjbrLdqovSaXfmEN8KZSYCnn2PHfjZeYFpUrhCB\r\nxY1m/z2q9SoGnxszpTUhODYq31uBdYrRmPqgAgSfIbDYxlwpsmAblxtWZfN9\r\nBNGSyGIOBXEYO7Gb3zxxWrrdlPh79DbxFzb0aYEEzwdf/pIqZXJCmqv6ZZsy\r\naMupqed8x5tVoG8DRXqTAamJozE5tm3ODqYqapjX8QL4eodae280SWPHUn2d\r\nnZ2jsNI7vygD4AibQXpB2ENqYCSE2yDCVFvfFPNsXpDR812uFG6WAbM/m3XE\r\n/f+ZU7knEZLXtCjHfHgwhrEy+NaJbgeZF/8ha/vSObFSlZfY4fVMWk+96v7x\r\nmb1t/Bq5PFsd1HfKjidp02U+QZZnWiOULyS8K41JwIa6ZNPmuo2AHXKhRHWx\r\nY103nJQsNtpgorzAXjriZCfkggz2RBZ2wGSAUcYQk8woEz1CacqLIxPYhG28\r\nxxKDVBT1Qq0yGzxmE9Mf9g71HACdjmoc8ck=\r\n=tvce\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-ce3d5f9dac50818f590b375887612a3224394dbd_1656112173779_0.39734887184887846"},"_hasShrinkwrap":false},"0.0.0-a46aa115a20cc382dbdba3ebd70832f0640c1fb8":{"name":"type-route","version":"0.0.0-a46aa115a20cc382dbdba3ebd70832f0640c1fb8","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://zilch.dev/type-route","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^27.4.1","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3"},"dependencies":{"history":"^5.3.0"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://zilch.dev/type-route\">\n    <img src=\"https://zilch.dev/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://zilch.dev/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://zilch.dev/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://zilch.dev/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://zilch.dev/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://zilch.dev/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://zilch.dev/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://zilch.dev/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://zilch.dev/type-route/docs/api-reference/route/push) and [`replace`](https://zilch.dev/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://zilch.dev/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://zilch.dev/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://zilch.dev/type-route/)\n","readmeFilename":"README.md","gitHead":"a46aa115a20cc382dbdba3ebd70832f0640c1fb8","_id":"type-route@0.0.0-a46aa115a20cc382dbdba3ebd70832f0640c1fb8","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-KP6w8tSPAZXOr0AQ/wYZdSi4ifBjs+u7CfWJgzMrJB1IAOdPkbnJ/SeKTlRHb2BcAUjO2yj1oeCKgQZQjNzVDQ==","shasum":"1847071f26a38078b5e0f06ad7ddfad8550c9957","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-a46aa115a20cc382dbdba3ebd70832f0640c1fb8.tgz","fileCount":54,"unpackedSize":1182946,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCx703IkEIPS0eJS7Jcf4GWHzWUzw8I4M6RWL2eoVGoAQIhAN3bC0vhHLNSkaTZm5zJ0goSli6MlfYJ72w8FP0osBWV"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJixxxYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmriVA//c7N/aXHFnbhJtjp1SgVrQ4Zrg9Sg1Q7dHR4vFD4FNl14zqkV\r\nYXvK7TxCvVqsNi0hCioRmeC45bX/QyNxmUbKcqJvbD/MPE/vbLIW/zisskm9\r\n1HuxsVdqCbSK16kvnJRKXPvbBt3QMfnVTYLy1PVx4pGrdO2eEYI2VF84rpB4\r\nDW96xVwo3u1TW4KObNSm25Owg5Xs1bdcLeiOD/jo+7wlAttKAgzIxbglSVEj\r\nGHbbWUbEGWGrJqBmDeQxU5o/ydKimF+7O0KosisVbgbv5koJj1gQMnZ9Z17A\r\njpJyE+slwLERpJkttPpc8XHvAE6oEaqdLCZOp7M9D+E20jl9sKJv+9a0myOe\r\n29CZlgcoVPwXT3ulpNw6oYJPwCM86jM8RxVjft+3pvBsf1s1uYF+uPXY47HD\r\n2E0EYUnXQwu7HnleHLvQk2/1F4IjxvP4HmGrnzX7jCQ1LRZAIskzGdOzBZzO\r\ndatSaRsNRrKiUNLVf14boDbkBcphnZ/2nmadcoQjrIyG6YooGBuUBhtTakSf\r\nFkr549thV+B+N2U7/gQjdK37vjAZJWNZ8+KZPmb4roraAl0DhrHUR7T0Aj73\r\naVGkdty0eHlp62cASCpPh6ccxWnLBl0a+oHGAzQDyyzLyiwqvkoDu1qiZFB6\r\n6MmUBL27W6yiXQvFXtFdrcpb0bYvPvb7gCs=\r\n=lUzt\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-a46aa115a20cc382dbdba3ebd70832f0640c1fb8_1657216088542_0.7744391577135443"},"_hasShrinkwrap":false},"0.0.0-00bbb56c97caaa2b6e4f006901332adfd8710f15":{"name":"type-route","version":"0.0.0-00bbb56c97caaa2b6e4f006901332adfd8710f15","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://zilch.dev/type-route","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^27.4.1","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3"},"dependencies":{"history":"^5.3.0"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://zilch.dev/type-route\">\n    <img src=\"https://zilch.dev/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://zilch.dev/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://zilch.dev/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://zilch.dev/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://zilch.dev/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://zilch.dev/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://zilch.dev/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://zilch.dev/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://zilch.dev/type-route/docs/api-reference/route/push) and [`replace`](https://zilch.dev/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://zilch.dev/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://zilch.dev/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://zilch.dev/type-route/)\n","readmeFilename":"README.md","gitHead":"00bbb56c97caaa2b6e4f006901332adfd8710f15","_id":"type-route@0.0.0-00bbb56c97caaa2b6e4f006901332adfd8710f15","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-/Bp/sw+FU2wZdbjZSLif/g0Ehdx7XEVUTAR7bM/Sp8bOGuHbaNp5HY6isi+kZQz4iX6FEQjjtdwXRzE9+oStTw==","shasum":"23e2c3eddf56c1e15865d28564f3667c0b3f7182","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-00bbb56c97caaa2b6e4f006901332adfd8710f15.tgz","fileCount":54,"unpackedSize":1182946,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCvebVu5qmHBVC8g1/alfVnbQF7E47cOxqtMfiOKxx2RQIgVqEkNsH77KDbXTtLU7pko/kRQPSH+X63mXIJfHLdAiY="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJixx1lACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmocSw/+OZPuj3b/TxsfrSzP1opdlnXR2EcBnZ4BL81qFqTFMCmXEEZC\r\ncuxi/cti4S4xuBI6kSPE1VGrh+E3sfxL4dXOP2AcLqFsIXvjEXZA1uRqIMUQ\r\nsJyn0NZZX1CqCWzDHIVOD+6dvvtYaRtD0V0cuZ6vaP2ctmnyQtjOtFShO7cs\r\nNUrdh0ERFP0ctZEA/z9WI5GhEZct0iI3595rSpmMwStOT31bQenZc8YZWhJi\r\nCauJZaGmlK/qF30X3o1LjF2UUToL8KgyQnW7H/EAkhCfMiH4Xm/+XTE4g16k\r\nH9f0PS/vZTIx4cH5MwjCFI+DC4s6m0WL2o8flOjqiUScKFTtvTs2vZjeUBkv\r\nCVHU4T+JpBMtkwEuKnPj7KVyaEl1CMDtmjkDCTTqvSZBqh01t0Ze6lIFkh/P\r\nHO5zBl05YzUmZypNkWXpLNPjz/fiZHmT06VwuxIOkC32/m43DvXSBxFGe5SI\r\nhYrcxvfO4p8dm1UBKH/tjgbrSj0M+Klj3/TzcsYfpssmGFHSxH9cHalBPhKU\r\noVGWGnS0a78AEu9NUhTKnZbXDcIjXWzY5vAIpvpreaUS2Z54Qd+tH/7UkYdg\r\ndawsxLAMpIetgebNPxMTW+R68iXjTwmXKcq7zumsScZ7lZkiKw24Zb2FaeAo\r\nR672gfbEKP1KpXORWgBGwvTv1ka3KyuNeCU=\r\n=KHW1\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-00bbb56c97caaa2b6e4f006901332adfd8710f15_1657216356864_0.45779095582348406"},"_hasShrinkwrap":false},"0.7.2":{"name":"type-route","version":"0.7.2","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://zilch.dev/type-route","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^27.4.1","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3"},"dependencies":{"history":"^5.3.0"},"gitHead":"00bbb56c97caaa2b6e4f006901332adfd8710f15","_id":"type-route@0.7.2","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-HozHpHiOxlXl9Cy+6VniOZgPVv9omXtwPtyQB7iubSRxEyiop7D7HECnjVO/gItcSfNgOy7NEUskuymLWjBWJw==","shasum":"164f4bbe003356da2e93b7b16bfeb6623d985169","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.7.2.tgz","fileCount":54,"unpackedSize":1182905,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEcEDp+LRxxW1ccfAuf+gtghkhKIZFJtrjE4DpNnTMmPAiBNmOqcBQXuDhCI0RoAZ7P2F+SMtuYv06C07UgaElLVQA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJixx6QACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpW0w//RjztMNYYUaGG5qPCuhp+ShBmfwml62i6/pILFBZwsQFnhzNq\r\nMWoo0H/TPIWAz3g94K1319epdVZYzBUrYDm1zBSicuz4BkYpewiUUq/b6mBt\r\nxeEpoQ3rEJVSoXIdX8J6nZHBZBFpJ1a7TAXRiiHsCYRyoZZjSz7j9nmoDwRq\r\n4SSOsyeED7GX2h6fYniaB7uEVYMSA1FTFyIf81r0QxvVRHAKz+C3ZfV8TnVi\r\n0fbSuF73LwRKhzgxV1fDj5gHTQAOSQFcZA80LgkNhUnHK4YGQF+aq7f4Q8+9\r\nnHobwK7y4n1RLgxv1IXqO+U0svDRd4doWmHlWbWY/xVdwGTSxGwQcjNL+R87\r\nfIld9SffGInq9hOu2hSCHiimxv9BF5Dh4i2F7ixK8GMllktzg/E5O1T5tGqB\r\nFa96V5nTPNTPsCmCYRMl5otzv0oXG0Uu4WjDj/ipwuOXQiA+lTdkdZ7wduOp\r\nwek95bikK3XjK6bCpb8yDA1X7dhYFcFX6SZrIkaSDuIx7vrGQVCtPKR2xX0u\r\nVGdUUMu3zKnmLzPs20ElSPjzfJUKSGfFon03mLl8zIcHe+UK/aQBagyE40Qb\r\np4znIVL+DL3W0W4adVQ6lMj8VLHGZZwcjs8iVxO1x3GWZML3qAfX2/h9cb5q\r\nvjoZGlO2CAHPPjajcU4TLS/JM/e2XnfsL2g=\r\n=6IPY\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.7.2_1657216656060_0.5335566124642477"},"_hasShrinkwrap":false},"0.0.0-ca388f5ee882adfcec89be216a24ec072066fd8f":{"name":"type-route","version":"0.0.0-ca388f5ee882adfcec89be216a24ec072066fd8f","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://zilch.dev/type-route","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^27.4.1","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3"},"dependencies":{"history":"^5.3.0"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://zilch.dev/type-route\">\n    <img src=\"https://zilch.dev/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://zilch.dev/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://zilch.dev/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://zilch.dev/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://zilch.dev/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://zilch.dev/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://zilch.dev/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://zilch.dev/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://zilch.dev/type-route/docs/api-reference/route/push) and [`replace`](https://zilch.dev/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://zilch.dev/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://zilch.dev/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://zilch.dev/type-route/)\n","readmeFilename":"README.md","gitHead":"ca388f5ee882adfcec89be216a24ec072066fd8f","_id":"type-route@0.0.0-ca388f5ee882adfcec89be216a24ec072066fd8f","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-pl+GZ/xmTX7Eoj9lWTB4Eb8JzKdQqzJBVb4fEKaW3Q02fhWnWTFL7hnUNX3xRmtIvhPzro0C2gFFC61nNFhljw==","shasum":"37708484c36dc13ad97ec9003c0132277781030b","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-ca388f5ee882adfcec89be216a24ec072066fd8f.tgz","fileCount":54,"unpackedSize":1182946,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF+Dy4A8GJC3T291CUepPs63mCPbd6UWgCBlu4vJIRlDAiEAwV2jRvjUrJEr7XAxh7YE/qzcc3r0/qM9tAScHevQo7c="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi/t+2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrwBQ//U/FpoSwJOkP13nwN2/W8RIrVnxdXjt/avuaxAagN6YvqCMyt\r\nbmwsCQF0/t8KzjXBXw9Gd05YNlQfKMLsMrKlBXhNUeiH3RVSq2kGGL+7nWje\r\nQA9J3iDhl5rv55TujPh78CmYVbQIIV133SsSGBtemBdPr1uog49jhBVPWTfI\r\nBJEvqSxJM4fpIhFnhEDM2q5qNA3+9GB209NNwDGJeTo3rb5p9SDrIFnEOEVO\r\nLQZw4KhiB0K2HJp5YKsh9Y90jDynpPXUGgV8yTc90+cckHmXLgpMi0EAy8wN\r\nK5NpI0teHhUUIX2q7RrSh2tnNhctg5mdKM7ZaXKXllg2aTwWXaOnY3TehHj1\r\n7d1WQPJTOxgE5uMFI7zTMxIjBl5vtWRoGmcY14oAMz/He/Afxn+UYkpQSKkZ\r\n4qfdVYborE/FvKpoYq+vxxbR+OVIrg76E2aWV3vO/2pBPhsJ/Q8Ma5djD7e6\r\ngVv6uvILafv9Bgkn/y+N3Bsun9RG+oTY+K9tOYSD15/oPNXGDXLzs1Ad06jw\r\nC1vXi0bqouor3WOzH6rOYyLyM3jEB6F7fkVYGfh7XJ1xFRDvHQjp0hpyo0cb\r\nGlYV01+PftXRb6Q4nH1cX+grIU0JAg4xlaC2jaTecowCXDU3bcxqgcNXzB2W\r\nKJRov6SamnBybQoS+RMoGHy3qeYklVBkm+4=\r\n=kWgt\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-ca388f5ee882adfcec89be216a24ec072066fd8f_1660870581839_0.9248681270748464"},"_hasShrinkwrap":false},"0.0.0-86dd1be0d3967f7faee9a51ae4a11ab0acee668b":{"name":"type-route","version":"0.0.0-86dd1be0d3967f7faee9a51ae4a11ab0acee668b","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://zilch.dev/type-route","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^27.4.1","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3"},"dependencies":{"history":"^5.3.0"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://zilch.dev/type-route\">\n    <img src=\"https://zilch.dev/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://zilch.dev/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://zilch.dev/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://zilch.dev/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://zilch.dev/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://zilch.dev/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://zilch.dev/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://zilch.dev/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://zilch.dev/type-route/docs/api-reference/route/push) and [`replace`](https://zilch.dev/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://zilch.dev/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://zilch.dev/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://zilch.dev/type-route/)\n","readmeFilename":"README.md","gitHead":"86dd1be0d3967f7faee9a51ae4a11ab0acee668b","_id":"type-route@0.0.0-86dd1be0d3967f7faee9a51ae4a11ab0acee668b","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-bBwfsnFIDxlatb0HldXtvUueosC1djdlgXeGUiID+cebp1Umzz+rQzhSrQmNNynCDvucwcNE4euggQqYTPUZhA==","shasum":"5a344b02b08294a4e22c8b9d398d9525516f3732","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-86dd1be0d3967f7faee9a51ae4a11ab0acee668b.tgz","fileCount":54,"unpackedSize":1182946,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCBWJVCYALNYsQxJ1/xHU/YvbNnIgxTScY2GnxAMszYigIgBiTfVrZZuE8Vkt9v7Vx0Y7KVd5YGbuF6fdltudShHOE="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjb7DXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqE4BAAmqBHdRn7SsocbRd79YClwqbT4459buSo5483t0Zj7DRRgoBq\r\na8FeZDQ9Ua714hQJO9Hm+Oga1tLy0Xqm2LuZTV/R7VZBLtw34TAWkodAeDbl\r\nji0ILsNeD9MnRrl5mo+08MiZB6swJSQXTmoLOfKcl+4Z1A+GyEThnKqwTFjM\r\nlSoE+Y35r3cEG8kGGyfVmDsraCNWppQYAVlkRCO+v6ax/7Z731I7i2j0iV+K\r\nhedps7ZT1njxctIUtJVh7QEnUZleYtdBk5CRWx8XQUhgFTAY3LZEuNq8u8TI\r\nMrBagcjq1goFeQChhMPNOjB6NzXz8sSkRm9HCcC2EBc1A9YauWhM3RGmr8x4\r\ni0HItiur1rH1D3l+KLlBHeER7zL/jjOcTSMC1jGapCV4sljO0TAKDUaC4FWQ\r\nMFT5pHkABWFVmPmjIUwbuEs2w+x0uaDkC+YBZSHGQV07PF0m3GvfvUKBZI8G\r\nwceKzWRiNasQRuoIYOXvX3H/whFl/ibdVGF6NOHCmmkQZKAVJslOEqjlRy9B\r\nXl1IAegW9pDVvfKvhwm9tu/HlbXaACgiW2lu3awkGT6xUPjmDx526Om9OBki\r\nUN3QUEMKBS0wrUnVKWFjKuav7l6Zu+Af297lX9ySeBSLcdDafPSVJOZ5hg2h\r\n0buxM7wj4kSsH4J8VYx2wii/8/1SvwVUImY=\r\n=D/Yu\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-86dd1be0d3967f7faee9a51ae4a11ab0acee668b_1668264151213_0.9803589696237669"},"_hasShrinkwrap":false},"0.0.0-c71bdecb5d202eec4eabfd44ada9663af1ceaebf":{"name":"type-route","version":"0.0.0-c71bdecb5d202eec4eabfd44ada9663af1ceaebf","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://zilch.dev/type-route","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^27.4.1","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3"},"dependencies":{"history":"^5.3.0"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://zilch.dev/type-route\">\n    <img src=\"https://zilch.dev/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://zilch.dev/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://zilch.dev/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://zilch.dev/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://zilch.dev/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://zilch.dev/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://zilch.dev/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://zilch.dev/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://zilch.dev/type-route/docs/api-reference/route/push) and [`replace`](https://zilch.dev/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://zilch.dev/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://zilch.dev/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://zilch.dev/type-route/)\n","readmeFilename":"README.md","gitHead":"c71bdecb5d202eec4eabfd44ada9663af1ceaebf","_id":"type-route@0.0.0-c71bdecb5d202eec4eabfd44ada9663af1ceaebf","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-nvY58Rf89WU5D/vzoQDvdG2JQ9XFtGJU9FKUXXoGd2PzKf7gCCnNZOyLqx4CQLv+hD1JEUzC25ldBECOv16Jig==","shasum":"7b3c7a07336df3c520d270e77be433f1438807e5","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-c71bdecb5d202eec4eabfd44ada9663af1ceaebf.tgz","fileCount":54,"unpackedSize":1182946,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHY2r1HzuEujwXtM2IjG5VC5K43xlLVadmLHweed124xAiEAluaXDMGqEyL01W7daFF+TdzO/G0yJU9ZH4Mm8k5B5ws="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjmMn+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrJ4RAAm3V50V8aQBdemqvqN8JEA1NCF6nA59BVNh5HuONFFhFAeUi8\r\n+YkeJbmk47CUgGhjDgepwMaDF+/ZB0si2jxDq01XGSWrYobCiI/UNqBO5gE6\r\nBU8eO2+wy1pg7pCzliWtMB2Pcsvbm5+9iGZY7cKDB/3JQu5bn8rvBq9jSS9i\r\n5czJsQqIXJx/kglECtQhSyzPQfs61V09CCFfRyfpyvN+scLoMkXW1Qx+3w4X\r\nTzhN52oA+t8G50iGwMuf8irSVTuRfSBKqhDa1BbhftrJ6rfPfXIc+tTiOvIC\r\nnbfmK2h3pV9JxxBuJmvdQWAHwaivJV3li7Qtfwbg6EXIfchls5Ap+nKR9APE\r\nildU/sW1eBpu1iiAy9xOtq5s+a2WStTN/2IknkaNkAIEKOE4V3rNDvlBSuoR\r\nuj2PNhHVJ+3hwdl9cSHEvr63sVrZ5mRoP5iNtNMC/ap+UaSYZRqfA+4q7NNV\r\ns1Oz4VsjHmLPDC+90N2mAgxr6ILpGZeJubU8ZruHKnLQNV8j6h3GfOnphvCa\r\nvenPg5PpqChtfYW0R6sdGvY6ZlXJtzoihdTOO/UZ7uWw1T0zGB5lx7OCGxoe\r\nKZA1AEmrxruWfGrSWeiJF+G7PxXA1Do0UaETlf/g5agYwZ14rjDA2whvUPKp\r\neVyLmSGPgunlsj0FeJkgnBMA6j8CPKJZ7aU=\r\n=teqW\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-c71bdecb5d202eec4eabfd44ada9663af1ceaebf_1670957566625_0.44272163404136333"},"_hasShrinkwrap":false},"0.0.0-b2c20d4988cc0905bbd02e01dd30607d0f590ecf":{"name":"type-route","version":"0.0.0-b2c20d4988cc0905bbd02e01dd30607d0f590ecf","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://zilch.dev/type-route","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^27.4.1","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3"},"dependencies":{"history":"^5.3.0"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://zilch.dev/type-route\">\n    <img src=\"https://zilch.dev/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://zilch.dev/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://zilch.dev/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://zilch.dev/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://zilch.dev/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://zilch.dev/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://zilch.dev/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://zilch.dev/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://zilch.dev/type-route/docs/api-reference/route/push) and [`replace`](https://zilch.dev/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://zilch.dev/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://zilch.dev/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://zilch.dev/type-route/)\n","readmeFilename":"README.md","gitHead":"b2c20d4988cc0905bbd02e01dd30607d0f590ecf","_id":"type-route@0.0.0-b2c20d4988cc0905bbd02e01dd30607d0f590ecf","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-/+O8YZhUVu8FQ3PmssJNPR/oDksA8dw+xMCmWoOQj5PDkmk0XenVV+LRUW0CPX0QD55BZXsBlHS0TcQSQEuC8w==","shasum":"080ff02899b1654872f23fa240216b795b09e1d7","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-b2c20d4988cc0905bbd02e01dd30607d0f590ecf.tgz","fileCount":54,"unpackedSize":1182946,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBEW/1VC4YuRnZ1oCX4fNfkZA0QnWKLwdiLhDXYTSrPSAiEAsiDkB9hQPI1eDwGCrBoWRPiKJt7AIyI8oDvfGsYo74s="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjmMo3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoT+w//cDZoWWkNuSKwbpFryb69XypEoJVXJn+peHm0pTka0GP37mr4\r\nuTQ3hZ4AxYbX4n9iBcMF3p7qWlv8EaADZl6QkayUZ9twliueX8QUrG113Bt7\r\nqypC7DPHOFF3Q0CYFKX2ZBEP1safR3R1kyQonzqkw5TP0d+DYsW4kW1aEoJl\r\nzacdDLz437gsUlN0dQ4eAByTW3PaC+H1T88w6YzgI58dkzr1DJ12hQW4nI/a\r\nC6JZZwz/gr6VcLshglPkCLBcvNkiTSKS84iH5l8HbiMDPmlo34pISVen0l2F\r\nw8g2PQJbOqH8MqBeT5MjnFZjCLUw8aklApN00JpzhalFoJQqlGCic8JGWRs3\r\nf1GLXVY5vjhFUaQsch7fwP651IObRVKyH1jGCYCF/GZGIJ1IHdYZEQOAZAUe\r\nigzqp6OFIA+jXxPczl34jilivaSUhTB8qOgavPyrJp8pEvZsdNRHd7CER5/L\r\ns5cVrEGAb76/W1aWiEJ8LTQxzMIwUwiHkKFaAhdHNeCTZCCXVp8wPY4Yl5HH\r\nu8eTfQHTL2RhY6CDc63sGysWGsON13YraP0ynj5lFE1ktpezAA6SkjNa7KQ1\r\nJCIqK1SZkngT8t6bS0++4ipiTy5aQsab3F7bDvdgReI5ceNfhaJEVjTd1WrR\r\n31CCCwEGmoyPWRyHIcG1ad1cscwa+m/RH4A=\r\n=FPlV\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-b2c20d4988cc0905bbd02e01dd30607d0f590ecf_1670957622816_0.7153860214401995"},"_hasShrinkwrap":false},"0.0.0-31c5b21de7462dd2e4097196473c1344c650316e":{"name":"type-route","version":"0.0.0-31c5b21de7462dd2e4097196473c1344c650316e","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://zilch.dev/type-route","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^27.4.1","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3"},"dependencies":{"history":"^5.3.0"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://zilch.dev/type-route\">\n    <img src=\"https://zilch.dev/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route <sup>beta</sup></h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://zilch.dev/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router. \n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://zilch.dev/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://zilch.dev/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\n> 🚨 **This is a beta release.** 🚨 The Type Route API has been vetted with production code but the library has not yet reached version **1.0**. More community feedback is needed to validate the project's maturity. Use the [issue tracker](https://github.com/typehero/type-route/issues) to communicate this feedback in the form of bugs, questions, or suggestions.\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string\n    },\n    p => `/user/${p.userId}`\n  )\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://zilch.dev/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App/>\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage/>}\n      {route.name === \"userList\" && <UserListPage route={route}/>}\n      {route.name === \"user\" && <UserPage route={route}/>}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>\n        Home\n      </a>\n      <a {...routes.userList().link}>\n        User List\n      </a>\n      <a {...routes.userList({ page: 2 }).link}>\n        User List Page 2\n      </a>\n      <a {...routes.user({ userId: \"abc\" }).link}>\n        User \"abc\"\n      </a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://zilch.dev/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://zilch.dev/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://zilch.dev/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://zilch.dev/type-route/docs/api-reference/route/push) and [`replace`](https://zilch.dev/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://zilch.dev/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://zilch.dev/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://zilch.dev/type-route/)\n","readmeFilename":"README.md","gitHead":"31c5b21de7462dd2e4097196473c1344c650316e","_id":"type-route@0.0.0-31c5b21de7462dd2e4097196473c1344c650316e","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-V27dXU31hAdvEZ7uhpFbfBQ0pfUCjvxayYG1jYrKGuF5mky5XjNkKwCbhJiBroGs/n/PmCp+0XwfptBK9Nv3Dw==","shasum":"1741007fef1b106fbfe8b55f1b552dfd1669e718","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-31c5b21de7462dd2e4097196473c1344c650316e.tgz","fileCount":54,"unpackedSize":1182946,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCnc/2DR/2B9Sr17sBNx+qp5O0g6wGiF0/GZwRFD+hJXwIgMV3wVxWE9fz1ivHuA1VsZmaMNiQXJ9fkzQ2It9SCGfA="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjmMpJACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmomnw/+OFynFw/xbVhCPqOJ97vsCgR1jBBP9yomGTChqTEKT22wKK0j\r\nShNJqRdQuJmTwnHOVc7DtH+NoSzCQdEcI/chqYL5Hb2jMSLbT+R1scjIgB4R\r\nhTlFjiq5VCfWmxpIcLioUrPNXr4DgQB+9x3s4LsQ3ZhEdCF39UAvV1ihus9u\r\nvIbz1KAuNP7KMd17xeRaXsdTmfjUoIrfWVLNuJniwp+jVayzbJK6O6AjgCWG\r\nyiRcAd2DLWTcN/ihvJ04YpIzSvufGsnVNr81h+iWKMNahMyk+Ae1Ojyf+AZF\r\nt3Nc9+pdZmbyX+tJCeHYFyHN52pAHQuAh2wKomn4FfqJMBvZss9Z8bi0WysN\r\nCXk0wir23Z/e/893jX6/WH+oktlme7za6LarfJoNNp0tbmcTJcssFlAhHStg\r\nqiGB61md2sT/Gt31RtMQtU9HY8dyKz0ALMTQt1nexMaVLczY5uO3xm3G15MJ\r\nA4qhlW2xv7cJijqtNoZoiWbvoXHD+NXmNjx1iIEkh5mhS5sB0dvlK4EwWYSa\r\nBqkiyC2x71EbbA9PxPPwyQfo4svFDvJSADZoMuVvvNYQC41eh0tNM6nIVqPG\r\nfs29fXS6qx4cNw2XJz3ITDIFyBLQY4qv4vhFSX5PSvRh8i49IZcVS7Z1JTvc\r\nK57D2G/owGWjOwzk13e1TFHezTOfV4asJn8=\r\n=5qWs\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-31c5b21de7462dd2e4097196473c1344c650316e_1670957641553_0.04981228672429139"},"_hasShrinkwrap":false},"0.0.0-59f2e3ef182ece590d4a3965a98ceae00586b33a":{"name":"type-route","version":"0.0.0-59f2e3ef182ece590d4a3965a98ceae00586b33a","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://zilch.dev/type-route","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^27.4.1","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3"},"dependencies":{"history":"^5.3.0"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://zilch.dev/type-route\">\n    <img src=\"https://zilch.dev/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route</h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://zilch.dev/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://zilch.dev/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://zilch.dev/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number,\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string,\n    },\n    (p) => `/user/${p.userId}`\n  ),\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://zilch.dev/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App />\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage />}\n      {route.name === \"userList\" && <UserListPage route={route} />}\n      {route.name === \"user\" && <UserPage route={route} />}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>;\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>;\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a {...routes.userList({ page: 2 }).link}>User List Page 2</a>\n      <a {...routes.user({ userId: \"abc\" }).link}>User \"abc\"</a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://zilch.dev/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://zilch.dev/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://zilch.dev/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://zilch.dev/type-route/docs/api-reference/route/push) and [`replace`](https://zilch.dev/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://zilch.dev/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://zilch.dev/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://zilch.dev/type-route/)\n","readmeFilename":"README.md","gitHead":"59f2e3ef182ece590d4a3965a98ceae00586b33a","_id":"type-route@0.0.0-59f2e3ef182ece590d4a3965a98ceae00586b33a","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-zTavop4/l+7y3HMyR9ucN2OHfbGaIrUA+R6T7PzvvXbOAo5/gMaRS5HRlrHURrqYJKT/lOGIa9ijfuJQ7mYCjA==","shasum":"6ebdcdb49f364d780ef814408954c1fcded710a7","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-59f2e3ef182ece590d4a3965a98ceae00586b33a.tgz","fileCount":54,"unpackedSize":1182508,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD1tovPRHu56zxDHHeD+3NQ6MLbCHu1ET1+lo1rcZK+zAIgOA2IxiEAUFahwBuSod9jJmN0SeDUdCP3Jjwb0RNurGQ="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjmMufACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpcrRAAoHXQ353iLSb5aneFn05SR+0NGMAjdePvEMyqINTHxT9zV84N\r\nIGEwyeQT/grUXpiISn8OLMnnf5XCMu+YwQLrkHsZCw8y1Nf4OdQTMC3lgohe\r\nNJSvQp29o0d4WVD4vel9RMLUA/jSp5TEeBupXTMm3+SjrkE5w51/ixRjLwK4\r\n0VKH1ZJ01s62qRiP0is97FyjtsRnmj49JBEALNEakQgeTiseXKbvhN8rQijW\r\nMEICFC5UPHFYWPLmHJaBglQ//WTtAxqaYtMuHvx033cgp7jBq7apmQ8XGXZr\r\nNPpQJD0LJw2EEUFoBAAmTg6LXT3+psggE9QkTVfEj1GQClFk2aF9iWaWz8Em\r\nXefJtCbcALBA1iE96DF/g0MYLloNnG4JaNMxVqKcKdpFc6LAIAw8F+mXhviv\r\n3CcBDu6oMkbunmgkInr6CbXU7Xbx7WwQxCxKoI4d4ccL3qYQRJXOYC/BERhJ\r\nOKG40s/C2wk7F37fTCRWw0N12GN/X2HeVedxk0CrA0DUJ2ELeTB4AWssRqod\r\nqFsaxt98RmKuVsD8STa8RL8vB1riGW4333ZG6F2ul+0+0k5ksmBkk62SYraN\r\nUdh/GYJX8ExYKlpu1MJipRkeAeezFgzL8lVAjBCJITFei+xmIZpT4p/PfeDe\r\nyUt61Ii/tBHuqoIDDGAxLbxgQbX55R7NV/M=\r\n=r4L9\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-59f2e3ef182ece590d4a3965a98ceae00586b33a_1670957982687_0.05663723246098584"},"_hasShrinkwrap":false},"0.0.0-646ed07afbdd69252fc6abcf91ad60866732a304":{"name":"type-route","version":"0.0.0-646ed07afbdd69252fc6abcf91ad60866732a304","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://zilch.dev/type-route","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^27.4.1","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3"},"dependencies":{"history":"^5.3.0"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://zilch.dev/type-route\">\n    <img src=\"https://zilch.dev/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route</h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://zilch.dev/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://zilch.dev/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://zilch.dev/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number,\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string,\n    },\n    (p) => `/user/${p.userId}`\n  ),\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://zilch.dev/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App />\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage />}\n      {route.name === \"userList\" && <UserListPage route={route} />}\n      {route.name === \"user\" && <UserPage route={route} />}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>;\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>;\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a {...routes.userList({ page: 2 }).link}>User List Page 2</a>\n      <a {...routes.user({ userId: \"abc\" }).link}>User \"abc\"</a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://zilch.dev/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://zilch.dev/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://zilch.dev/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://zilch.dev/type-route/docs/api-reference/route/push) and [`replace`](https://zilch.dev/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://zilch.dev/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://zilch.dev/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://zilch.dev/type-route/)\n","readmeFilename":"README.md","gitHead":"646ed07afbdd69252fc6abcf91ad60866732a304","_id":"type-route@0.0.0-646ed07afbdd69252fc6abcf91ad60866732a304","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-EdEvtk1KwqPoBOHoxirXNOfzrYNU0AGOWilwzSNpUdWpKH0ojuZFCAkBRndwD8VB+BM3VYcZjbX5WnciAaA1eA==","shasum":"6fbd87a8f42cd5019118d328c9f563dfcc0a6437","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-646ed07afbdd69252fc6abcf91ad60866732a304.tgz","fileCount":54,"unpackedSize":1182508,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF/+b3nDEMrOPzOBXkgfjapOVUJFC5whqleu987b8HKNAiB1P34UcLcIy1unWA+s31QrCHt4sqizK3vJhuIKNlUciw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjmMwCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmojjw//TXHLFk19l38K/Y3DLQS/QBPPVKrY/WeuisNMBYquwHV+uAab\r\nlLPCesR0KIDsMAKB/QQVcCO4x9DqZ5GUCQzHEOFSHWyXybnFZsOa6RZ8Cfmb\r\nrc25+pjSqjkt3AJN6Rj/QwsDLdMYizb2PE3IvBI5rJI9v/1ZO4YPx02EkUm2\r\nF6t5dwdGSV/cIoMjTD+ZHudsKhsqPuMZyoi9Rl/aRqNWujoB/kgq/xcqN4l2\r\nEi1GDb6Df+0gKR2H5kFSt0cSSJ2xzRN4f0jgf6nQ8Ad1dAmSINfRGb9c/D+f\r\n/mQ0BvJGIwagUM2kinxXxBfX0VYrI5O7AEfQASZr1g63xXnEgfRphv3KPqkc\r\n24I75W5KBtMNyNgNKjEpZNGJ70teX3EaK0lRlNoXTS90bde5sLsN4zWaA6A4\r\ndsQUmjwiOD++TztjKaqXLCWok+PQVbiiRK8jXJwfyHssA6VIzUjR/s1NmMZ6\r\nz75ZSYJld2LiGbP/tGqd2UCSwGKfRLQufBsNWKqkaBtYJQZwlUH3SQRAIveO\r\nLgOHejgulSjsEA8sjSSDu/KoQeWr29+i8vCukHAPXu7GQpWj3F9nlQvy4jLQ\r\nCGV36Rc5vi2aVU3rWJANJPIzz8plxebtSuZ9kH7zU2oc68m7d0jgkYvGyMnq\r\nkwzGKdhaSYzUu/aKG4wKovG0tzwDo4sdwgU=\r\n=3xWm\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-646ed07afbdd69252fc6abcf91ad60866732a304_1670958082476_0.17318059193500757"},"_hasShrinkwrap":false},"1.0.0":{"name":"type-route","version":"1.0.0","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://zilch.dev/type-route","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^27.4.1","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3"},"dependencies":{"history":"^5.3.0"},"gitHead":"646ed07afbdd69252fc6abcf91ad60866732a304","_id":"type-route@1.0.0","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-m8Fm4c9v+kJCSbIIX3vDUeCISCCb7CRCBJ14733UVtZJuwFljzbSCHegh2KPm2Q5K6qYpOqKd7ypW2aQrFzENw==","shasum":"08a9e51139a3f957dc6ff58032c745f677a55911","tarball":"https://registry.npmjs.org/type-route/-/type-route-1.0.0.tgz","fileCount":54,"unpackedSize":1182467,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICKdEfKOXw778Xq/YVcgHkQyOrnoSSwh+Z9CQecrzZPyAiBBo0k1v0/NE8KkN8LJefKl45ZWBvh3ze2CKY5C1lOF4A=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjmMzxACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoebw//cN/mOKpu7f9A7WA8HwoPkEx5hIGmcRHKuWY5Eym2wV8yRp8g\r\nxogP2A9jXfvng+QvC0S+mSb/9SCv67YPi+7oWmL5to4zC8aeFyp8IzlRKJDd\r\nRSz2TVXCGt+897bHVNMSOlGagKyEOynCuLYdOrfPab45uHAPPVeDOQw9wvdk\r\nKr9bc2pc55A5JuCIgNWN5A6RMZqXSPnwcMGl9nt5h5sJRmKINO8aObcdEk27\r\nYAurPzL6DLsgdZxc+X/sPSgARBC9Udyp9/oc6AaVNoIizhoMFLhDJyL/eLt4\r\nBc9kFYPZu+4iEXp3X7ztHPxMu9igzpTkmvyZfwk8Rmg86ymHiB6ypqhe0rwq\r\nVi9Hrb+miIKF39O5YQxSd1TU/FTbFXkFwutOJDdz4IiSAhYehFbbk/t6JMMM\r\nZ/moFUhUOlsTrrXRo6RWMRA/QMm3naNFn/b5L5z9H51RojHygYpUj8bw47MG\r\nKAoehktLwzAl+6OFac8+abhJ7D3L8l0GRQ966ReUzRTXq6zDDMfX5dpR5IHU\r\nPUJVgFEkIdK/Cxm8ePy/pyhpneXAiNsX56hCBBVd1VrEf1om848RdRswIxIE\r\nyJaUXjiI+0MVTNeRcXw9ZWm5/c/Ul/rw+E72HHM7EDsC3OmkqgX+KoAhgozZ\r\nwwz+QPtkdpGC+r4wW41h7eAnR1y1taEw4Ow=\r\n=KAjH\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_1.0.0_1670958321035_0.012378479420086297"},"_hasShrinkwrap":false},"0.0.0-85a92d5ca8f51f993af8c2ed6a462d7af84cdfcb":{"name":"type-route","version":"0.0.0-85a92d5ca8f51f993af8c2ed6a462d7af84cdfcb","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://zilch.dev/type-route","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0"},"devDependencies":{"@types/jest":"^27.4.1","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3"},"dependencies":{"history":"^5.3.0"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://zilch.dev/type-route\">\n    <img src=\"https://zilch.dev/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route</h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://zilch.dev/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://zilch.dev/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://zilch.dev/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number,\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string,\n    },\n    (p) => `/user/${p.userId}`\n  ),\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://zilch.dev/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App />\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage />}\n      {route.name === \"userList\" && <UserListPage route={route} />}\n      {route.name === \"user\" && <UserPage route={route} />}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>;\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>;\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a {...routes.userList({ page: 2 }).link}>User List Page 2</a>\n      <a {...routes.user({ userId: \"abc\" }).link}>User \"abc\"</a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://zilch.dev/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://zilch.dev/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://zilch.dev/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://zilch.dev/type-route/docs/api-reference/route/push) and [`replace`](https://zilch.dev/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://zilch.dev/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://zilch.dev/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://zilch.dev/type-route/)\n","readmeFilename":"README.md","gitHead":"85a92d5ca8f51f993af8c2ed6a462d7af84cdfcb","_id":"type-route@0.0.0-85a92d5ca8f51f993af8c2ed6a462d7af84cdfcb","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-wS7PP5AdahcfQwB/ZlHhsKSxjKjOaWaOvjovq4Y+6+29UVtZXjcwNELwt6ioWS401zXaMIJgwmGkYRrBiW/7ow==","shasum":"17b0d2061891939ec1104bf360f35d98633bc35c","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-85a92d5ca8f51f993af8c2ed6a462d7af84cdfcb.tgz","fileCount":54,"unpackedSize":1182508,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGeEpka0Cqu6RDhBsIlGfoT/eEagy9isuozNbidpVn6lAiBhLSE0QoariGbxsJ2dhnwrzFb7IyAHvKYldOw64GXnGQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjmM9JACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqvtRAAo/OMjUXXnm8NeVxhg0wiyZ1C40LR+fkbumKOrXSJSwIrjRpo\r\nt8C7Kt5wddRFvzchK6WlhDCwOvWH2wEzTxyOxkqy4AhgZqMeQh91EizzUoc6\r\nsxqKQfq0kPue3eIw+6LV+qIZOQttFl2R1X46kFTXhjeSeeFhtIEZXN/uiouO\r\naiffNUmhLAdGtPlBmPHu5onFV9XEyDXi47iczgP98sqCNJKafv44ajDLnyUc\r\nRC3qylr4JZSdP/JDijVR9o7lNvZB8EHWnFr1ilQ0Dui0T729tu2szo2BMQAF\r\nxhehzugiy5vher5s6jz5MCU0IqrS4zIaxIybpciJlgiHkZybU0f4vx0RImiv\r\ncfZLCZ281d3QumXtgaIp0HBydeF1Vd9X0W1v0jJWKY0qNPM2FqzttfwD/hXS\r\ntFoRC/6gTacoeHldvASSgoIZcFMZQPW+FCAk7g0hwJEq4jLGnrJ1ouyvR8Ag\r\nKAgT2WKtMhFZ2GyKtBUwRphBv6fSf9rmknfP6nNzBqCLNXN2d6trbpPprXk1\r\n42u4IpQZxtJLqzUT4JSQmWBFXyrflGrBAsFDQEahVcPj8gbbADcwsuzdViMg\r\nbC0baX26xSgXjRa594SVXqFj+yk0GvdMWnpvCmgSe40PKfF1Gaf6sv7FqbpJ\r\n1vQcyDUiikAIdYgYDCt//tR7kjKuPEUiQGI=\r\n=DFcI\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-85a92d5ca8f51f993af8c2ed6a462d7af84cdfcb_1670958920976_0.899534963730257"},"_hasShrinkwrap":false},"0.0.0-fb9e9a368e807829b275bd771ee2dfa012f0a865":{"name":"type-route","version":"0.0.0-fb9e9a368e807829b275bd771ee2dfa012f0a865","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://zilch.dev/type-route","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","docs:dev":"vitepress dev docs","docs:build":"vitepress build docs","docs:preview":"vitepress preview docs"},"devDependencies":{"@types/jest":"^27.4.1","@types/lodash":"^4.14.191","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","front-matter":"^4.0.2","lodash":"^4.17.21","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3","vitepress":"^1.0.0-alpha.33","vue":"^3.2.45"},"dependencies":{"history":"^5.3.0"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://zilch.dev/type-route\">\n    <img src=\"https://zilch.dev/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route</h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://zilch.dev/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://zilch.dev/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://zilch.dev/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number,\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string,\n    },\n    (p) => `/user/${p.userId}`\n  ),\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://zilch.dev/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App />\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage />}\n      {route.name === \"userList\" && <UserListPage route={route} />}\n      {route.name === \"user\" && <UserPage route={route} />}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>;\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>;\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a {...routes.userList({ page: 2 }).link}>User List Page 2</a>\n      <a {...routes.user({ userId: \"abc\" }).link}>User \"abc\"</a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://zilch.dev/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://zilch.dev/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://zilch.dev/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://zilch.dev/type-route/docs/api-reference/route/push) and [`replace`](https://zilch.dev/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://zilch.dev/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://zilch.dev/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://zilch.dev/type-route/)\n","readmeFilename":"README.md","gitHead":"fb9e9a368e807829b275bd771ee2dfa012f0a865","_id":"type-route@0.0.0-fb9e9a368e807829b275bd771ee2dfa012f0a865","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-cNZWQJxPvX5LhQ3W0yzqb+xw6GTAyvvelUZcsMA+5KUl2NzOfPWdRll6835mcG25sWC4/Prbi8Tx+9tfTxrSqg==","shasum":"7227e454fd479f7c9299220dbbd0c1f724ccb033","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-fb9e9a368e807829b275bd771ee2dfa012f0a865.tgz","fileCount":54,"unpackedSize":1182782,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC1wH3CjIvW9sZTGj/LS4uVHM+EupsDVl9GVvqi+Z4n+QIhAMJTKPS4OwskyV3LJAEBO9q1JtFkHyNHW7enTm40Y+Fr"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjr4/2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqNzw/9HoH4Poq30oBFWqidqtUqgnPnhqwb71g8lgDafHc+DeXFzBt1\r\npiu+HvoZB8cr0BVKzeLPpYW0ALPzGc8n7ErkJfvXGLEgSS7dTpX9+gCOHRFH\r\nErLondyA+igjv5LLtB1c5v6LDsvfO+oq36L3r48quDFan72AgMOkkuKO1uoj\r\nT52zPchcVgqzjbT9fQ1KnZEM9y9EeSfuqRsAM+wCp7IvAZSeV5bNPt3ZT01s\r\nntK9Q+XxOd7trNvxXyRs6TM2bI4qaeOXQzoYDOQpSk74gQQ5jTPwkHbIjUmk\r\n/96fFuPOKRU2RJ6MgjXtw5Sc1NtQcidKrAGTbqLFItBuPH70MIIU8F2+mcmj\r\n7JRAM69jVDtP96Z4AUnjLbbQntNyDZ2OcEIVwL/whL4RR52aSOrh1CaetwVf\r\nkiSiuPxiNHFGpXRv8ry3Jx+NNTSG8jp42wa0aRgb4Jx7iu7YGSChcnD79GJ/\r\nBnB//QYqOrsrhtSaIn3z+Y9k1Fjn0xEdu8c54OQqsdz0tqoioDvElQ8mcH7G\r\nlhUazaERLP0FFdPhLbndvMQJb9n6eQ2fXzQHslGyKPGHT0r36EwNqEjPqSTc\r\nCRPB3WLXkaF2ENiU139GjddgEwv4Ox2kYxFQ9/jglCWaRRwzZvDwOFu3DnBp\r\nIYXXnd/uRLbNzo4Q1L42Vx+r7HiQXXbEVXM=\r\n=qLHI\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-fb9e9a368e807829b275bd771ee2dfa012f0a865_1672450038481_0.25982405558796073"},"_hasShrinkwrap":false},"0.0.0-55650ae4a889ca456b2aa69b4835ffd69979911e":{"name":"type-route","version":"0.0.0-55650ae4a889ca456b2aa69b4835ffd69979911e","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://zilch.dev/type-route","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","docs:dev":"vitepress dev docs","docs:build":"vitepress build docs","docs:preview":"vitepress preview docs"},"devDependencies":{"@types/jest":"^27.4.1","@types/lodash":"^4.14.191","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","front-matter":"^4.0.2","lodash":"^4.17.21","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3","vitepress":"^1.0.0-alpha.33","vue":"^3.2.45"},"dependencies":{"history":"^5.3.0"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://zilch.dev/type-route\">\n    <img src=\"https://zilch.dev/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route</h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://zilch.dev/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://zilch.dev/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://zilch.dev/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number,\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string,\n    },\n    (p) => `/user/${p.userId}`\n  ),\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://zilch.dev/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App />\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage />}\n      {route.name === \"userList\" && <UserListPage route={route} />}\n      {route.name === \"user\" && <UserPage route={route} />}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>;\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>;\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a {...routes.userList({ page: 2 }).link}>User List Page 2</a>\n      <a {...routes.user({ userId: \"abc\" }).link}>User \"abc\"</a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://zilch.dev/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://zilch.dev/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://zilch.dev/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://zilch.dev/type-route/docs/api-reference/route/push) and [`replace`](https://zilch.dev/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://zilch.dev/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://zilch.dev/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://zilch.dev/type-route/)\n","readmeFilename":"README.md","gitHead":"55650ae4a889ca456b2aa69b4835ffd69979911e","_id":"type-route@0.0.0-55650ae4a889ca456b2aa69b4835ffd69979911e","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-cWTp4tB2Q2FUQpbCn9C6TjmQXm42SjLAcjxyixvuRUwMCpMlzkHxr3/1PQIKi1tgmok8fiy/4TyYDxaBlLYI5A==","shasum":"fd24f77f12548d7494078c4b95c9f20819069ba2","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-55650ae4a889ca456b2aa69b4835ffd69979911e.tgz","fileCount":54,"unpackedSize":1182782,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB9+DuWJvdJepFZr+HWcyM5qC4RaOHVYYr0oMjPc1YClAiBpn+eq/Rez6SIiEet8oK0SstUS43KiUag5z7YpWyVcwA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjsJIsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqDsA/9H4NlRkAPb3DgQ1ohhsYDIjVnSoVuqTsv50IpY/ocZ2PQDhwU\r\nls9kGfZLtMnt9YdwP+o8mgDV/w5hAGIcTvt+IN241HD9J0Pcb9JGFRR6PdcT\r\nIw8eZKQy6Im5ZFfho51aRecK5/2jfk0AuEclFOLRXOZhiGeE5Qo8AmdxvHoJ\r\nH747EBd33yxkSGiURO6Dlfu1AtpeqJgoS8a3olJ/5yCpiW59bHYhXs2itwry\r\n3b2Cxu46j6bV0PuZEAs26snRWLjBcAM61dcwfdGKY4toJxYllweqlYsruhMl\r\nYxqVqRvL7alP9oe1zzU2DGnohRgF+Uiosb93sM7YP9Iuz6lW/g1iWqczbq8I\r\nUceKZb62YTztxTwAfXLytZ6M4cEA4OlIPbfcvmJKIY7r/v6X7jlr+FTHKOOd\r\nSqDxljvMtUzgmF2U+aQmD6vaV9UpCkignrMkk8kW7R26mHHjWEggW8tTxjMW\r\nDXfPZ/3B84TmPnjRlioWCl0VA6uWUMR7Ux/Npz9ln1Xu5k6SYvxUOzWyeKVc\r\n8eDWsFKGnnllcoioP+rlbfz8cZ3sG/cCCaja7Xszgqj6mHeH2qEwCXAzWQ60\r\nPWhI8QTdB9zMR8y4ARNlE0DkjutU6e7C4txvrVGHcX+QXpsFOf3sgV63aGrI\r\nFhv531jUshbX1AjpqHnKR7xKuJaFyWvhXSE=\r\n=OaXU\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-55650ae4a889ca456b2aa69b4835ffd69979911e_1672516140516_0.029871125041896596"},"_hasShrinkwrap":false},"0.0.0-9deaee242beeefd2dd8b68a8e99220251d84f645":{"name":"type-route","version":"0.0.0-9deaee242beeefd2dd8b68a8e99220251d84f645","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://zilch.dev/type-route","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","docs:dev":"vitepress dev docs","docs:build":"vitepress build docs","docs:preview":"vitepress preview docs"},"devDependencies":{"@types/jest":"^27.4.1","@types/lodash":"^4.14.191","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","front-matter":"^4.0.2","lodash":"^4.17.21","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3","vitepress":"^1.0.0-alpha.33","vue":"^3.2.45"},"dependencies":{"history":"^5.3.0"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://zilch.dev/type-route\">\n    <img src=\"https://zilch.dev/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route</h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://zilch.dev/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://zilch.dev/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://zilch.dev/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number,\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string,\n    },\n    (p) => `/user/${p.userId}`\n  ),\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://zilch.dev/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App />\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage />}\n      {route.name === \"userList\" && <UserListPage route={route} />}\n      {route.name === \"user\" && <UserPage route={route} />}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>;\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>;\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a {...routes.userList({ page: 2 }).link}>User List Page 2</a>\n      <a {...routes.user({ userId: \"abc\" }).link}>User \"abc\"</a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://zilch.dev/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://zilch.dev/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://zilch.dev/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://zilch.dev/type-route/docs/api-reference/route/push) and [`replace`](https://zilch.dev/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://zilch.dev/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://zilch.dev/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://zilch.dev/type-route/)\n","readmeFilename":"README.md","gitHead":"9deaee242beeefd2dd8b68a8e99220251d84f645","_id":"type-route@0.0.0-9deaee242beeefd2dd8b68a8e99220251d84f645","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-gqt0aJJF/oTsPilkrD7ESpQ8246S3DgNVUNiQ/Vr2U2petoqy6tNjt9MFJyDlKRvdRdf5apJ+LFTTZ3btEZfFg==","shasum":"fdd14fa61a53f8f3ee20e1f5eb1c46ee9635d919","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-9deaee242beeefd2dd8b68a8e99220251d84f645.tgz","fileCount":54,"unpackedSize":1182782,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA+kLFTBgpLN+yTIlSZKbtP4rgCZ5ZijVWj49nh/2mjfAiEArLZ0QAZHPyCQq8ewCuMvnUgOjkoHWLWEyq8qBaOY1ho="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjsJihACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrwhBAAnv5lgvVgJksSfJYzcMUqKsViLG8fbR9JuVQ/VUFOZGB71lQ9\r\nPTvOj5XsYSbC7apXAX7wkEgJXD0Ag+i7aNAtrNbbXEC7fXsrGM6Tbl/yRVzV\r\ngS3HphjFGkgcpaKofm9OjYczdx7o9RvL7HDudo86QS7a4988YII1EhqZy8z7\r\n2efw2PxIbp7aP/sr6aOZgywMR5VSMmmjfmd7BH9XIAHxB3sHdUuV02LTzq9V\r\nroG8DWRhT34DnPfCR6LcKKsh+2Uxq0rKn3bqOOrWPFflSkQwvBwxMhh0Xtut\r\nyCCDsU9NPfZr4NAmnorDVeMzHP4AYKGh4+U+k4OZ+GsYeGKKCJ3YvZbrmzHv\r\njHUGtFLzQSjt3vanvVJUPKjbUAWmrTnDjPTwEK4foHx7AwrBgBwsA4jNB040\r\n1425M4aZl0kd+CFTdy52nyVZgRS0JWJZ2bhHzwyoQ9BfO4H+DaFFXzB/Aqjx\r\ni5UflgNM1Rr9JxBKSY2VGVG1Jlg6Iuf/Uxdo56Z+qaPSPu/9lpJMXpSDRPi/\r\nlzOQMvcFDnGaxGv2m+8/s5Pe9wNcPKulpxSuFAYpSrHgS/GZk1FLXG4bRlF/\r\nyHNhCTAH+3nr3W1mpNpI+uJ+Pgm6v+Slg51dY6dxNIXAzhQhrRZuTTVgSWOs\r\nXq9GNwMaMtfOqjN78LIQ15K6RcpSBVduso0=\r\n=P/2u\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-9deaee242beeefd2dd8b68a8e99220251d84f645_1672517792835_0.17703515751753707"},"_hasShrinkwrap":false},"0.0.0-eb7d1aa4802d1821ef8a81f975fecfbbff31fc56":{"name":"type-route","version":"0.0.0-eb7d1aa4802d1821ef8a81f975fecfbbff31fc56","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://zilch.dev/type-route","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","docs:dev":"vitepress dev docs","docs:build":"vitepress build docs","docs:preview":"vitepress preview docs"},"devDependencies":{"@types/jest":"^27.4.1","@types/lodash":"^4.14.191","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","front-matter":"^4.0.2","lodash":"^4.17.21","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3","vitepress":"^1.0.0-alpha.33","vue":"^3.2.45"},"dependencies":{"history":"^5.3.0"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://zilch.dev/type-route\">\n    <img src=\"https://zilch.dev/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route</h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://zilch.dev/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://zilch.dev/type-route/docs/introduction/simple-react-example) page or see the [Type Route without React](https://zilch.dev/type-route/docs/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number,\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string,\n    },\n    (p) => `/user/${p.userId}`\n  ),\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://zilch.dev/type-route/docs/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App />\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://zilch.dev/type-route/docs/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage />}\n      {route.name === \"userList\" && <UserListPage route={route} />}\n      {route.name === \"user\" && <UserPage route={route} />}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>;\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>;\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a {...routes.userList({ page: 2 }).link}>User List Page 2</a>\n      <a {...routes.user({ userId: \"abc\" }).link}>User \"abc\"</a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://zilch.dev/type-route/docs/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://zilch.dev/type-route/docs/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://zilch.dev/type-route/docs/guides/programmatic-navigation) is possible with the [`push`](https://zilch.dev/type-route/docs/api-reference/route/push) and [`replace`](https://zilch.dev/type-route/docs/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://zilch.dev/type-route/docs/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://zilch.dev/type-route/docs/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://zilch.dev/type-route/)\n","readmeFilename":"README.md","gitHead":"eb7d1aa4802d1821ef8a81f975fecfbbff31fc56","_id":"type-route@0.0.0-eb7d1aa4802d1821ef8a81f975fecfbbff31fc56","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-RVmDBjtqcDP7ThtJFWEGJGnVRGH9qTLGRIpemii70dkgMXDoHhA87G0q9aHDm2G1Qtd4YPbtmhfpfBOPagRDOQ==","shasum":"5768d268222146681e8bce01fd65933154cda6fa","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-eb7d1aa4802d1821ef8a81f975fecfbbff31fc56.tgz","fileCount":54,"unpackedSize":1182782,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID6p4fxwwPAZL/yHe4QsEyRKT37p6RDwUnBpnK2CQo7mAiBkRfKenTHXLzZCiDAnosSvpUJfdTC1AG6XhsxQPv0T+w=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjsKCPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq7vA//cXhkd2+4PVE1FgblQDbqh0wdbe8/a8ppr6eIGYCR+L76OJBE\r\nAniFY1p7p/MKmMMJTe0zmrqsgnrCxRbFCgGBSMCHAsl3MCUYkfN/Gh6XAh6v\r\nibkKW7f1f2YCZK4w375nj6bRfpjuECgfQPnzP0SZKH7b64NICiOixO7f27tu\r\nLh0R4XkurOACvZLUnE08IFMyqz8xZHg2GyIe5wb1vMYdjCb1wH0BQc/fw4Uw\r\nsDwBnhnzuq2Bscmu7Zy4yK78vn6KdEtUnRLPiZPIFzshtpcZUAqopO4t+RrA\r\nFCBCJRYGcXzG4DYZ2jG9e9R0ZovsduKEMSfn0tffOutod41ATjioWMDw4eag\r\nL+2cYu45dkf2tObGzZF9pEqnjwW1mg6Ie7LlJBfPj0GXg2yA0O73X2Lj2qkR\r\nuX3XctYB1h/pCLmxIUo9P8p5iy11ooOEaiOBynI4geefN9dZcLWUX8TGBQaU\r\nzSwCWI38sj9pH5vVALL2nPnqvyhQlhNT1iba+zvr2GpS2zGOr/07Azml0oPg\r\niZZqP1WCVtObqZ2y04fWvlQ1t+lRP7QvufcUkPS7vPSguZOC5rxL2yn64yCs\r\neiYVFWFwPm3kmORY+7c1C/HF9C+VYbHGUtD2VxiMzUCPVKqGeQsyJkwc2eQz\r\nyPrqa8orYc+JrS8T68VYm5VbWVUaRuRW9eQ=\r\n=TC6e\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-eb7d1aa4802d1821ef8a81f975fecfbbff31fc56_1672519823716_0.3535944043302395"},"_hasShrinkwrap":false},"0.0.0-ee448e4a4fef2195014a9ad42ac5926e26067bdf":{"name":"type-route","version":"0.0.0-ee448e4a4fef2195014a9ad42ac5926e26067bdf","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://zilch.dev/type-route","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","docs:dev":"vitepress dev docs","docs:build":"vitepress build docs","docs:preview":"vitepress preview docs"},"devDependencies":{"@types/jest":"^27.4.1","@types/lodash":"^4.14.191","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","front-matter":"^4.0.2","lodash":"^4.17.21","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3","vitepress":"^1.0.0-alpha.33","vue":"^3.2.45"},"dependencies":{"history":"^5.3.0"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://zilch.dev/type-route\">\n    <img src=\"https://zilch.dev/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route</h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://zilch.dev/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://zilch.dev/type-route/introduction/simple-react-example) page or see the [Type Route without React](https://zilch.dev/type-route/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number,\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string,\n    },\n    (p) => `/user/${p.userId}`\n  ),\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://zilch.dev/type-route/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://zilch.dev/type-route/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://zilch.dev/type-route/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App />\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://zilch.dev/type-route/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage />}\n      {route.name === \"userList\" && <UserListPage route={route} />}\n      {route.name === \"user\" && <UserPage route={route} />}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>;\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>;\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a {...routes.userList({ page: 2 }).link}>User List Page 2</a>\n      <a {...routes.user({ userId: \"abc\" }).link}>User \"abc\"</a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://zilch.dev/type-route/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://zilch.dev/type-route/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://zilch.dev/type-route/guides/programmatic-navigation) is possible with the [`push`](https://zilch.dev/type-route/api-reference/route/push) and [`replace`](https://zilch.dev/type-route/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://zilch.dev/type-route/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://zilch.dev/type-route/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://zilch.dev/type-route/)\n","readmeFilename":"README.md","gitHead":"ee448e4a4fef2195014a9ad42ac5926e26067bdf","_id":"type-route@0.0.0-ee448e4a4fef2195014a9ad42ac5926e26067bdf","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-sC3m/SS5y/LwR5DiIZTDhWtrKCxuScZOJAidM8Px/7gAp3jkyonCAgJnM9ABA1G4tbnyAw5dAETSgg5ivpZQLQ==","shasum":"fc29e74d89df2eab0766ed0ebe7a058243c1e6e1","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-ee448e4a4fef2195014a9ad42ac5926e26067bdf.tgz","fileCount":54,"unpackedSize":1182717,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDGqGD9RXXlHHCAogdcG7m1g7YaO9XZN6ufENYllM/GsAiEAy7RK6ctxv85bMXRUYSNMSPuC46euqrCwikzMPYUbhw4="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjsZn6ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrihA/9HVKEZdLLrFa0hsMSEWPbdXoQ/3KZpEIM+dg61GTuzu9Mn/aW\r\nyjK/d9CZYV+towpr3sxYRdWVBMn6uKYJkTZzZ/jLVFwy4z89x79bJ5ROCYe8\r\nFqMYGJfh8cskCQIR9g5w8JZ25a3zq8R6l3yLRbHyVyYUOFdLIjbn3Qvw+j9k\r\nRJYJkSpoNdIJ70zH+58SoE8xfJggGgudIF9wAz+85PYO6b90le53t1sZMjdV\r\n1A4y2LBoLu8YUSNwKYE12svGaElwWhFQ6OCpJ16Vks/8M8mEm4BZP1VDBntF\r\nIQWYnbtVikjSSImXHMoLGAaPIl4LAexevhrGePHjmSYEC3zIqoNKShPPnR1z\r\nM7wN24a84Rz8oHWLXdbbcC+sEd+0g6vFLpoE58oJMwQDEFn1msOpRXm+IPpc\r\np+kj6++Qj6KY0/mgMc5/85HBcq82KLy1+bdUrzjO+B5ihyU1wy+gy3jTHa31\r\nujrRh+NkLugmVnMEOAeNb5YNvrxMBQLQQmZSW3R6TOfVnbahesWoF8AjYDzV\r\n3NeSN5JdhfLDQFMji2FczXbgL/hWZLROwADSxtJHJYf5OWr0ip6rEj5xToMp\r\nLddtT6ecHT6cu8Px2OiXtwuh7wIV4zhDtkRoEXALk1Q3nRr2oK7yB2cAPnij\r\nGjXmmQJiz5oMR3D1ZLuCFO5fiQUo4bB60e8=\r\n=Illd\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-ee448e4a4fef2195014a9ad42ac5926e26067bdf_1672583674103_0.31984625724955684"},"_hasShrinkwrap":false},"0.0.0-c4a39ad7536eadd000c961323fb78646d3796cfc":{"name":"type-route","version":"0.0.0-c4a39ad7536eadd000c961323fb78646d3796cfc","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://zilch.dev/type-route","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","docs:dev":"vitepress dev docs","docs:build":"vitepress build docs","docs:preview":"vitepress preview docs"},"devDependencies":{"@types/jest":"^27.4.1","@types/lodash":"^4.14.191","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","front-matter":"^4.0.2","lodash":"^4.17.21","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3","vitepress":"^1.0.0-alpha.33","vue":"^3.2.45"},"dependencies":{"history":"^5.3.0"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://zilch.dev/type-route\">\n    <img src=\"https://zilch.dev/type-route/img/type-route-logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route</h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://zilch.dev/type-route\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://zilch.dev/type-route/introduction/simple-react-example) page or see the [Type Route without React](https://zilch.dev/type-route/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number,\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string,\n    },\n    (p) => `/user/${p.userId}`\n  ),\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://zilch.dev/type-route/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://zilch.dev/type-route/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://zilch.dev/type-route/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App />\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://zilch.dev/type-route/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage />}\n      {route.name === \"userList\" && <UserListPage route={route} />}\n      {route.name === \"user\" && <UserPage route={route} />}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>;\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>;\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a {...routes.userList({ page: 2 }).link}>User List Page 2</a>\n      <a {...routes.user({ userId: \"abc\" }).link}>User \"abc\"</a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://zilch.dev/type-route/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://zilch.dev/type-route/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://zilch.dev/type-route/guides/programmatic-navigation) is possible with the [`push`](https://zilch.dev/type-route/api-reference/route/push) and [`replace`](https://zilch.dev/type-route/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://zilch.dev/type-route/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://zilch.dev/type-route/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://zilch.dev/type-route/)\n","readmeFilename":"README.md","gitHead":"c4a39ad7536eadd000c961323fb78646d3796cfc","_id":"type-route@0.0.0-c4a39ad7536eadd000c961323fb78646d3796cfc","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-rAsVTrnPEtKVz1llVALCuCDAhuvOTQia25RcuWT9lpVbcUjsx1bZzaYTHE2jcU4lsu7DNvIE0a8mSC2K++WhpQ==","shasum":"420a2e53053ecf9d153d811a0098545985c248f0","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-c4a39ad7536eadd000c961323fb78646d3796cfc.tgz","fileCount":54,"unpackedSize":1182717,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHuoerHeazFDMOHo7z3ZsEUTHQ3dwBd32SNMs6Di01aIAiA8LjeVi/c1fuQlSJJZmSyyFzHF3GnNAlp7DMWXQUvV9Q=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjsZ04ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmomyQ//chyLk9uixpIeb8lWkDWLq04KTo4U9+YU+YXLct2o5gjOmOfM\r\nYPFP9F0c4dVy+sEvctyxxPs9nNrS3M+XPlzkIzvG66UFoZIAwvg3OUep4HBd\r\n0G9P1YglgPjYVVNK6CmE4QxoBktTyz1gsl51waHw9jxzXAPn54PD8WXRPxRM\r\nLF4IldGRHZI5Z/rdj7ZSCxfP/3HZ7I2VvE9mfb+D5lRUYxsj7JeJTyUMUSg2\r\n9nytEKLw6ynKkKNyFqXM3jvRxR/S9GJUP5BfXgxhddIKxc5MzSoIf7BmbIS4\r\nNJMp3c8NRYYE5PYd8U7SoXCNong+/1n1mlVv7gfbqikYkomJ2bkcFJXPYU3j\r\nU95hWi7M2M/UZ2kulvm6a+CcSvUfcAUxIc1vCeTgCmkEKg62/J7MvLyFJH3K\r\nfRrOPKgq3EDgywRFhMz8euqksP7ATzOS9pQklKIIrt6IogaglH0M1UtREcdR\r\nc+QJwm3A0v7kkaGWhNAG51xZAMiGwUSAkhUAaIXWnWk216s/+n/I47q+liXE\r\nSBIDIkKc+ml4diprslR7V3VRp+BoPkzoE8w1UuK9BtrsoKmSDpWe51n1EhM7\r\nzKZixQHbxCf3Gkr45UN9OtkaySJpE0u09nSc/paFu9OJdTH2ADNIM1XlbzGF\r\n+ltG8eY99O8E68+D5P+4pCN37QlrP9GNMZw=\r\n=Edx2\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-c4a39ad7536eadd000c961323fb78646d3796cfc_1672584504587_0.46871032601755513"},"_hasShrinkwrap":false},"0.0.0-012e4b4cc129149e08e3db999b32d67e6a1f5be4":{"name":"type-route","version":"0.0.0-012e4b4cc129149e08e3db999b32d67e6a1f5be4","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.zilch.dev","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","docs:dev":"vitepress dev docs","docs:build":"vitepress build docs","docs:preview":"vitepress preview docs"},"devDependencies":{"@types/jest":"^27.4.1","@types/lodash":"^4.14.191","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","front-matter":"^4.0.2","lodash":"^4.17.21","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3","vitepress":"^1.0.0-alpha.33","vue":"^3.2.45"},"dependencies":{"history":"^5.3.0"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://type-route.zilch.dev\">\n    <img src=\"https://type-route.zilch.dev/logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route</h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://type-route.zilch.dev\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://type-route.zilch.dev/introduction/simple-react-example) page or see the [Type Route without React](https://type-route.zilch.dev/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number,\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string,\n    },\n    (p) => `/user/${p.userId}`\n  ),\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://type-route.zilch.dev/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App />\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage />}\n      {route.name === \"userList\" && <UserListPage route={route} />}\n      {route.name === \"user\" && <UserPage route={route} />}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>;\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>;\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a {...routes.userList({ page: 2 }).link}>User List Page 2</a>\n      <a {...routes.user({ userId: \"abc\" }).link}>User \"abc\"</a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://type-route.zilch.dev/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://type-route.zilch.dev/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://type-route.zilch.dev/guides/programmatic-navigation) is possible with the [`push`](https://type-route.zilch.dev/api-reference/route/push) and [`replace`](https://type-route.zilch.dev/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://type-route.zilch.dev/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://type-route.zilch.dev/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://type-route.zilch.dev/)\n","readmeFilename":"README.md","gitHead":"012e4b4cc129149e08e3db999b32d67e6a1f5be4","_id":"type-route@0.0.0-012e4b4cc129149e08e3db999b32d67e6a1f5be4","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-obDwQSj7Ty0n+yZWclcPb6+MIKKaNbJcrsctul47xfTs17vUXSGu1JGgmxSbj4mT/7+yhOWsBmwjkWzBB7b1CA==","shasum":"77bdb6d1178b6940acc6ea0fc65e476a8076a78f","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-012e4b4cc129149e08e3db999b32d67e6a1f5be4.tgz","fileCount":54,"unpackedSize":1182442,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCYc6NmpxzNKs60NAsp8WqtZeOL4adDOefJFYUAVBB4RwIgQLYiqkhOKoJSTYppDDVJyIBmPyAJg9SybOEAfnlmwhM="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjsdIeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpPhhAAhO/8lPsxTNDI+0C98GwQyI7hFMeind21NcU/GvFQfvQrvFMz\r\nLZD5WyKiZyqA4uES0EaOciF6+y42Y/yzMUXbhDLVCX9jh3Bi87Lrb+NpJtkx\r\ngl6Fz46Of9wp0s1wVYphjQoklFcp4aJ3zTmqP+95z2+im3wGksxUuK8QxOLe\r\nMYcBZ18Vagic4nLGTZkQJq+aklauv5DYmhpumiCQVGXVI2xkS06aMbXERYs3\r\nwDNIGWYSkgtOQ3tQBlq9YJEwT038fI65I0Xkq4C/G0U/IQqDdx+MCkc2502w\r\n93OoqxusrM9/yl0krFmCyoNVbrVrBP97NBi/mvs8CJJ7++YWlwUGlRnK+joh\r\nfco/dRBG248RJJwetw0U+bq0PiHBZC/QomYbTFat3YDhqD/MwP7ADAvT1CSC\r\nu2p2bqIeuCwydM737Uz9d1dKBosCHZ2v4ymcSofCkwCUG6zdxnIZfPgcyjf2\r\nV/3fEmvwKbcRH3B4Zl0A3eQjeDX/zBzubog4abhUrcP+lR4Z+63paubwad+T\r\nSZqVaIr+O0EU8saLxk8FK0M4c1M8gAxOCRWb3qqKvTV+6WOzyPoCQQfDHu31\r\nz8giXLlAF9HOtja7wKjVsk6rEeQSqewjRJquNyLt+VXtis8wQR2fPnJdEwhZ\r\nS46DRKNk5PKJ/5KiF0NZDCQecBRm6arzuEU=\r\n=9Spx\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-012e4b4cc129149e08e3db999b32d67e6a1f5be4_1672598046074_0.2623075792356311"},"_hasShrinkwrap":false},"0.0.0-3e61fd338717c428b1f7a46fc639c20a4aa9bdab":{"name":"type-route","version":"0.0.0-3e61fd338717c428b1f7a46fc639c20a4aa9bdab","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.zilch.dev","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","docs:dev":"vitepress dev docs","docs:build":"vitepress build docs","docs:preview":"vitepress preview docs"},"devDependencies":{"@types/jest":"^27.4.1","@types/lodash":"^4.14.191","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","front-matter":"^4.0.2","lodash":"^4.17.21","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3","vitepress":"^1.0.0-alpha.33","vue":"^3.2.45"},"dependencies":{"history":"^5.3.0"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://type-route.zilch.dev\">\n    <img src=\"https://type-route.zilch.dev/logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route</h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://type-route.zilch.dev\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://type-route.zilch.dev/introduction/simple-react-example) page or see the [Type Route without React](https://type-route.zilch.dev/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number,\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string,\n    },\n    (p) => `/user/${p.userId}`\n  ),\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://type-route.zilch.dev/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App />\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage />}\n      {route.name === \"userList\" && <UserListPage route={route} />}\n      {route.name === \"user\" && <UserPage route={route} />}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>;\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>;\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a {...routes.userList({ page: 2 }).link}>User List Page 2</a>\n      <a {...routes.user({ userId: \"abc\" }).link}>User \"abc\"</a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://type-route.zilch.dev/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://type-route.zilch.dev/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://type-route.zilch.dev/guides/programmatic-navigation) is possible with the [`push`](https://type-route.zilch.dev/api-reference/route/push) and [`replace`](https://type-route.zilch.dev/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://type-route.zilch.dev/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://type-route.zilch.dev/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://type-route.zilch.dev/)\n","readmeFilename":"README.md","gitHead":"3e61fd338717c428b1f7a46fc639c20a4aa9bdab","_id":"type-route@0.0.0-3e61fd338717c428b1f7a46fc639c20a4aa9bdab","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-236H9ixem/Mc3LdF+K+WJgrTcd5AQMUm9sxwIRRgwRWyjULI5MuRjjtP3JW4+TYqxoEepIRC8XiLcuUv/Npwwg==","shasum":"d12647873531aba94257473f4a60f4d042b701e8","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-3e61fd338717c428b1f7a46fc639c20a4aa9bdab.tgz","fileCount":54,"unpackedSize":1182442,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD779VLw+aUbuEEMfWSESN9EOyggH+QFjn4Tw1OgYh6tAIgRfOPjdjyH1IB0vaEd3RO8OYg0zjKdZp6rBfcJ0seflk="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjsdsPACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoD7BAAmkNZLC+wNxMwBBThXHKyLDETobSZCQTnbas/7RLJlhweGN9p\r\nGNEJBZS1d5pwtIHw+A+QDRW1x12bR8ZNc8mr4xNQ3Tg0L0XTSQKAd/UiqWvm\r\nK41fjv4pdkwn7H+7ZMhe8b7kucwW3dYO+rwx3PcFOWm/OK4iMRdVZncxQEkm\r\nrvuMlEZKiOGXa6vv96NLEA3cQ0Hsj2TTbGWE5ppseXpaAVjF8ypj75S2HBtD\r\nTQqwr9/4heM+MvdkgHQgPUew0/LYCW0+bxcNKFsI5FHeAjJpUx7tJdyp3pMG\r\nrm+ZYPBAZxGVOrCBbGWygCVpvr4G+VgAgfq0l3EyBt3s4V+fig+OWG/77WU6\r\nPJwOjxNp0KmTwQAg1Yavf1ULU0TWt+aNcTXB6vplWqnHgfcwVtutXcUGz96v\r\n0dICVo9ZxY7xkpQumxgvTiEXpqDjIYQ6eRfCa/2nx5vjq2KfFjnmYPC0uNCn\r\nOYbjlwc5jJ7au13/Rlc2SDI32Jqbr5TUKVreMuUmWMeim/9/P+PlIPkf9e2w\r\n8GM+dCsVeLnu7IQNX+cBOdU7O+M4x1vB4WaJOvwDiAh4IVw446uxAVmoJ64H\r\neCC7W8EqucqmXFz6tPPtK8V6CnseTZoGOZChNOjpkAnXc1/8g96VAiKtbuJs\r\n9x1VarEi1vYqDgcA0+Jy1ufRXLvTJuWm6C4=\r\n=H/4U\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-3e61fd338717c428b1f7a46fc639c20a4aa9bdab_1672600335498_0.60722533346187"},"_hasShrinkwrap":false},"0.0.0-bc3522e685cf106788b3be64db23771eed3b52a2":{"name":"type-route","version":"0.0.0-bc3522e685cf106788b3be64db23771eed3b52a2","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.zilch.dev","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","docs:dev":"vitepress dev docs","docs:build":"vitepress build docs","docs:preview":"vitepress preview docs"},"devDependencies":{"@types/jest":"^27.4.1","@types/lodash":"^4.14.191","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","front-matter":"^4.0.2","lodash":"^4.17.21","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3","vitepress":"^1.0.0-alpha.33","vue":"^3.2.45"},"dependencies":{"history":"^5.3.0"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://type-route.zilch.dev\">\n    <img src=\"https://type-route.zilch.dev/logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route</h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://type-route.zilch.dev\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://type-route.zilch.dev/introduction/simple-react-example) page or see the [Type Route without React](https://type-route.zilch.dev/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number,\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string,\n    },\n    (p) => `/user/${p.userId}`\n  ),\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://type-route.zilch.dev/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App />\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage />}\n      {route.name === \"userList\" && <UserListPage route={route} />}\n      {route.name === \"user\" && <UserPage route={route} />}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>;\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>;\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a {...routes.userList({ page: 2 }).link}>User List Page 2</a>\n      <a {...routes.user({ userId: \"abc\" }).link}>User \"abc\"</a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://type-route.zilch.dev/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://type-route.zilch.dev/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://type-route.zilch.dev/guides/programmatic-navigation) is possible with the [`push`](https://type-route.zilch.dev/api-reference/route/push) and [`replace`](https://type-route.zilch.dev/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://type-route.zilch.dev/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://type-route.zilch.dev/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://type-route.zilch.dev/)\n","readmeFilename":"README.md","gitHead":"bc3522e685cf106788b3be64db23771eed3b52a2","_id":"type-route@0.0.0-bc3522e685cf106788b3be64db23771eed3b52a2","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-cAFsoKZFYRQhr1BxarKTHWlSphQcv0ppgtmAoJTXL4EUyDn6doy0kDDGBQJrgkiajV7FuYnCbOsz1DcTgAK1xw==","shasum":"216ac3d206c224f8d4f876e77aac06a484dbd185","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-bc3522e685cf106788b3be64db23771eed3b52a2.tgz","fileCount":54,"unpackedSize":1182442,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDgl57gf0pr36et2i1dTo5ZiKy2ga/2wRBWJgn5Ib9QAIhAMt9vz3hyWzDzy4lgqWwgwRA8VOlGhG7LESTr1KXpWy3"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjseQIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmryQQ/+I2OUBXUiIl/Ygm/CEyq7fy3XSrw92a8xMvHi33lbAn50M8fP\r\nyRMSMR5Bp8p31Uph/1VKjUbgcPIO5F21Cu8P8fYjRNIB53Fmt6C0B2Gd99VX\r\n0wQvjqpQJKOSGct+ClHZvJiOFOjnB/yF1ZPrmeAQrsAPShWN0iKXN0q0nDtl\r\nwaYfXERpre5r5XtefZXAor9WEtKiS36iDK60fZDcNEwAYFHQCFIT/4/xP8OQ\r\nRIWWiLKunGUcdoEwUUlf8YOVB26pkCDEPSyPsk56R3R/tmOOqGKbQST/O7hD\r\nFlc3fWOSFRgf5PzFerOwX+MRgCI22+jPOfwKXnv2L9jbxAKfwYN3kvfCnhzL\r\nKYmWc4EhNEilgiYVUBUZWlur8TTP5psvg49o+Fux4um9xJsKcW05R7ZxARsO\r\nW1zimP2PnIOljwQ8NH45u5BY6iHRb5dZ43tRqRDPZXgTDCbPViUw1YYlamhQ\r\nNU/cv1AVsc+xV3L8vpWGwkiz8JnYoqo3/KmGrIAAB/FhApXcP2qew1mnEQOO\r\nJKw9Aw23jaf8vqalSxbltha5fzqCkJE7Mfn01L5pBsmLWXqMqZ0HNiLuW9pn\r\n01yX1eYsQbxGSjCerXwrKtN5AzynXDGt7AFU2B95p76r2E5/b9/H9omvjpnK\r\nbF2uGxzoiPGu3hSQMy6lKCgyyJXLTXbH50U=\r\n=oqiL\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-bc3522e685cf106788b3be64db23771eed3b52a2_1672602632006_0.2943040159649606"},"_hasShrinkwrap":false},"0.0.0-b810bc1d05f5dda312ccdde7d31989e8f63c3544":{"name":"type-route","version":"0.0.0-b810bc1d05f5dda312ccdde7d31989e8f63c3544","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.zilch.dev","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","docs:dev":"vitepress dev docs","docs:build":"vitepress build docs","docs:preview":"vitepress preview docs"},"devDependencies":{"@types/jest":"^27.4.1","@types/lodash":"^4.14.191","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","front-matter":"^4.0.2","lodash":"^4.17.21","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3","vitepress":"^1.0.0-alpha.33","vue":"^3.2.45"},"dependencies":{"history":"^5.3.0"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://type-route.zilch.dev\">\n    <img src=\"https://type-route.zilch.dev/logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route</h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://type-route.zilch.dev\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://type-route.zilch.dev/introduction/simple-react-example) page or see the [Type Route without React](https://type-route.zilch.dev/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number,\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string,\n    },\n    (p) => `/user/${p.userId}`\n  ),\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://type-route.zilch.dev/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App />\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage />}\n      {route.name === \"userList\" && <UserListPage route={route} />}\n      {route.name === \"user\" && <UserPage route={route} />}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>;\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>;\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a {...routes.userList({ page: 2 }).link}>User List Page 2</a>\n      <a {...routes.user({ userId: \"abc\" }).link}>User \"abc\"</a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://type-route.zilch.dev/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://type-route.zilch.dev/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://type-route.zilch.dev/guides/programmatic-navigation) is possible with the [`push`](https://type-route.zilch.dev/api-reference/route/push) and [`replace`](https://type-route.zilch.dev/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://type-route.zilch.dev/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://type-route.zilch.dev/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://type-route.zilch.dev/)\n","readmeFilename":"README.md","gitHead":"b810bc1d05f5dda312ccdde7d31989e8f63c3544","_id":"type-route@0.0.0-b810bc1d05f5dda312ccdde7d31989e8f63c3544","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-jrEpUwaynDCaRmnbVVwwzFzq1kNS44FKFHQVWo65QBJvQsWuNl32712LIr+uH9Ly6y2oHKf4AEg6SsGpFEuaWg==","shasum":"ec59801d2ded9d8b87e7ac835491b03db8c66499","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-b810bc1d05f5dda312ccdde7d31989e8f63c3544.tgz","fileCount":54,"unpackedSize":1182442,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICXX58xrQektYbWuD+HpVRvAuSeZX974kUz5jQJFAdbmAiBnPNp9yJvIKIXBhk7IYlHAhkxXTEADEJnGb4AjaoQDNg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjsed3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpTPw//ekXaXkkwawRDUutIiL/wngx+ZWI4n3FAYtBaWyRSDTcC3oGF\r\nH/Y/utHcAlARI8u8uk0ILSKbNwgQjjngMuHYLaw2s9WT180SG0zfVlGC3pxy\r\nnXAShLcVL3oglyr27NMTvVB9LDnKYkUJJwn3bS3JmVGaNNDwudIzSLamJ6+g\r\n8SZrMEKiJ3RjjOFrR+88Cc160nV9Cbr+TFXUacZuXtCQ5JwnWsnvijAviujQ\r\n/vOvJ5zYB6I905fQVl6X+lPCz0ma7Eng4vE39E3jRc4qdE9yzPiP6cae2VAq\r\nNhIn3mIDwlEXHC+TEBEKI8m3FVtIjdbN+uo5c3pR9lmzNrZGz1nJHTesLis9\r\nAcMBkOI8PdXy0hTmIgpiHqZqapVTR7eJIsyCD5a/h8dML5PXUcAFI2pp0Yd1\r\nKKp5MtVIasPPBvE7TtaKQEkbt3Xjmp0QjnaRgZoBZkv7J8pWVEfMacCEoOxc\r\nlczi+K32/j9HLE7ZIMsZb0bi1nOqnv2op4twpUYrbvK3ulhPSn4ndehhUyHO\r\nF6rn8uuK7sH2gWRu2c4NzIjGttwiylFJ4WWTYmpr7MS4/P8TmjeDjfy8if2G\r\nJMi3zvkIKBrdB/vG6pLVeIr64HhWtY73JHngcRmxa2cfzvxR5JOapQH84tqL\r\n3lq/dMSskgKXQ7ynBWzrm4LRCIbpSaikf30=\r\n=dunJ\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-b810bc1d05f5dda312ccdde7d31989e8f63c3544_1672603511670_0.3804918069402059"},"_hasShrinkwrap":false},"0.0.0-1d33ee4cbcee4eecfa0180bf7e601052e5119210":{"name":"type-route","version":"0.0.0-1d33ee4cbcee4eecfa0180bf7e601052e5119210","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.zilch.dev","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","docs:dev":"vitepress dev docs","docs:build":"vitepress build docs","docs:preview":"vitepress preview docs"},"devDependencies":{"@types/jest":"^27.4.1","@types/lodash":"^4.14.191","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","front-matter":"^4.0.2","lodash":"^4.17.21","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3","vitepress":"^1.0.0-alpha.33","vue":"^3.2.45"},"dependencies":{"history":"^5.3.0"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://type-route.zilch.dev\">\n    <img src=\"https://type-route.zilch.dev/logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route</h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://type-route.zilch.dev\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://type-route.zilch.dev/introduction/simple-react-example) page or see the [Type Route without React](https://type-route.zilch.dev/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number,\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string,\n    },\n    (p) => `/user/${p.userId}`\n  ),\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://type-route.zilch.dev/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App />\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage />}\n      {route.name === \"userList\" && <UserListPage route={route} />}\n      {route.name === \"user\" && <UserPage route={route} />}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>;\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>;\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a {...routes.userList({ page: 2 }).link}>User List Page 2</a>\n      <a {...routes.user({ userId: \"abc\" }).link}>User \"abc\"</a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://type-route.zilch.dev/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://type-route.zilch.dev/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://type-route.zilch.dev/guides/programmatic-navigation) is possible with the [`push`](https://type-route.zilch.dev/api-reference/route/push) and [`replace`](https://type-route.zilch.dev/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://type-route.zilch.dev/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://type-route.zilch.dev/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://type-route.zilch.dev/)\n","readmeFilename":"README.md","gitHead":"1d33ee4cbcee4eecfa0180bf7e601052e5119210","_id":"type-route@0.0.0-1d33ee4cbcee4eecfa0180bf7e601052e5119210","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-WZep+sMNpIhXKJ9np11l7L/RC2eUm4jMWzKS40bNbhf6i4uJVNArD13HMazqZ/D0MT9B85m6MsMZzZ4ECg+wxQ==","shasum":"e027d109194a6315876eab355b30ba55c5278be7","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-1d33ee4cbcee4eecfa0180bf7e601052e5119210.tgz","fileCount":54,"unpackedSize":1182442,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFIfCHymJEV21Lr80i6QndlAhlBsp0d5h+fG0OOct/WgAiEA7rQD4Rbb8QlJKshCsn4B2K6j3Ldnwh3Fvjo4zXIn+o4="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjsfe7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr3LQ//calaB+5DJAxFJUXu0Ful+/znCnS8qoN34tzA9nuyAR7T0xnk\r\nVDL0T4tTnnySzediIOtq7vCD3tz0VpWBxZMjsnqugo1vISLoWZIoIwL/AF3P\r\nSGhoU7NNIZDquGFVCpotNzRWzqoj4w6P1JDkFwFvRzQgG6bIC3LNNmKYJMq3\r\ngHHXS8OoH86WLN2chNLoZ/McsDAa0abrGv+npVcXmXPASuTek43CO+axozbY\r\ndVNYknmnpGdENr96DxbychFzBOwnDb/7zxy4e4DIoT6ioqL0wvLm4co35qW1\r\nxAP5J179XDwSbsMjF36MZQn/FV3obzF8hRTpE7y8teD3hBlcvh0HylnyXAeE\r\n4pR1BaPKBY2ooMs8lJeT3tzufFMlD6fwnCRM3makkSHckK5LDNPL/j9bRo+5\r\nbHI64cEcf61aPpa3T1A916WKViI/R0rt+rD540W85d/ticwg7LWEPrNRCEBR\r\nAlS1RB55kSErpF9u6awNdL9D1kbwWADFD4uhBNBfxsEIyYafwxGXv9Is3nuj\r\nNHg1eH2c+cTdqQhBKqktDTEcuUB6tppQEXCz+6YCuHkDgPjusrzlXA/TF/Gc\r\nYuhi6NL6BrabN1D/O/KRwBHZ06u8k7ltZRSgTznqF4SdQOJlN0eQ+JHRcNsF\r\naXQ6nagceJg/pdeWqkIDKNw43vnMmK64ebk=\r\n=VnyT\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-1d33ee4cbcee4eecfa0180bf7e601052e5119210_1672607675186_0.32489229891362603"},"_hasShrinkwrap":false},"0.0.0-e4f94108497a6705a01f7d1a48b72ad7f22d8003":{"name":"type-route","version":"0.0.0-e4f94108497a6705a01f7d1a48b72ad7f22d8003","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.zilch.dev","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","docs:dev":"vitepress dev docs","docs:build":"vitepress build docs","docs:preview":"vitepress preview docs"},"devDependencies":{"@types/jest":"^27.4.1","@types/lodash":"^4.14.191","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","front-matter":"^4.0.2","lodash":"^4.17.21","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3","vitepress":"^1.0.0-alpha.33","vue":"^3.2.45"},"dependencies":{"history":"^5.3.0"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://type-route.zilch.dev\">\n    <img src=\"https://type-route.zilch.dev/logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route</h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://type-route.zilch.dev\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://type-route.zilch.dev/introduction/simple-react-example) page or see the [Type Route without React](https://type-route.zilch.dev/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number,\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string,\n    },\n    (p) => `/user/${p.userId}`\n  ),\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://type-route.zilch.dev/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App />\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage />}\n      {route.name === \"userList\" && <UserListPage route={route} />}\n      {route.name === \"user\" && <UserPage route={route} />}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>;\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>;\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a {...routes.userList({ page: 2 }).link}>User List Page 2</a>\n      <a {...routes.user({ userId: \"abc\" }).link}>User \"abc\"</a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://type-route.zilch.dev/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://type-route.zilch.dev/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://type-route.zilch.dev/guides/programmatic-navigation) is possible with the [`push`](https://type-route.zilch.dev/api-reference/route/push) and [`replace`](https://type-route.zilch.dev/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://type-route.zilch.dev/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://type-route.zilch.dev/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://type-route.zilch.dev/)\n","readmeFilename":"README.md","gitHead":"e4f94108497a6705a01f7d1a48b72ad7f22d8003","_id":"type-route@0.0.0-e4f94108497a6705a01f7d1a48b72ad7f22d8003","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-XUL9hF4zbnonHEzyOLXYjqWdozIh2n2wQ0IV2/wK5AVQ4RnSRGELme5hfWobMGeNJp6IzSQ6OBCG5nsF1dppfA==","shasum":"21d6a9b3647eefa5a88d3804fa609b057bf889d8","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-e4f94108497a6705a01f7d1a48b72ad7f22d8003.tgz","fileCount":54,"unpackedSize":1182442,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDtwnD4JvzoKvL+jKkTSNNxRBuap9pUOR1lDXDk6KzFIwIgZcLzQ6Cf0PopsLseLugEF8xn9bKk6Wf3MNSjw1JfzGk="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjsfxMACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrLuQ//ZLJKeukeUE/mSlnfc7huhX+9K/WPIC8YIlmuTs8FV2z5sKnu\r\nUvodZ1vC8DdRL+cVIIz+duJBbeH+szdFefmHfiA//t8SaEQ8HtkSEWzWhYnu\r\nbHaiFYI7Zev0oKoi8CHfYAtfnZbW9eNEoRrbtIvylR7xTczomC8WObdUGzM8\r\nIAhvQmyZUVqBXPSXzUIZUxsrgDqp5w6k07g58DcRmg9+WbmVK/eMMT2ukQUF\r\ngqrzppZjF3hpDTwISWvvTFUZ5/V4iwbNSMTL5rUQmp7BN0d2G1nDEOu6gJKl\r\nQEF+7ODtjUOwm7/G5qwmUCpWOWvHNKTYR4QxZWYMhzrmydjbqNlCJ7IgoKj9\r\nfQp2Qz5TorG0bkvRzDdXjkZ0BniqvE30LK4lyycBljXRX3Y4OmOGfWRraJ63\r\nNJHEqSsfBZVXe/wjeoT3TMVIZ+yarihVVQruyVXVZ5OWIxbVD91LCX7qFItQ\r\n3YPwyh5lJV+ObaFmAZ8JlVExXhlFbCGuJgpzHIuvufft8ALhbmf0tzRNk9vQ\r\n4aCPYGUaiyavATEm8IdTm5cDe/8v/O87seXwLXio+tSzx7lTbBZfuSlvGNku\r\nSWuHA/nYGQRWuvJpAiuLB0Y6oAGI6+BP6JCzoN4Aw6XXXJjjw6XIpS85uBx9\r\nzFBvxWRJy7O5u/vHjYkasbbmjWux4HJVm84=\r\n=3eFB\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-e4f94108497a6705a01f7d1a48b72ad7f22d8003_1672608844756_0.3611306158251737"},"_hasShrinkwrap":false},"1.0.1":{"name":"type-route","version":"1.0.1","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"A flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.zilch.dev","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","docs:dev":"vitepress dev docs","docs:build":"vitepress build docs","docs:preview":"vitepress preview docs"},"devDependencies":{"@types/jest":"^27.4.1","@types/lodash":"^4.14.191","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","front-matter":"^4.0.2","lodash":"^4.17.21","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3","vitepress":"^1.0.0-alpha.33","vue":"^3.2.45"},"dependencies":{"history":"^5.3.0"},"gitHead":"e4f94108497a6705a01f7d1a48b72ad7f22d8003","_id":"type-route@1.0.1","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-8mVNfsQeMxlG2BoSU//VrDjNo74NeKAEI9p/7BH6H1VMYFJF8MgM+Q1eeTu1UsjZtr7jGA1whHVUe82fJb0V8w==","shasum":"02164dddc72e62dbb88d083e539137279cdd5deb","tarball":"https://registry.npmjs.org/type-route/-/type-route-1.0.1.tgz","fileCount":54,"unpackedSize":1182401,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDjoNbwOXkkmsd3SDS0rZV1r3tTlcUNVp/ODr6FHqI9KAiANR4NuTTqY6PM7aLdcNCPUf0edidki9TkUWM7XwtIQTA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjsfzeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpLRA/+KlQKioZ/gActhk5DfJXTamsr5n9va6TZY9SGcMqGD5bkkmNV\r\n1R7nG2fvDi1tX0kQXm/IgHWeFv/3p8jmnRMnHBeuP5iHcNJb0KGH7HGH++c7\r\n9eCVAmO1CYm1TX/MFc2DzEyhALXl1XOWmPnUjqAnoymcizzLHcM36JL33YqJ\r\n7YAfDChTHo5FBfL/FUyrYv+EtpHVSJyZL226thx1xNlnDxFmkakI6NJvcKLo\r\nQIku1Y+qpo6p7At/3NLbXH1F75/KvVKg4Vy6+LahA+zNTlY32ChUzJJi5YLh\r\n9keRMRUNARBi4xPImGpI8427PN6sZNKF70kEaNZJIZiOeHORydAOhf2h+NHg\r\n9ZVuSFbre1QeLFi5IOLn+Pft1TtRvLb6+BYRHNBwCvYjH1kK6WXedf+a4Csa\r\nswnrPYxNSNAEOgAlFVZqtyQhmJudooYfTzn7s0DlC0mY1FvxZPZoWZfE37gk\r\nlL1YgtIWLjQRRnDLiJMenLUTVdJoykionOuV9zXCstX2saBIIHnrUsYDrA6I\r\nBFZL7FK7ZSUL5XU/wQxHIV+RoR5iI4ByoDt1f93yliO4iipEpV1gNy69FCA6\r\nZrpEaoq73WVzqUSD9ExNfDaB9ADcTw5D3+Qh5RnA7BUu70r/LusJ/4JUq/yG\r\nlkekFvGbIdnSgThSrIgI+j++0mK/ytWr5Eg=\r\n=kOhw\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_1.0.1_1672608989781_0.5066383988473029"},"_hasShrinkwrap":false},"0.0.0-2fd8ef51c7f54f29babec69902570dfbd97bbea4":{"name":"type-route","version":"0.0.0-2fd8ef51c7f54f29babec69902570dfbd97bbea4","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"The flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.zilch.dev","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","docs:dev":"vitepress dev docs","docs:build":"vitepress build docs","docs:preview":"vitepress preview docs"},"devDependencies":{"@types/jest":"^27.4.1","@types/lodash":"^4.14.191","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","front-matter":"^4.0.2","lodash":"^4.17.21","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3","vitepress":"^1.0.0-alpha.33","vue":"^3.2.45"},"dependencies":{"history":"^5.3.0"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://type-route.zilch.dev\">\n    <img src=\"https://type-route.zilch.dev/logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route</h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://type-route.zilch.dev\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://type-route.zilch.dev/introduction/simple-react-example) page or see the [Type Route without React](https://type-route.zilch.dev/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number,\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string,\n    },\n    (p) => `/user/${p.userId}`\n  ),\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://type-route.zilch.dev/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App />\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage />}\n      {route.name === \"userList\" && <UserListPage route={route} />}\n      {route.name === \"user\" && <UserPage route={route} />}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>;\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>;\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a {...routes.userList({ page: 2 }).link}>User List Page 2</a>\n      <a {...routes.user({ userId: \"abc\" }).link}>User \"abc\"</a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://type-route.zilch.dev/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://type-route.zilch.dev/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://type-route.zilch.dev/guides/programmatic-navigation) is possible with the [`push`](https://type-route.zilch.dev/api-reference/route/push) and [`replace`](https://type-route.zilch.dev/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://type-route.zilch.dev/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://type-route.zilch.dev/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://type-route.zilch.dev/)\n","readmeFilename":"README.md","gitHead":"2fd8ef51c7f54f29babec69902570dfbd97bbea4","_id":"type-route@0.0.0-2fd8ef51c7f54f29babec69902570dfbd97bbea4","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-aKD1UCvnZDW2Fe3JstExfVY4ch7gpJ+O1JN3GZrVmHzBuLTl+6UuxPHdpKnaEfNRAKv1ZMc0vE2zsrhC1MMbtg==","shasum":"bda20857017d8d905951ff8508b52ac6ddd1237f","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-2fd8ef51c7f54f29babec69902570dfbd97bbea4.tgz","fileCount":54,"unpackedSize":1182444,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDyFSncad6+FiGmTNp1cPMuy/RQrmkqf0DhBSUk/polHQIhALMattj1ydQMiO02Qa9TdxmzpAwSDoU+d4VUe15tjKPj"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjsf+yACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmpobg//eQIC2F24oKs9hMr0nn5DDujh+X0aJVstBLp4zVKUwlkm/VwD\r\nDeopEynYqPomEQaBYfHZDn6Ocs7f31oD6NyhBjMgL0uwSKfsQ0kfaKLh5GfP\r\npqBJs+VJCApbKwDeR7SqBSMtfuZ9CPRrR5Zl54+qrJIzJR4uOsnNHtFxZFdR\r\nIAAEKdWSXQ6jjBmdm0jSjJ3XHSXADZWy3MXLwlXjcCzGie6D9qpN0+N4XGsc\r\nEH1kX8QYDsYpOTkQbLIrZbqvCEsjTYjrAJ2H9RRmlZf/jBfUJ21fxAI3/mO7\r\nMpiUjIQWr21Or+dKsM+U1aYCdD4Slu3EBSA99wTBP4nEaFFGLPPyhNmBHN+4\r\nEq14i2BA/b23sZ4D/oIZh3PbCY6iTITQa594Yc7hHfDg+5A5TTmn/O6CO0lg\r\niG/eGgTPOoQB15rW33fmKzOAN1JNEXLf+BCEm8s7CPBkQKp3kVZngrcgYrFo\r\nHkUbsyxxGVmr/ySq80le3hluKwRh10O491W7RD9XJKZ/wRgq1BgnpObsS+zB\r\nfp7suzQ3gcjNhjxgvcRCb5sirBZuY1KXGyRVIpJRhQwp+P1ycVO6N5dZ1VqN\r\nnT0KkRYLBlWV4LG0wjUWXABTt7QJhTW5WU3Pbo0UbE2Sp2IoCFju2MMI5bpj\r\nO0Hzi/bcZCuDPLghizWm7n8qcxX9Ae48fsY=\r\n=neOL\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-2fd8ef51c7f54f29babec69902570dfbd97bbea4_1672609714625_0.089780996649522"},"_hasShrinkwrap":false},"0.0.0-2bfec0d24f23adbe91327a22d3a808469215ea6f":{"name":"type-route","version":"0.0.0-2bfec0d24f23adbe91327a22d3a808469215ea6f","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"The flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.zilch.dev","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","docs:dev":"vitepress dev docs","docs:build":"vitepress build docs","docs:preview":"vitepress preview docs"},"devDependencies":{"@types/jest":"^27.4.1","@types/lodash":"^4.14.191","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","front-matter":"^4.0.2","lodash":"^4.17.21","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3","vitepress":"^1.0.0-alpha.33","vue":"^3.2.45"},"dependencies":{"history":"^5.3.0"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://type-route.zilch.dev\">\n    <img src=\"https://type-route.zilch.dev/logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route</h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://type-route.zilch.dev\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://type-route.zilch.dev/introduction/simple-react-example) page or see the [Type Route without React](https://type-route.zilch.dev/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number,\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string,\n    },\n    (p) => `/user/${p.userId}`\n  ),\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://type-route.zilch.dev/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App />\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage />}\n      {route.name === \"userList\" && <UserListPage route={route} />}\n      {route.name === \"user\" && <UserPage route={route} />}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>;\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>;\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a {...routes.userList({ page: 2 }).link}>User List Page 2</a>\n      <a {...routes.user({ userId: \"abc\" }).link}>User \"abc\"</a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://type-route.zilch.dev/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://type-route.zilch.dev/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://type-route.zilch.dev/guides/programmatic-navigation) is possible with the [`push`](https://type-route.zilch.dev/api-reference/route/push) and [`replace`](https://type-route.zilch.dev/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://type-route.zilch.dev/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://type-route.zilch.dev/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://type-route.zilch.dev/)\n","readmeFilename":"README.md","gitHead":"2bfec0d24f23adbe91327a22d3a808469215ea6f","_id":"type-route@0.0.0-2bfec0d24f23adbe91327a22d3a808469215ea6f","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-dt1LwDlzT31Y6yTIWCpQlnl480J8W06KZIxGrlljNHXpiACj779MsQUBlba1keFSO5jA+YXUykkP4RNbNl0qOw==","shasum":"26d157d47f2a704646094920ab891dce4c5f28b3","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-2bfec0d24f23adbe91327a22d3a808469215ea6f.tgz","fileCount":54,"unpackedSize":1182444,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEBQjtEKNaEKB8RbaTDeWEH/45n0OWYRkXJe5E8iQBR8AiAcXWgwhoqn7zlWukPV/EBIzIKtZ/VjXDACQZ0k/nmjKw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjsgBZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqLDRAAkjpQ1pXqTW0u8s9fdIuXcIDup/vUoi9trosjkvnNTH4EPqR5\r\nk/zSrEBWnBgn9jYAuXz/1qtcQdKDYjX/mp7Z4k+41c7wLOQ4oDBqYeB0jMIB\r\nyU/d9OTd+kqI0UO2teEmm5OYJmcVtV2g3oMypWCulnTo6n6X+xn8FC/RSlMz\r\nWKXfIM9jAx8A/ePUvtXkGUrtmoD0njY5rdG/hKPe0CqDl6LOzYJH1Rm/Ksy8\r\nc5fVysDF5KkYj66BKcGBRrWAfuSdPJbiQp6iirCVWCa7R3609a81y8ZMTVC0\r\n3Q0qO8SwauU+/qaoCxS3sSfDB2qlnfmCpZgtT3g+SxNrO26uczjcs+cRRO4i\r\nQgMdpf/lAk8e4CUaQwGCNeLTz5xQ6Hxfiozm0mM3qKgp5dEl7aj8cECLDPOd\r\n3ZHHnoTbFz5MvY2Xdy0/zgGpQ6iwUh4pow36so0gOaq6B8OdzZx4VETeQ6QO\r\n9dvllRduLDQ31Cixa+fde0XVFrdTc90fT5Cvq3JMhWV0x3CKNBZAiR29lwnq\r\nSte0FJNrCT3ye8siWVFC5m5WRSYt8k6RueMJB+Q+ESWXl7GPHan6qrRvXeoT\r\n0h18HWbsbIgogvv11bqKSohjvh5gGBggDHo0VhbKO9ruO0ZqlyPXjtW/N/mh\r\nPmZpGedPNa/5VAMg0+mPNuCdWRXJNJg0YNs=\r\n=gtVd\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-2bfec0d24f23adbe91327a22d3a808469215ea6f_1672609881256_0.298722927433948"},"_hasShrinkwrap":false},"0.0.0-7bb0f8da7138494e3e74e86a2ad3f41e3391ee60":{"name":"type-route","version":"0.0.0-7bb0f8da7138494e3e74e86a2ad3f41e3391ee60","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"The flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.zilch.dev","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","docs:dev":"vitepress dev docs","docs:build":"vitepress build docs","docs:preview":"vitepress preview docs"},"devDependencies":{"@types/jest":"^27.4.1","@types/lodash":"^4.14.191","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","front-matter":"^4.0.2","lodash":"^4.17.21","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3","vitepress":"^1.0.0-alpha.33","vue":"^3.2.45"},"dependencies":{"history":"^5.3.0"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://type-route.zilch.dev\">\n    <img src=\"https://type-route.zilch.dev/logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route</h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://type-route.zilch.dev\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://type-route.zilch.dev/introduction/simple-react-example) page or see the [Type Route without React](https://type-route.zilch.dev/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number,\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string,\n    },\n    (p) => `/user/${p.userId}`\n  ),\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://type-route.zilch.dev/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App />\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage />}\n      {route.name === \"userList\" && <UserListPage route={route} />}\n      {route.name === \"user\" && <UserPage route={route} />}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>;\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>;\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a {...routes.userList({ page: 2 }).link}>User List Page 2</a>\n      <a {...routes.user({ userId: \"abc\" }).link}>User \"abc\"</a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://type-route.zilch.dev/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://type-route.zilch.dev/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://type-route.zilch.dev/guides/programmatic-navigation) is possible with the [`push`](https://type-route.zilch.dev/api-reference/route/push) and [`replace`](https://type-route.zilch.dev/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://type-route.zilch.dev/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://type-route.zilch.dev/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://type-route.zilch.dev/)\n","readmeFilename":"README.md","gitHead":"7bb0f8da7138494e3e74e86a2ad3f41e3391ee60","_id":"type-route@0.0.0-7bb0f8da7138494e3e74e86a2ad3f41e3391ee60","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-T6zlTN8KRo4g66aQrJcR8w9yMwg+9BtAH73/gy57uaxJJ9XXsl1xSNqdIoRwAR6oSmtmVJO6AXiU/6RrBc9eDw==","shasum":"5276a60caa489a6277df55b659c2c93615106189","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-7bb0f8da7138494e3e74e86a2ad3f41e3391ee60.tgz","fileCount":54,"unpackedSize":1182444,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC4qv/N4sqw+ma+9on92ItBkoj56YodN3SrolX326BV/AiEAphYruLMOmJ9LejFffflyciBwB13lCTguHMir86UEhPM="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjsh6IACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmobig/9GQq59AY4Fwu+we2+nh9NIAn7qr1deLEcVcwCdu9c5/B38lPL\r\nNfi0SNhbj5YliTqHVCJ4A1H1y2x0Lm3S7GfN7YYX2pqzihnEoHEQ5tMR2p3Q\r\nbQFy6+qvgxF2S+SKUmcW+BTovX6ORCr7ibl2tiCL2FaiJVaKoCpIduBczIKp\r\n66ZQHzg8jlX7nTRxiZy57QKRhZ5SIaen5Vf2+Fiw8CGii9vaNb7UhXmtKIAG\r\nJNoS2nHtp4xuRXlvw2b00KpvPckOCV+wLoaxYpqB2CMw2rFxtZFDIert2/j7\r\ngT3jVL8aeJ2RwxHoZPV7gOiKj5B7Izd6VNI9mWg7P0dNCJ8fwKKNMACEKHFx\r\nKCPpCe8E95ForT6G98q6coy2+kkqPfiIRmDLk29esKaWsIsdV1cyy2lr8d6J\r\nTkACzL11EGEzG4F+ZtS6IG1Kxeshe3cg6mf4DpLbwmu68PVRKG+zt3/oXWs1\r\n1JDbkFEyAjocncpsKULmPkWkYzxDHMgvhqbK5aAisd5Z5TpKev063MetlVEr\r\nUR9gNqoMzM8n9GW9TIhEbZsgJgmENKSy97/Ki06282hi9fvzp4XwzI3XWEnl\r\nDd9mTYwf5dCq1Oc5SVxsYBq6xZLTKhDAM6JpjGv+YEkonP68FM5Hx7aHxdJf\r\ngdwvNiS+k+Yn/hYC+VCBrgh/EihX75AX2Ms=\r\n=FYdJ\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-7bb0f8da7138494e3e74e86a2ad3f41e3391ee60_1672617607862_0.5893948033706233"},"_hasShrinkwrap":false},"0.0.0-235ad87f79981ccb797567d2201dd79ccd83cefc":{"name":"type-route","version":"0.0.0-235ad87f79981ccb797567d2201dd79ccd83cefc","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"The flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.zilch.dev","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","docs:dev":"vitepress dev docs","docs:build":"vitepress build docs","docs:preview":"vitepress preview docs"},"devDependencies":{"@types/jest":"^27.4.1","@types/lodash":"^4.14.191","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","front-matter":"^4.0.2","lodash":"^4.17.21","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3","vitepress":"^1.0.0-alpha.33","vue":"^3.2.45"},"dependencies":{"history":"^5.3.0"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://type-route.zilch.dev\">\n    <img src=\"https://type-route.zilch.dev/logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route</h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://type-route.zilch.dev\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://type-route.zilch.dev/introduction/simple-react-example) page or see the [Type Route without React](https://type-route.zilch.dev/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number,\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string,\n    },\n    (p) => `/user/${p.userId}`\n  ),\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://type-route.zilch.dev/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App />\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage />}\n      {route.name === \"userList\" && <UserListPage route={route} />}\n      {route.name === \"user\" && <UserPage route={route} />}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>;\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>;\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a {...routes.userList({ page: 2 }).link}>User List Page 2</a>\n      <a {...routes.user({ userId: \"abc\" }).link}>User \"abc\"</a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://type-route.zilch.dev/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://type-route.zilch.dev/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://type-route.zilch.dev/guides/programmatic-navigation) is possible with the [`push`](https://type-route.zilch.dev/api-reference/route/push) and [`replace`](https://type-route.zilch.dev/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://type-route.zilch.dev/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://type-route.zilch.dev/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://type-route.zilch.dev/)\n","readmeFilename":"README.md","gitHead":"235ad87f79981ccb797567d2201dd79ccd83cefc","_id":"type-route@0.0.0-235ad87f79981ccb797567d2201dd79ccd83cefc","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-PrsF0p6zQXc6DJwzQCrqaExl4J2zcmVQuUuD7iiwkFPLAygObA3vyZrSYGKrgSqLa/imkXCA7Zi5Wlu2IeWqtw==","shasum":"e6a26d347970262ea0d5ffa6627db7a44e763e83","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-235ad87f79981ccb797567d2201dd79ccd83cefc.tgz","fileCount":54,"unpackedSize":1182444,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC4HYOJxdBhvQyLS0lGh3M5E4EYecIW42/KB+POJ1rEvgIgGFLPsVPhR4sa4k6LTR0HsHnS2RSnSMZYKFXWf8sV0pc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjslHDACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrMVQ//VIn98mjKlggW1vbxqKfPhdha3wMvUJaFwhJGnktah04IWpdO\r\n/ZE1t+4AT6CMZYr7wl8tIzYlgryJbYUeSbHITzduHtowF2oQpJUw7X9NsQl0\r\nyzgh9GwKo62mwZTx8OQmseN7uRPlWh69F1u35rqoNRSGAYs4LdjXV7QwfN+0\r\nQiD/Op2sCRPN3AqE9cL36pvPo4fYDj1YH9xwqrj0VaYeD0GuZ9b2/2DTAWoH\r\nHk9LdzrSVmpev9l7gXaHWaXdNeZY7pC4V1KilYvXrQpTTdFvetAO0ReVY4O5\r\n579brWx4FCiopsL263FR9jsmjMfHuB50iUdHG7e2x0jUIu5QbNuKqDn7/gRX\r\nNCm2Ri+G8mOsu+N7f3X1dYs8fdLyMoQHXSWkmbPclNFgoWwUPEULkbWFkrzD\r\n/VH9atb0XHgU+IAr4rk/Br+HFdwiZrx3Imxf3T8JTf2S/f+aVUIi0A8TSCM5\r\nh5gVyQhdwAxUeJhUjd/RbbNfyAnzbwvLLoATgocQt5s10k5MS7K1Sgoje1wi\r\nBJDeUMVyWYRRsfO2p3UqUWplv0HIyspiaLdrIJR2PN6xU4TTn6nrBPS9fzJa\r\n3WpqGdgRtyigCKVuJwGZhipaQ8tB4/v8aRrOY8iPNlJ2ojXudglTRW1517A8\r\nohN50UiWnf0aq1gTMqewYvhvdV8mdUXTMFY=\r\n=lh0X\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-235ad87f79981ccb797567d2201dd79ccd83cefc_1672630723557_0.6256528947286124"},"_hasShrinkwrap":false},"0.0.0-bd1e7b3176eee6e4abe8ce4d949f5d9319a9d054":{"name":"type-route","version":"0.0.0-bd1e7b3176eee6e4abe8ce4d949f5d9319a9d054","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"The flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.zilch.dev","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","docs:dev":"vitepress dev docs","docs:build":"vitepress build docs","docs:preview":"vitepress preview docs"},"devDependencies":{"@types/jest":"^27.4.1","@types/lodash":"^4.14.191","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","front-matter":"^4.0.2","lodash":"^4.17.21","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3","vitepress":"^1.0.0-alpha.33","vue":"^3.2.45"},"dependencies":{"history":"^5.3.0"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://type-route.zilch.dev\">\n    <img src=\"https://type-route.zilch.dev/logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route</h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://type-route.zilch.dev\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://type-route.zilch.dev/introduction/simple-react-example) page or see the [Type Route without React](https://type-route.zilch.dev/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number,\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string,\n    },\n    (p) => `/user/${p.userId}`\n  ),\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://type-route.zilch.dev/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App />\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage />}\n      {route.name === \"userList\" && <UserListPage route={route} />}\n      {route.name === \"user\" && <UserPage route={route} />}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>;\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>;\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a {...routes.userList({ page: 2 }).link}>User List Page 2</a>\n      <a {...routes.user({ userId: \"abc\" }).link}>User \"abc\"</a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://type-route.zilch.dev/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://type-route.zilch.dev/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://type-route.zilch.dev/guides/programmatic-navigation) is possible with the [`push`](https://type-route.zilch.dev/api-reference/route/push) and [`replace`](https://type-route.zilch.dev/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://type-route.zilch.dev/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://type-route.zilch.dev/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://type-route.zilch.dev/)\n","readmeFilename":"README.md","gitHead":"bd1e7b3176eee6e4abe8ce4d949f5d9319a9d054","_id":"type-route@0.0.0-bd1e7b3176eee6e4abe8ce4d949f5d9319a9d054","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-+2I3AYUGTg+HDUw33Z7aRnMthPI+odai1HsmLRngHSCjzJ0Dx7NOj7tFvU3FuidiVSbAm90ApmgthhBtz9L6sQ==","shasum":"00234e5916419d2abc7b671042fbe28abcaff275","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-bd1e7b3176eee6e4abe8ce4d949f5d9319a9d054.tgz","fileCount":54,"unpackedSize":1182444,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDkGe+irX3UfqeNmcYY7VbpXfutmxToTCxvMocqTD5XdAiADLkqdbqfTtDBZFB1h/Urc5Ty0dT7iSm8/5K+BQUXAjQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj1GSfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrHbA//bov3sek42QEQKlRDodGyo9Ar3YKceJcpLxGKuOuCGz0Af9ma\r\n1KoluSaNk9S70zp8XavvbLYM5nWntTlhhOxSqcQDZvZDvgA57GHWsCrBtaPz\r\nikurnWDGNT4LD/69KHMchYqW/lm8w2OOk3if3wcQKpk4UZ5fsHEmnDWP+Zc8\r\nJm6ne+FLCbWMGuOSVh32gFyCFVrfGawl3yYPXtGC3+q70ZsfdKx94mTa3vU4\r\nKLPsd3ySUcHKrhevANVqu+SJ5PmCk986t8po2J/IklzOzT07SQ9Oj+uL+Kdo\r\nFddM1zbFyzy5abc69Aoi1VotD4timOgsAMD8yd4f/b9oK/yWCE7bEIpGKrVy\r\nxIpPaMNr1k6iGTu6u5r61e7Kg1rQf9xccupvPCJSz13H/Ck9KvUyTqm1t0+c\r\nqaV8Bwmhg+KJ9LmehdsYuoWKhJlT6m9cIVt0+0MlEQbecHWGYIZXOd4Y7df3\r\n9kxg1F1ddA2eVkfy8ajp4sA0uDvcaHitis/XPbEqrAflxf6P8en36556OtX9\r\nFL4nulLPxPUV19tYJeVzT8yYx05F3wpvB/7BHUqxGK5QsewVP6kAPA8Qy+68\r\nooE0MDUwLTgaAZmZTR/uIJSH7CQ1K2TUkmeWFydv473WZScU0pedyWLNAjb5\r\nLcGkVmX8NZJinoLe/2QwXGTvzPC5KJ4AhaU=\r\n=9KHv\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-bd1e7b3176eee6e4abe8ce4d949f5d9319a9d054_1674863775207_0.35177583421429914"},"_hasShrinkwrap":false},"0.0.0-e47b28c47b51d204a642dd0f607c5c7ebae8c9a8":{"name":"type-route","version":"0.0.0-e47b28c47b51d204a642dd0f607c5c7ebae8c9a8","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"The flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.zilch.dev","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","docs:dev":"vitepress dev docs","docs:build":"vitepress build docs","docs:preview":"vitepress preview docs"},"devDependencies":{"@types/jest":"^27.4.1","@types/lodash":"^4.14.191","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","front-matter":"^4.0.2","lodash":"^4.17.21","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3","vitepress":"^1.0.0-alpha.33","vue":"^3.2.45"},"dependencies":{"history":"^5.3.0"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://type-route.zilch.dev\">\n    <img src=\"https://type-route.zilch.dev/logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route</h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://type-route.zilch.dev\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://type-route.zilch.dev/introduction/simple-react-example) page or see the [Type Route without React](https://type-route.zilch.dev/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number,\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string,\n    },\n    (p) => `/user/${p.userId}`\n  ),\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://type-route.zilch.dev/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App />\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage />}\n      {route.name === \"userList\" && <UserListPage route={route} />}\n      {route.name === \"user\" && <UserPage route={route} />}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>;\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>;\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a {...routes.userList({ page: 2 }).link}>User List Page 2</a>\n      <a {...routes.user({ userId: \"abc\" }).link}>User \"abc\"</a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://type-route.zilch.dev/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://type-route.zilch.dev/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://type-route.zilch.dev/guides/programmatic-navigation) is possible with the [`push`](https://type-route.zilch.dev/api-reference/route/push) and [`replace`](https://type-route.zilch.dev/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://type-route.zilch.dev/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://type-route.zilch.dev/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://type-route.zilch.dev/)\n","readmeFilename":"README.md","gitHead":"e47b28c47b51d204a642dd0f607c5c7ebae8c9a8","_id":"type-route@0.0.0-e47b28c47b51d204a642dd0f607c5c7ebae8c9a8","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-+Zt4s6oy7/QAWvOqceYA3nN8TJGiw5TYIrnx+nnJD4F1k/J+onG6V1qpJIV9fVaut1DCfx1PsDejUX0SGsy4qg==","shasum":"0b250393023c2353c93d99d04b56b9fad790f516","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-e47b28c47b51d204a642dd0f607c5c7ebae8c9a8.tgz","fileCount":54,"unpackedSize":1182444,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBA8GoKAAFGi3y5Uf3q+KgKaoBTWmGUbA0ohTKEOiRaXAiEAiaJ4yL+IQ0vrbhst4bjKckDCfpoJzTRAVhPl1dzhAKw="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj1GbBACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoTOw//Z2Q0MIGlnIuzr34CRA6w3+VCLKgMSCp+NQGyzg98xuPGKMR9\r\n5TFrbLPzMeqjxC+JSzNqptzLCt/lVlrnn6IdMU5vPzEJnbxKHB5TnAWdsCOi\r\nsr5+kNKHRKqYn78sP7aZQGkgXrzjrHSqfsSBxnOXCZG/BMav8X/zYjZM5mDn\r\ndczmOtAFa/mliu9RAyRSGDBg3JqtGrnIgnusMvw9PYHhvngh437CTsQh12yq\r\n/6J3boTqRhbAQ6npie1lHFNDzM37EsQ87ADv60nXAEGknpqQW9HmlPbeIekJ\r\n5mqLlLeBYU7SScQk2XDZVS8JpPwcp9twVMnZaFzPDKMDbTlW8ibf8X9I3C67\r\n3CyPa2pvBcGMwKlA7cNcKxoYcsOOAs74rPBzRsZNu1MV+qJvEnmgR/2W55JE\r\nRVOYC6hP9xsk8AECzw3N7uFiNU6+jN5oPeo81Ykluw8I4RJkScEYVk+Sxe+U\r\nwbv7bAsiQh8chiqtoQ53Nw4P1KkRCNMNbS/NBF78UYeidKWvb1OxSFAW3L9S\r\nuggLy403NKWbSbO9PjqwrSR9YdEWfnAwr6r2TXtinbj5dw5Zb0f/4//Vs293\r\nC9zWoLnEjtNlbi+tqAj4K3qBU5GLIOusPt3ymfOk5i+5ZfAuy2S+qjOHnqoX\r\n83IxOkL2snR7Mo4rISo6jiGDAHMtvcyHXMk=\r\n=Yph2\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-e47b28c47b51d204a642dd0f607c5c7ebae8c9a8_1674864320793_0.42049690336172385"},"_hasShrinkwrap":false},"0.0.0-d1f9a3fe9727a5158bef70f2521c5d9b2676ab8d":{"name":"type-route","version":"0.0.0-d1f9a3fe9727a5158bef70f2521c5d9b2676ab8d","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"The flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.zilch.dev","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","docs:dev":"vitepress dev docs","docs:build":"vitepress build docs","docs:preview":"vitepress preview docs"},"devDependencies":{"@types/jest":"^27.4.1","@types/lodash":"^4.14.191","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","front-matter":"^4.0.2","lodash":"^4.17.21","parcel":"^2.2.0","prettier":"^2.6.1","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3","vitepress":"^1.0.0-alpha.33","vue":"^3.2.45"},"dependencies":{"history":"^5.3.0"},"readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://type-route.zilch.dev\">\n    <img src=\"https://type-route.zilch.dev/logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route</h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://type-route.zilch.dev\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://type-route.zilch.dev/introduction/simple-react-example) page or see the [Type Route without React](https://type-route.zilch.dev/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number,\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string,\n    },\n    (p) => `/user/${p.userId}`\n  ),\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://type-route.zilch.dev/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App />\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage />}\n      {route.name === \"userList\" && <UserListPage route={route} />}\n      {route.name === \"user\" && <UserPage route={route} />}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>;\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>;\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a {...routes.userList({ page: 2 }).link}>User List Page 2</a>\n      <a {...routes.user({ userId: \"abc\" }).link}>User \"abc\"</a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://type-route.zilch.dev/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://type-route.zilch.dev/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://type-route.zilch.dev/guides/programmatic-navigation) is possible with the [`push`](https://type-route.zilch.dev/api-reference/route/push) and [`replace`](https://type-route.zilch.dev/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://type-route.zilch.dev/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://type-route.zilch.dev/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://type-route.zilch.dev/)\n","readmeFilename":"README.md","gitHead":"d1f9a3fe9727a5158bef70f2521c5d9b2676ab8d","_id":"type-route@0.0.0-d1f9a3fe9727a5158bef70f2521c5d9b2676ab8d","_nodeVersion":"11.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-VSbM/AgK3Om4We2p6k71+m0+LLeDWWyhzJ9eTyt2rrsLbjYV7Vu1y3AsD3e8GmmWBd82NIqxYDUW0qoH8D70Gw==","shasum":"e25aebe1ad0039b87a36df14b23d07d3e676117c","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-d1f9a3fe9727a5158bef70f2521c5d9b2676ab8d.tgz","fileCount":54,"unpackedSize":1182444,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDHiJ1iKP1DcN3kB0RKtsLPea+TaOmpn5zoW5LM/sTbxgIhALi47sAsRF3Vm3/5D1EVndWrakLgtx0Lt+8iFaJ4Z+2Y"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj1GbaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqyEA/+J25lICkTAkcGY+beclSOD1yDDOaz+JlZ8D/deXBNLyZnu5cq\r\nykhjiVssNFQv0lQXAvYMjcuNw42c34PdMXEvaNXrNbtNI6U466/vBLo5iOVJ\r\ndcPGR+HTogVgQGkUI7Jt/QgCF81KSZg53+9G8rQneXg3d5POjtTU6Xb/aCi3\r\nSXAKLLQjJvE3qKc9NH2n/lt88uFzA5nrOFJAG3Vk55jI1EVnChH+eBh77HHn\r\nCijMfVV4LGltKaGVjYT0SCMN2jU0Li1oHFWKbu1mC89badEW//RazRYCdvcj\r\n1hpRoNJRT6omnyx6rOkychojE32K7ORjft1H2DxfW+ZT6Pv6H1EBN8UqRH86\r\nOgN/FWH/JQ51/XLyFmaOnlrTWDrrutUjlCVZXNIETzrMWuXC6dL6JGErxIrt\r\nFLYwN+64/y8hfS/9DPLlWKdqtHoBo5JYBkRgOAOyiEy4AoqSt9iiThiCEl01\r\nd5eVZEi3tUVNo2TIVjw5JxUY++qovmhRf0MLG1eUoqx9BsJEfMS7GAvXCj2f\r\nOhU6QS1RvE2n0xYjD6KWsL77cg876Jpx7ctPf1s7SGPNTwyWvf+jvoZiJA/q\r\nODieuyC6xxysd8P4jvLjlvqBSiQVvzR22ZLb6VgPYdDXse3lpi4X+9XPurpE\r\nXO8iIQLa8L0sc2nMsrt4mMaPqfgWM3g7uXo=\r\n=UefF\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-d1f9a3fe9727a5158bef70f2521c5d9b2676ab8d_1674864346364_0.421897235511957"},"_hasShrinkwrap":false},"0.0.0-28cb3d904ee43b860da2c10865f635bfe7c0c930":{"name":"type-route","version":"0.0.0-28cb3d904ee43b860da2c10865f635bfe7c0c930","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"The flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.zilch.dev","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","docs:dev":"vitepress dev docs","docs:build":"vitepress build docs","docs:preview":"vitepress preview docs"},"devDependencies":{"@types/jest":"^27.4.1","@types/lodash":"^4.14.191","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","front-matter":"^4.0.2","lodash":"^4.17.21","parcel":"^2.10.3","prettier":"^2.6.1","process":"^0.11.10","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3","vitepress":"^1.0.0-alpha.33","vue":"^3.2.45"},"dependencies":{"history":"^5.3.0"},"_id":"type-route@0.0.0-28cb3d904ee43b860da2c10865f635bfe7c0c930","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://type-route.zilch.dev\">\n    <img src=\"https://type-route.zilch.dev/logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route</h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://type-route.zilch.dev\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://type-route.zilch.dev/introduction/simple-react-example) page or see the [Type Route without React](https://type-route.zilch.dev/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number,\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string,\n    },\n    (p) => `/user/${p.userId}`\n  ),\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://type-route.zilch.dev/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App />\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage />}\n      {route.name === \"userList\" && <UserListPage route={route} />}\n      {route.name === \"user\" && <UserPage route={route} />}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>;\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>;\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a {...routes.userList({ page: 2 }).link}>User List Page 2</a>\n      <a {...routes.user({ userId: \"abc\" }).link}>User \"abc\"</a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://type-route.zilch.dev/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://type-route.zilch.dev/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://type-route.zilch.dev/guides/programmatic-navigation) is possible with the [`push`](https://type-route.zilch.dev/api-reference/route/push) and [`replace`](https://type-route.zilch.dev/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://type-route.zilch.dev/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://type-route.zilch.dev/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://type-route.zilch.dev/)\n","readmeFilename":"README.md","gitHead":"28cb3d904ee43b860da2c10865f635bfe7c0c930","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-o506nL3ssQsmVNJFxBLZBfBvQZDVpeRNa6zpAfqf3LAqRKw5mCH97gAGXWTdZ7YgMmi4U1w2VR/GzhH5Nh335A==","shasum":"d8d3119a34f9b3301d22508fd62100662ff29c5f","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-28cb3d904ee43b860da2c10865f635bfe7c0c930.tgz","fileCount":53,"unpackedSize":1197569,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB9HmKfbEZ5rPFsf+m2tRO3VOs9gFzjIuqheLREqxZEDAiASwWy76avqsA8ATtNufupr9LzxlZnxSEIRoT8d/BqE/g=="}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-28cb3d904ee43b860da2c10865f635bfe7c0c930_1702125734781_0.4463171823711922"},"_hasShrinkwrap":false},"1.1.0":{"name":"type-route","version":"1.1.0","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"The flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.zilch.dev","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","docs:dev":"vitepress dev docs","docs:build":"vitepress build docs","docs:preview":"vitepress preview docs"},"devDependencies":{"@types/jest":"^27.4.1","@types/lodash":"^4.14.191","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","front-matter":"^4.0.2","lodash":"^4.17.21","parcel":"^2.10.3","prettier":"^2.6.1","process":"^0.11.10","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3","vitepress":"^1.0.0-alpha.33","vue":"^3.2.45"},"dependencies":{"history":"^5.3.0"},"_id":"type-route@1.1.0","gitHead":"28cb3d904ee43b860da2c10865f635bfe7c0c930","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-MgM/N+R8wp2oMYZZvBerFvK1j8CloGnhnsgf2ZTarFJ9PUXiNwLTCR3SkN0Mj95IdNee00v9q2iBNlkB106I7w==","shasum":"26c657e55a43590ff3c1568459998cbfc02fd6a7","tarball":"https://registry.npmjs.org/type-route/-/type-route-1.1.0.tgz","fileCount":53,"unpackedSize":1197528,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCUdaOswEQMnPdsls7aK+U47fOlMZyeZjFfFfi+rNQqZAIhALLwBP9wdwRd/SpNXHK8XGbG74DD13UjQA3o/2EZRNPO"}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_1.1.0_1702126978057_0.7158720827563283"},"_hasShrinkwrap":false},"0.0.0-fbd54461938914b148d892ab4ed8c037b9735fc9":{"name":"type-route","version":"0.0.0-fbd54461938914b148d892ab4ed8c037b9735fc9","main":"dist/index.js","types":"dist/index.d.ts","module":"dist/type-route.esm.js","description":"The flexible, type safe routing library.","repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"license":"MIT","bugs":{"url":"https://github.com/zilch/type-route/issues"},"sideEffects":false,"homepage":"https://type-route.zilch.dev","authors":["Braden Snell"],"keywords":["react","router","route","routing","history","link","type","types","typescript"],"scripts":{"start":"parcel serve ./src/playground.html --dist-dir parcel-dist","build":"./build.sh","test":"tsdx test --coverage --collectCoverageFrom=src/**/*.ts --collectCoverageFrom=!src/global.d.ts","lint":"eslint --ext ts,tsx ./src ./test --max-warnings=0","docs:dev":"vitepress dev docs","docs:build":"vitepress build docs","docs:preview":"vitepress preview docs"},"devDependencies":{"@types/jest":"^27.4.1","@types/lodash":"^4.14.191","@types/react":"^17.0.43","@types/react-dom":"^17.0.14","front-matter":"^4.0.2","lodash":"^4.17.21","parcel":"^2.10.3","prettier":"^2.6.1","process":"^0.11.10","react":"^18.0.0","react-dom":"^18.0.0","rollup":"^2.70.1","rollup-plugin-dts":"^4.2.0","ts-toolbelt":"^9.6.0","tsdx":"^0.14.1","tslib":"^2.3.1","typescript":"^4.6.3","vitepress":"^1.0.0-alpha.33","vue":"^3.2.45"},"dependencies":{"history":"^5.3.0"},"_id":"type-route@0.0.0-fbd54461938914b148d892ab4ed8c037b9735fc9","readme":"<br/>\n<br/>\n<p align=\"center\">\n  <a href=\"https://type-route.zilch.dev\">\n    <img src=\"https://type-route.zilch.dev/logo.svg\" width=\"200\" alt=\"Type Route\"/>\n  </a>\n</p>\n<br/>\n<h1 align=\"center\">Type Route</h1>\n<p align=\"center\">\n<a href=\"#getting-started\">Quick Start</a>&nbsp;&nbsp;·&nbsp;&nbsp;<a href=\"https://type-route.zilch.dev\">Docs</a>\n</p>\n<br/>\n\n## Getting Started\n\nType Route is a flexible, type safe routing library built on top of the same [core library](https://github.com/ReactTraining/history) that powers React Router.\n\n> **Type Route was designed with excellent React integration in mind** but isn't coupled to a specific UI framework. Most code examples in the documentation use React, but the general principles covered apply regardless of framework.\n\nContinue reading this introduction for a quick overview of how to start using Type Route in your React project. Find a full <b>runnable</b> version of the below introduction on the [Simple React Example](https://type-route.zilch.dev/introduction/simple-react-example) page or see the [Type Route without React](https://type-route.zilch.dev/guides/type-route-without-react) guide to learn how to use Type Route without React.\n\n## Install\n\nType Route's primary distribution channel is the [NPM registry](https://www.npmjs.com/package/type-route). React `16.8` (or any subsequent version of React) is a peer dependency of Type Route so you'll need to ensure that's installed as well.\n\n```bash\nnpm install type-route react\n```\n\n## Step 1: Create a Router\n\n`router.ts`\n\n```typescript\nimport { createRouter, defineRoute, param } from \"type-route\";\n\nexport const { RouteProvider, useRoute, routes } = createRouter({\n  home: defineRoute(\"/\"),\n  userList: defineRoute(\n    {\n      page: param.query.optional.number,\n    },\n    () => \"/user\"\n  ),\n  user: defineRoute(\n    {\n      userId: param.path.string,\n    },\n    (p) => `/user/${p.userId}`\n  ),\n});\n```\n\nBest practice is to immediately destructure the result of [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router) into the properties you'll be using in your application. The [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router) function accepts an object with route names and route definitions created via [`defineRoute`](https://type-route.zilch.dev/api-reference/route-definition/define-route) and returns a new router.\n\n## Step 2: Connect Router to Application\n\n`App.tsx`\n\n```tsx {17-19}\nimport React, { useState, useEffect } from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { RouteProvider } from \"./router\";\nimport { Page } from \"./Page\";\nimport { Navigation } from \"./Navigation\";\n\nfunction App() {\n  return (\n    <>\n      <Navigation />\n      <Page />\n    </>\n  );\n}\n\nReactDOM.render(\n  <RouteProvider>\n    <App />\n  </RouteProvider>,\n  document.querySelector(\"#root\")\n);\n```\n\nWrap your entire application in the `<RouteProvider>` component returned by [`createRouter`](https://type-route.zilch.dev/api-reference/router/create-router).\n\n## Step 3: Display Current Route\n\n`Page.tsx`\n\n```tsx\nimport React from \"react\";\nimport { useRoute, routes } from \"./router\";\nimport { HomePage } from \"./HomePage\";\nimport { UserListPage } from \"./UserListPage\";\nimport { UserPage } from \"./UserPage\";\nimport type { Route } from \"type-route\";\n\nexport function Page() {\n  const route = useRoute();\n\n  return (\n    <>\n      {route.name === \"home\" && <HomePage />}\n      {route.name === \"userList\" && <UserListPage route={route} />}\n      {route.name === \"user\" && <UserPage route={route} />}\n      {route.name === false && \"Not Found\"}\n    </>\n  );\n}\n\nfunction HomePage() {\n  return <div>Home Page</div>;\n}\n\nfunction UserListPage({ route }: { route: Route<typeof routes.userList> }) {\n  return <div>UserList Page: {route.params.page}</div>;\n}\n\nfunction UserPage({ route }: { route: Route<typeof routes.user> }) {\n  return <div>User: {route.params.userId}</div>;\n}\n```\n\nInside the code blocks above the TypeScript compiler (and your editor) will be able to correctly infer the type of `route`. This allows you, for instance, to pass the `user` route to the `UserPage` component and access the `userId` param with confidence in code blocks where it will definitely exist.\n\n> Type Route is written in TypeScript and designed for TypeScript users. Any editor, however, whose JavaScript experience is powered by TypeScript (VSCode for instance) will provide many of the same benefits described here when using regular JavaScript.\n\n## Step 4: Navigate Between Routes\n\n`Navigation.tsx`\n\n```tsx\nimport React from \"react\";\nimport { routes } from \"./router\";\n\nexport function Navigation() {\n  return (\n    <nav>\n      <a {...routes.home().link}>Home</a>\n      <a {...routes.userList().link}>User List</a>\n      <a {...routes.userList({ page: 2 }).link}>User List Page 2</a>\n      <a {...routes.user({ userId: \"abc\" }).link}>User \"abc\"</a>\n    </nav>\n  );\n}\n```\n\nThe [`link`](https://type-route.zilch.dev/api-reference/route/link) property is an object with an `href` attribute and an `onClick` function. You need both to [properly render](https://type-route.zilch.dev/guides/rendering-links) a link in a single page application. Immediately spreading the `link` object into the properties of an `<a>` tag makes usage simple. [Programmatic navigation](https://type-route.zilch.dev/guides/programmatic-navigation) is possible with the [`push`](https://type-route.zilch.dev/api-reference/route/push) and [`replace`](https://type-route.zilch.dev/api-reference/route/replace) functions of a specific route. Type Route also supports [extending the behavior of a link](https://type-route.zilch.dev/guides/custom-link-behavior) to cover more complex scenarios.\n\n## Next Steps\n\nHopefully that was enough to point you in the right direction!\n\nIf you need more guidance there is a full runnable version of the above code on the [Simple React Example](https://type-route.zilch.dev/introduction/simple-react-example) page. The **Guides** section of the documentation has detailed overviews and examples for most use cases. Additionally, the **API Reference** section has descriptions and examples for each part of the API.\n\n[View Docs →](https://type-route.zilch.dev/)\n","readmeFilename":"README.md","gitHead":"fbd54461938914b148d892ab4ed8c037b9735fc9","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-TqU/iT0/i8Eoz+fm48eH3bvgot0yk8s7q4fv/VpU+GWF+BNdenFBX1bnT+V118BbUPywsKWuuMoi/ofo6XxAXQ==","shasum":"e6b5d51b49aaf8430b5c7d66586f0691b6468899","tarball":"https://registry.npmjs.org/type-route/-/type-route-0.0.0-fbd54461938914b148d892ab4ed8c037b9735fc9.tgz","fileCount":53,"unpackedSize":1197569,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDIfpFzzsy0fNIsTu6ehRbFFH4ZksOGoJ6A1fb990JZbwIhALrxnYWGWXSZLcYyyws+1aTx4JFrVyvri2De9tI97WLH"}]},"_npmUser":{"name":"bradenhs","email":"bradenhs@outlook.com"},"directories":{},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/type-route_0.0.0-fbd54461938914b148d892ab4ed8c037b9735fc9_1702127129340_0.49555588913169246"},"_hasShrinkwrap":false}},"time":{"created":"2019-04-01T15:03:00.879Z","0.1.0":"2019-04-01T15:03:01.046Z","modified":"2023-12-09T13:05:29.778Z","0.1.1":"2019-04-01T15:13:25.522Z","0.1.2":"2019-04-01T15:34:12.864Z","0.1.3":"2019-04-01T20:25:32.108Z","0.1.4":"2019-04-01T20:34:08.326Z","0.1.5":"2019-04-04T02:32:20.135Z","0.1.6":"2019-04-04T14:39:42.749Z","0.1.7":"2019-04-04T15:50:10.529Z","0.1.8":"2019-04-04T16:00:41.764Z","0.1.9":"2019-04-06T11:41:10.325Z","0.1.10":"2019-04-09T20:02:15.547Z","0.1.11":"2019-04-12T12:43:40.945Z","0.1.12":"2019-04-12T23:56:24.990Z","0.1.13":"2019-04-13T00:10:10.534Z","0.1.14":"2019-04-13T00:22:47.262Z","0.1.15":"2019-04-16T21:35:59.936Z","0.1.16":"2019-04-23T14:56:17.237Z","0.1.17":"2019-04-29T20:10:37.505Z","0.1.18":"2019-05-01T14:42:48.731Z","0.1.19":"2019-05-05T01:25:07.582Z","0.1.20":"2019-05-27T16:40:12.909Z","0.2.1":"2019-06-01T22:16:26.307Z","0.2.2":"2019-06-01T22:17:59.637Z","0.2.3":"2019-06-20T18:16:16.401Z","0.2.4":"2019-10-03T13:19:40.278Z","0.2.5":"2019-10-03T13:45:25.230Z","0.3.0":"2019-10-19T17:02:23.515Z","0.3.1":"2019-10-19T17:08:47.295Z","0.3.2":"2019-11-04T15:30:25.716Z","0.3.3":"2019-11-29T17:37:43.150Z","0.3.4":"2019-11-29T17:44:49.706Z","0.3.5":"2020-01-28T18:19:30.193Z","0.0.0-60947433b94a742934135019a379aa3fc5170747":"2020-02-12T06:21:02.812Z","0.0.0-3df98845dd54cfa4ab911991fe414e5a79c661fb":"2020-02-12T06:49:19.745Z","0.3.6":"2020-02-12T06:52:21.154Z","0.0.0-8898b35432ba05f11f5c0d311dea45d643b22392":"2020-02-12T07:10:36.592Z","0.0.0-9a7855ae14c64268ee43a74bacb68e948f6fd27e":"2020-02-15T04:44:38.284Z","0.1.21":"2020-02-15T04:48:31.572Z","0.0.0-ae33b4d9b23125885be9c14f4d5005236fdf75ab":"2020-04-02T18:53:00.347Z","0.0.0-a0a631e0fb2e8ca6df0bd4619854ee1ccd2189ed":"2020-04-03T00:57:50.619Z","0.0.0-2cf32c9d62b46e95816b7f02ab6ba23f08caaec4":"2020-04-03T01:51:27.964Z","0.0.0-56c8471820f5f5e024258e1ce9b9edb473714834":"2020-04-03T02:17:54.775Z","0.0.0-20a2d77430604cf0a23f1ff59f38a00dce6c0d96":"2020-04-03T18:22:09.988Z","0.0.0-6b61db51c3d437ea50ccaa806128acbf2a26dde5":"2020-04-03T21:16:14.743Z","0.0.0-e3ec9f15fb3ddfcc94e4e02c6413bc429cdf861c":"2020-04-04T00:08:09.064Z","0.0.0-bf0414822845a145884d1e7ba3c9c91d800e1bef":"2020-04-04T01:17:37.909Z","0.0.0-0861befacf5f964b7b284f926129cb8d94bf91ad":"2020-04-04T20:41:18.243Z","0.0.0-bf3914046f8ff129d9999aa5f22f0ca3d789edc5":"2020-04-04T20:43:05.657Z","0.0.0-65c9c671ed0ac2bb0bb2b02f612613d63549e0c2":"2020-04-05T09:26:18.573Z","0.0.0-7e46cb1fdea9a63f51d101ca0d9aafb0522527f8":"2020-04-05T09:26:32.122Z","0.0.0-0df963f30a4d0ad2b0998c53a3ff37cb0fc13ce5":"2020-04-07T21:50:27.763Z","0.0.0-058da7d6e337a68203aa2c762a61626c5156a71d":"2020-04-08T12:02:32.284Z","0.0.0-2728792f90b6af223a0f40a13eea402b3be07d62":"2020-04-15T01:15:43.216Z","0.0.0-c0c427c417ae41d82663aa94c8966b510198faf1":"2020-04-15T01:32:03.309Z","0.0.0-979acb5790eb6ad6ca6942ceb38abdde60de486d":"2020-04-15T01:56:41.478Z","0.0.0-0af632f749f4b078b8ff55a187877c19e2aa0c80":"2020-04-18T18:31:23.044Z","0.0.0-6c861109562dd61618e15c50442a266028d7bd28":"2020-04-19T01:16:22.210Z","0.0.0-2decdd5cccdbadcf0c16a91cc21565a08ab114a6":"2020-04-23T21:34:31.535Z","0.0.0-98f1b56859fae2869e48a504a122a2729be560a2":"2020-04-25T11:10:33.237Z","0.0.0-e532662f44cf50416b5537a84f33d377aaf3c8d4":"2020-04-30T19:43:04.091Z","0.0.0-d69cb0e2bb5d895d8d174eec21299b73d4e7bf79":"2020-04-30T19:43:22.760Z","0.0.0-962ed642470ff9876e1dcfd8a026e18d262bc09b":"2020-05-01T03:33:31.274Z","0.0.0-682d3ce0925e8d6874bb5f290c3b36bef5136035":"2020-05-01T03:34:23.105Z","0.0.0-75f49b703343675ba5e355393fb11d9e6c1636e2":"2020-05-09T02:11:50.887Z","0.0.0-30aaa40fd6282de53f42c48f5fd559ac479b42fc":"2020-05-09T02:11:54.254Z","0.0.0-ec563d3567624b149ce53a64c9f3aae763b72b4f":"2020-05-09T03:07:44.430Z","0.0.0-63df45c503addce2468b543149f1ab388d4ad516":"2020-05-09T03:08:37.646Z","0.0.0-d35d5d931104703e109f01610a9c7aa756c078ec":"2020-05-09T18:27:47.271Z","0.0.0-3f966238da59349286f090647a055c946423d740":"2020-05-09T18:27:59.675Z","0.0.0-594b5c26e8709aaeec42191497fa388c79b5702c":"2020-05-09T20:19:48.706Z","0.0.0-099ae7b5c836ea8e1bfd22c1f562a5eb4d6274e2":"2020-05-09T20:20:03.968Z","0.0.0-5b144a746fd85f673d72c2f7493c7996d6cfebbd":"2020-05-10T19:14:07.834Z","0.0.0-5f2e552511daa16a507de917bf95076032bd1b85":"2020-05-13T01:09:41.864Z","0.0.0-763a8074f829e16ed9aace3961f5dc949ff68ae7":"2020-05-13T02:18:18.753Z","0.0.0-ea1952321e15d9661ac44ea639b7eb289e8cdd57":"2020-06-04T17:42:23.967Z","0.0.0-d2a2320eef322c35d8ea10958f124a91c276a7a4":"2020-06-04T19:21:16.905Z","0.0.0-55cd57a3bde6c75ea2d9e3a67898e9e1c814b9ec":"2020-06-05T14:05:40.488Z","0.0.0-56108c5338e057379489bf686e282bbc49c11d08":"2020-06-05T15:15:27.416Z","0.0.0-fb4857009043066982e9efd905f9e9dded81ae82":"2020-06-06T02:53:22.624Z","0.0.0-8d2df3eaac2ff9aff58788980fcd2f0582a7427f":"2020-06-06T21:03:23.267Z","0.0.0-8a7576e7e341ca35b817ebdf4d155dac9d95f85c":"2020-06-06T21:45:07.947Z","0.0.0-4f1ee068bc0da73a1d46e6a269182bad8d05ca9d":"2020-06-07T04:16:06.680Z","0.0.0-ca4ab8e929411e5738d5b3ba28b0f428447ec514":"2020-06-08T00:48:51.656Z","0.0.0-e0804d1a6937645d78baf26e8062d311a24a01b8":"2020-06-08T00:50:09.306Z","0.0.0-b7d6151d0b40335bfb04f2a48c0e6120ce78962c":"2020-06-08T00:53:18.965Z","0.0.0-829ac9335de15cc46a894244f50372a336da4a72":"2020-06-08T01:25:51.748Z","0.0.0-68f354e28dee82518bc96e44a0271bd082d632ff":"2020-06-08T02:38:03.368Z","0.0.0-94b8cc0bbf3a6f51e3491925d504e3caa8e24fbb":"2020-06-08T14:51:16.753Z","0.0.0-993794d536dbeb6a4420b1031b1b009db0c9e901":"2020-06-08T15:04:53.829Z","0.0.0-db5489522feacd61f29be3365d406666b410a675":"2020-06-08T15:19:43.707Z","0.0.0-85585a65f310c553f2a68ca11b069a79cf39527e":"2020-06-08T17:04:12.335Z","0.0.0-1f5df8939a05119b614932435688836c2bba9d49":"2020-06-08T17:14:52.021Z","0.0.0-8a2939dfd948661808ed28eaf1a3e39c72cc4f49":"2020-06-08T17:28:23.911Z","0.0.0-30a3e3ec5706528c99a9ae301376cc150fec6760":"2020-06-08T17:32:28.762Z","0.0.0-54e294c8a500ec29e74c347041a4ac914d511cbb":"2020-06-08T19:32:56.646Z","0.0.0-319e95e88b28acbd052f05e0838368b83ba19803":"2020-06-08T19:36:22.853Z","0.0.0-e54a0029ba11b32d0d11a7ef733d65da8a7a2359":"2020-06-08T19:36:50.714Z","0.0.0-5e96c5629e87e8abc8311bfec38cce5c3fe7a031":"2020-06-08T19:37:29.687Z","0.0.0-bfab385405a34dddd229ef5c85bb7f06956f3c64":"2020-06-08T19:39:13.425Z","0.0.0-cf356245f8a334ce07811367adbb4c5b7250a9a4":"2020-06-08T19:42:10.462Z","0.0.0-2ceb7a46d203a173e742ed90df8250a9e8aac928":"2020-06-08T19:45:22.942Z","0.0.0-211537638008fa8b9068213694e346c73afb4e65":"2020-06-08T19:47:16.058Z","0.0.0-d46abc20bd54317f312aea61375c677cb06a7ccf":"2020-06-08T19:48:54.598Z","0.0.0-420cab3a39e213b728942290fe7e43dd1d79fb02":"2020-06-08T19:56:45.443Z","0.0.0-d2c3afb5be65316194d4e38382118a9915920093":"2020-06-08T19:59:56.670Z","0.0.0-a2e38a22373242625bcb908fe407a81f8247e627":"2020-06-08T20:00:33.811Z","0.0.0-be0c2cc4ca5b469922e0b36e1219bc9e44e63499":"2020-06-08T20:17:37.877Z","0.0.0-35dca733bc29a2711700ebc3b61f961981da5704":"2020-06-08T20:18:25.798Z","0.0.0-af822622d8d40ef38b2d8ec99e58f8b9b91cf914":"2020-06-08T20:23:14.094Z","0.0.0-6130f9c57c408e2aad8b4d4c8b9564dc92ac0b2e":"2020-06-08T20:55:38.840Z","0.0.0-f43136155b5d478895314c40476b288c8d588fc2":"2020-06-08T21:17:34.215Z","0.0.0-e372bb2a9e9c1debfe7238c041d9e3c8b5f267c9":"2020-06-09T03:52:19.661Z","0.0.0-632bdd3c2bacf96caa23da9fb21a46aba45d8f1b":"2020-06-09T12:17:21.461Z","0.3.7":"2020-06-09T12:23:02.760Z","0.0.0-1bf546dbd45734592b33fced8b93492705b11b16":"2020-06-09T17:56:38.490Z","0.0.0-3d1843c53499a9f4d43abf2394e12037a51ec1c6":"2020-06-09T19:24:15.524Z","0.0.0-e801ae201945ac88aedeff6e5615ca7639497eba":"2020-06-09T20:04:01.883Z","0.0.0-2b9fd4e02884bb4c82fde0d4b963e28595adbbbf":"2020-06-09T20:11:07.948Z","0.0.0-cc9fcafdd9922f14bb978224bc6b5c8238f487be":"2020-06-09T20:11:15.178Z","0.0.0-582c4d8670c5e02e781572143da0cddb3960662b":"2020-06-09T20:13:00.115Z","0.0.0-f9876a92219144ba305504968012966040cc3ac8":"2020-06-09T20:14:38.572Z","0.0.0-27f1e06d5d5c88f140c213efbe5eae06db01c1b5":"2020-06-09T20:17:27.857Z","0.0.0-e8a496e93158e39111a4271c345d1c1111236ee4":"2020-06-09T20:19:37.430Z","0.0.0-72156324d09c61f11edfc39d449887a576e215ff":"2020-06-14T02:33:58.750Z","0.0.0-fecfaf9bc2c28c4679aaf8729a0e3f4b939578c0":"2020-06-14T02:40:47.707Z","0.0.0-3b5379ac89cdb090b3035648713a13db3c84d67b":"2020-06-16T01:30:35.084Z","0.0.0-c11016a49b96744e091a54b296f877825f4d48a2":"2020-06-16T01:38:07.327Z","0.0.0-6ddd6a0c0b724b97edab9862ad737257fb1ee67a":"2020-06-16T01:45:59.716Z","0.0.0-d6caa8f04915101e48ecf15d767e04522fbb3443":"2020-06-16T01:46:20.666Z","0.0.0-d4e9637e05fbcb9d5ed353b06819f8d01396f814":"2020-06-16T01:48:39.905Z","0.0.0-6c6b62a374aa9138f66f44db791c8b0c4f25b42f":"2020-06-16T01:48:55.566Z","0.0.0-f6c6130f90cd593a8e434ae426df342990eea9e0":"2020-06-16T13:45:35.490Z","0.0.0-b8e4efa5b7a3158a396f3b26d4719b00b74ebadb":"2020-06-16T13:45:50.497Z","0.0.0-953635c84e2bb1e4b518c8d56d455a7bf80ea23d":"2020-06-17T00:47:41.159Z","0.0.0-2301155b822f6d7ad443d49af4efc77d1abef7c5":"2020-06-17T00:47:47.256Z","0.0.0-6b734b73ec2c1382427b91e0fb4dc1adfe002783":"2020-06-17T02:00:18.905Z","0.0.0-89256a87d182206ba6e6aa4c06f9ed2ca6fccbb8":"2020-06-17T02:00:23.339Z","0.0.0-81d3a31f055d8ffad21742525f18e8324bae775e":"2020-06-20T03:21:17.221Z","0.0.0-b8759b2199d709686561eae1f8f4eb0fe275c900":"2020-06-20T03:21:26.075Z","0.0.0-a90439f6d09592aaad6ef3a9636f7ac9fd8b816c":"2020-06-20T03:25:15.620Z","0.0.0-e4a0c9bdf45223503cf715320009baa5fd2a9797":"2020-06-24T03:31:09.759Z","0.0.0-31300e6c768b5e8aa0efafb3e021019101b6c231":"2020-06-24T03:34:06.009Z","0.0.0-938a76e19b084410ea4e9f4c7fc2118d3638a0d1":"2020-06-24T03:37:36.278Z","0.4.0":"2020-06-24T03:53:31.693Z","0.0.0-7cbe2ede108b1190508c1ef3d37c3252f47d3bd0":"2020-06-24T04:19:36.157Z","0.0.0-81aa0247970a340d184f0dc41609b6fa7d0ea778":"2020-06-24T04:24:31.469Z","0.0.0-b47f4215b2b29e139f864b1e012c7d2010ea1368":"2020-06-25T00:36:32.514Z","0.0.0-26bcf5c72259ab4dd9f9d8d3942ad95f1d738563":"2020-06-25T04:42:47.974Z","0.0.0-76a9fa9bec9b42f9a647ae3dd4ce47baba35169e":"2020-06-25T05:13:52.682Z","0.0.0-dfa6b35063884847337fd617da2693e0bd7b558b":"2020-07-01T21:52:01.610Z","0.0.0-2b15a77d525bb985a3e3dcc4739853be14aefb79":"2020-07-01T22:03:18.019Z","0.0.0-7b03819123196de81db602fd6086a269bf75821d":"2020-07-02T16:05:17.173Z","0.0.0-402fb3979df7649995ba477d5ee6a06ec828849d":"2020-07-02T18:14:09.292Z","0.0.0-da9207cb2a91830ad8b869627116d1d1476ebf33":"2020-07-02T19:14:28.289Z","0.0.0-3eae256a49415d7f78ad502b948083d2564f2608":"2020-07-02T21:26:12.467Z","0.5.0":"2020-07-02T21:27:02.436Z","0.0.0-b151bfc848e629064f141036726e870cb488004b":"2020-07-02T21:33:19.000Z","0.0.0-c162abec91fa1143cf084705537e1c677e930296":"2020-07-02T21:49:38.607Z","0.0.0-7fbcfd08524aa421eaa8d7ccbd0226b5c302fb51":"2020-07-02T21:58:59.952Z","0.0.0-8005fe6a238db3fff54c04a4a71cbcd6eca0a6b3":"2020-07-03T02:38:55.439Z","0.0.0-8825ddb08a59aedeb32bc3e44e41d9ba85be51cc":"2020-07-03T03:12:22.091Z","0.0.0-8cf53614ac37110f9d5ba81f95116ff5a1ec28ce":"2020-07-03T03:36:09.512Z","0.0.0-1be723410de67de29384c65ce281930eaac8ac7c":"2020-07-03T04:54:01.846Z","0.0.0-1e27618cebec9b65f14e45635e9e7e83a2abd50f":"2020-07-06T02:30:57.620Z","0.5.1":"2020-07-06T02:35:23.570Z","0.0.0-b161b7b22bbe920e6637fa5eb6ac60dbecb5db6b":"2020-07-09T20:29:28.856Z","0.0.0-ecc99d7a215d697c2db2dd508d2f69f91ea1ff0c":"2020-07-09T21:28:24.769Z","0.0.0-15f2e8e3535b9ccf07ddec292a0249e026bf8def":"2020-07-13T21:14:05.637Z","0.5.2":"2020-07-13T21:17:02.713Z","0.0.0-28907a7c1cddc2a816593ba785ba6b5dc1199f58":"2020-07-15T01:38:38.753Z","0.5.3":"2020-07-15T01:44:14.157Z","0.0.0-dd9f65f3164c1d2c8f35c26b9e0de41112855254":"2020-07-15T01:44:32.814Z","0.0.0-33606ffd334c0318086e99fed5c64bd726ecc300":"2020-07-16T21:53:40.311Z","0.0.0-65eefce1121db6946ffe2cb4ab9fc22e0e55600b":"2020-07-17T00:08:29.933Z","0.0.0-8d5ac08221f26ba5f91bd18d0f5d42b540c84035":"2020-07-17T00:09:04.575Z","0.0.0-5b06e7c07df72515ddef249b531128c5eabc7efc":"2020-07-17T00:41:01.348Z","0.0.0-1b4807b2a51e5aeb66887fe8c5fc0a93526917af":"2020-07-27T14:55:38.890Z","0.5.4":"2020-07-27T14:58:27.037Z","0.0.0-333ff35318bc2cfabe053505ddd442f43289c0dc":"2020-07-30T13:52:24.732Z","0.0.0-f52c7fe9324d2d6952d5db396a6c2264d2c250b7":"2020-07-30T15:14:32.746Z","0.0.0-e51e6594f98004ba64c49f6c115afbcc1914543e":"2020-07-30T15:50:34.993Z","0.0.0-d89c2229835d2d485a6af16473e4a0235e301a09":"2020-07-30T16:00:28.105Z","0.0.0-49dfbabdf8abd4d764e0469b91db51818f7f0962":"2020-08-07T23:09:57.680Z","0.0.0-13bdd9b234a462e3c8af9680f1bcbf2590fbf9af":"2020-08-08T00:21:32.408Z","0.0.0-d78a8151f76e06e1eaf236ae729c3ac7dd9ddcb3":"2020-09-04T02:51:49.926Z","0.0.0-c30b42439edf7c07daf8945f0373130b880a79e1":"2020-09-04T04:54:23.217Z","0.0.0-0c9d426e15857255a968a10fc0b611cdc79db3d1":"2020-09-04T15:09:08.514Z","0.0.0-7a2fd36e745cd87405923a7af3dd77cc45f398c1":"2020-09-04T15:09:37.007Z","0.0.0-954cf2e170cbe4383eac370d1a45c16f9c741d81":"2020-09-10T15:07:43.312Z","0.0.0-cf43e74d188405bf72571d19527e6a58644025d0":"2020-09-11T00:13:46.531Z","0.0.0-bb7c4ba00ad1d077fbf3b5c9a13486146efa2375":"2020-09-11T00:14:05.319Z","0.0.0-43ee0eb577dcf4869fe65f68d0fea7079b308a43":"2020-09-12T15:03:09.406Z","0.0.0-6476e9dd2d9a86e980b93b21cfe78aff0a63dba2":"2020-09-12T15:13:37.021Z","0.0.0-a27178963d5acf9f38f03ea6bc611761e29482b7":"2020-10-01T17:34:36.565Z","0.0.0-68917961128e1c2faa8093c1ce84b6c3d8c9d4ae":"2020-10-01T17:35:18.888Z","0.0.0-80ee324780ec3c38fb2ec24ac9869f0b2c6ac7fa":"2020-10-09T14:39:38.507Z","0.0.0-121a22eea2f0251902cc135141079c09373f6494":"2020-10-09T14:40:27.316Z","0.0.0-d657a00e5cb8fefdc044c819308660f3d532aa0b":"2020-10-09T14:43:21.975Z","0.0.0-24513fb6cb6a0fecc202f7d2fa26ff8c14c86665":"2020-10-09T14:43:36.010Z","0.0.0-d5f01606f8649e7e3f0928840df2b79810b2dc39":"2020-10-14T02:52:51.686Z","0.5.5":"2020-10-14T02:54:17.507Z","0.0.0-d77f683beeed74a87a4ad8f893dd2f08472f73ea":"2020-10-14T04:05:05.006Z","0.5.6":"2020-10-14T04:06:18.491Z","0.0.0-3f96dacb2c3bfd284f394efddc58fd4d3334adcb":"2020-10-20T12:56:16.449Z","0.0.0-42f0475940a948b7ced20041365a47117d5ef745":"2020-11-03T01:27:14.744Z","0.6.0":"2020-11-03T01:31:02.261Z","0.0.0-ba3b233956d98a9e1ae72cbe784b102751d01e46":"2020-11-24T23:57:38.374Z","0.0.0-2243dad696c14ed6d431b1cdb779417a3417925c":"2020-11-25T01:26:11.454Z","0.0.0-abd9991f57aa8525d06b56f0cee8440aa60e9957":"2020-11-25T01:27:06.967Z","0.0.0-95497f1ceff5b9a40009caf9f09afbbcea508ea8":"2020-11-25T01:29:41.608Z","0.0.0-b0f263eb3feba2afb619e88957fe42ee295f9404":"2020-11-25T14:01:29.448Z","0.0.0-fc0e7746ac8f6c3b163b9f51033b9c63ca28fa59":"2020-11-25T14:01:35.336Z","0.0.0-43017f0c09b859703f0a54f843f650cde07f1e4c":"2020-12-11T07:23:24.650Z","0.0.0-ce53930daade0ad018f783d51088b6029f5a3c1b":"2020-12-12T16:38:46.697Z","0.0.0-01476a0577dc091bbb3794892af2114acec17f01":"2021-02-02T19:25:58.969Z","0.0.0-73d44b192984afdb788f6c3437dcb2d7dd3f7bbe":"2021-03-01T20:27:52.969Z","0.0.0-5e5d5d299f83c14ef2fd00c9cd73b871b7764af0":"2021-03-01T21:30:58.581Z","0.0.0-164951b424b91d5e2e3bbc28a27bbe7d98901f91":"2021-03-09T13:47:48.678Z","0.0.0-8384b997e9975e8d3cb95c09f0c61b0dfe8163bd":"2021-03-09T13:48:01.679Z","0.0.0-856adc2b11d36a507b9d37294c1d01c927906981":"2021-03-30T18:53:22.800Z","0.0.0-3eff05d42c847fea259b392a5a6c17192c5bd417":"2021-03-30T18:54:05.687Z","0.0.0-e75bcaa88da903348affd2d0f26b555cd77012b2":"2021-05-07T14:59:53.784Z","0.0.0-ec85decad6ee3cf321864c64f23fdc948b871401":"2021-05-07T15:08:15.543Z","0.0.0-703e5689c32d07265f61aa5b8e5947f674c40bc2":"2021-05-08T20:26:35.371Z","0.0.0-d540b383aa295776e50aff3d26a8ad4ab6aed72f":"2021-05-10T14:14:39.602Z","0.0.0-71973fd948b74f254493c07fb993a231c104339a":"2021-05-10T14:14:54.783Z","0.0.0-538459d5a8c95555580c74454d9099452709a0e5":"2021-05-25T13:10:50.519Z","0.0.0-3b0b9f3a7b52ef438821f4c9dc2a69cec202c6e3":"2021-06-11T12:46:29.758Z","0.0.0-601b401177d7f24078d567c104daaf24025c0b7f":"2021-06-21T21:07:08.173Z","0.0.0-db69d59c8ab0e7d62a99c9eb2366590e73e38de2":"2021-08-11T01:45:30.694Z","0.0.0-c920b8baa6c7fc98c3c79dfb7eb68ebfcc1e33ed":"2021-08-11T01:46:15.666Z","0.0.0-59837c5a166d9a123fdd6b4f8b2532e9731e37e1":"2021-08-11T01:46:23.965Z","0.0.0-00d73b71a671aae6b2cb6a64738660a6df90316d":"2021-08-11T12:59:27.900Z","0.0.0-2b09b0502245efa68d7eb45c45724a41bf5169f9":"2021-09-20T23:34:58.773Z","0.0.0-27031ce71c13a7ad199913a18fa97fb8c5eeeb0c":"2021-09-21T22:15:51.343Z","0.0.0-c73a04d11b04bc3da93e8ffba343a1994e2d0cc7":"2022-01-13T15:29:32.475Z","0.0.0-289b67e369f290d340ca106cf0d1121f59905b3d":"2022-01-18T14:25:12.443Z","0.0.0-216baed8006f356729af4d05afc9a5baebf1ccd5":"2022-01-18T19:59:09.718Z","0.0.0-1d282a835512161767258ebb39fd1a3299c29ac7":"2022-02-11T21:03:59.587Z","0.0.0-4180f7249a189c29f25214aa2c16e0369756920f":"2022-02-11T22:38:44.258Z","0.0.0-59eb72cb5e0293bb4d21a6e942d7f8c7a94da7d8":"2022-02-11T22:39:25.812Z","0.0.0-e15e17f91099fe40b6520e395c13b12a256e9f6b":"2022-02-11T22:39:38.511Z","0.0.0-e9c5c4ef07563a2d59a72576722de23eba36effd":"2022-02-11T22:39:54.875Z","0.0.0-dcd062debfa27e984db3da96a5ec3f539fee8e7c":"2022-02-11T22:41:47.445Z","0.0.0-6dbff25dc7d330b1e6c1bf5814b5f5e11c7ef3f8":"2022-02-11T22:42:08.079Z","0.0.0-230990378b104c94df485472ed56d3bf421b1090":"2022-02-11T22:48:46.004Z","0.0.0-26f7d56f6e6fc8d5b119181d17d3345f379a71a2":"2022-02-18T04:08:31.857Z","0.0.0-168ddf92335d0cebda10b8af98598fa6678d7bca":"2022-02-28T14:44:09.748Z","0.0.0-0edf6c7cf553ca809fa2aaf42ca0b44bfb82e8b8":"2022-04-01T02:13:28.587Z","0.0.0-acc26f11821c62d7eeebd8516c0ebc3d1e3b5c29":"2022-04-01T02:13:32.492Z","0.0.0-00bc9a83f886fbc32cf48bd2e91ad439589d9b64":"2022-04-01T02:41:18.612Z","0.0.0-106099d93ff026eff4915f4a58eadee1c35366a6":"2022-04-01T02:44:52.560Z","0.0.0-141f968ed747df82bc52661e88883d111c62d21f":"2022-04-01T03:01:45.421Z","0.7.0":"2022-04-01T03:05:26.569Z","0.0.0-9ae00701b7f3e14de67c6b4141da704716f64c2d":"2022-04-08T02:27:10.365Z","0.0.0-d0b88264b4168a85e3af5b0f1447035fe3a9fddf":"2022-04-08T03:01:42.141Z","0.7.1":"2022-04-08T03:05:23.043Z","0.0.0-4b0707379a13e71c169f7cf074a1a1ed12d41d8d":"2022-04-08T03:06:52.285Z","0.0.0-ce3d5f9dac50818f590b375887612a3224394dbd":"2022-06-24T23:09:33.998Z","0.0.0-a46aa115a20cc382dbdba3ebd70832f0640c1fb8":"2022-07-07T17:48:08.831Z","0.0.0-00bbb56c97caaa2b6e4f006901332adfd8710f15":"2022-07-07T17:52:37.034Z","0.7.2":"2022-07-07T17:57:36.301Z","0.0.0-ca388f5ee882adfcec89be216a24ec072066fd8f":"2022-08-19T00:56:22.045Z","0.0.0-86dd1be0d3967f7faee9a51ae4a11ab0acee668b":"2022-11-12T14:42:31.508Z","0.0.0-c71bdecb5d202eec4eabfd44ada9663af1ceaebf":"2022-12-13T18:52:46.860Z","0.0.0-b2c20d4988cc0905bbd02e01dd30607d0f590ecf":"2022-12-13T18:53:43.115Z","0.0.0-31c5b21de7462dd2e4097196473c1344c650316e":"2022-12-13T18:54:01.761Z","0.0.0-59f2e3ef182ece590d4a3965a98ceae00586b33a":"2022-12-13T18:59:43.002Z","0.0.0-646ed07afbdd69252fc6abcf91ad60866732a304":"2022-12-13T19:01:22.699Z","1.0.0":"2022-12-13T19:05:21.269Z","0.0.0-85a92d5ca8f51f993af8c2ed6a462d7af84cdfcb":"2022-12-13T19:15:21.267Z","0.0.0-fb9e9a368e807829b275bd771ee2dfa012f0a865":"2022-12-31T01:27:18.705Z","0.0.0-55650ae4a889ca456b2aa69b4835ffd69979911e":"2022-12-31T19:49:00.783Z","0.0.0-9deaee242beeefd2dd8b68a8e99220251d84f645":"2022-12-31T20:16:33.069Z","0.0.0-eb7d1aa4802d1821ef8a81f975fecfbbff31fc56":"2022-12-31T20:50:23.940Z","0.0.0-ee448e4a4fef2195014a9ad42ac5926e26067bdf":"2023-01-01T14:34:34.305Z","0.0.0-c4a39ad7536eadd000c961323fb78646d3796cfc":"2023-01-01T14:48:24.787Z","0.0.0-012e4b4cc129149e08e3db999b32d67e6a1f5be4":"2023-01-01T18:34:06.301Z","0.0.0-3e61fd338717c428b1f7a46fc639c20a4aa9bdab":"2023-01-01T19:12:15.756Z","0.0.0-bc3522e685cf106788b3be64db23771eed3b52a2":"2023-01-01T19:50:32.248Z","0.0.0-b810bc1d05f5dda312ccdde7d31989e8f63c3544":"2023-01-01T20:05:11.927Z","0.0.0-1d33ee4cbcee4eecfa0180bf7e601052e5119210":"2023-01-01T21:14:35.415Z","0.0.0-e4f94108497a6705a01f7d1a48b72ad7f22d8003":"2023-01-01T21:34:04.964Z","1.0.1":"2023-01-01T21:36:29.993Z","0.0.0-2fd8ef51c7f54f29babec69902570dfbd97bbea4":"2023-01-01T21:48:34.832Z","0.0.0-2bfec0d24f23adbe91327a22d3a808469215ea6f":"2023-01-01T21:51:21.480Z","0.0.0-7bb0f8da7138494e3e74e86a2ad3f41e3391ee60":"2023-01-02T00:00:08.052Z","0.0.0-235ad87f79981ccb797567d2201dd79ccd83cefc":"2023-01-02T03:38:43.795Z","0.0.0-bd1e7b3176eee6e4abe8ce4d949f5d9319a9d054":"2023-01-27T23:56:15.403Z","0.0.0-e47b28c47b51d204a642dd0f607c5c7ebae8c9a8":"2023-01-28T00:05:21.020Z","0.0.0-d1f9a3fe9727a5158bef70f2521c5d9b2676ab8d":"2023-01-28T00:05:46.625Z","0.0.0-28cb3d904ee43b860da2c10865f635bfe7c0c930":"2023-12-09T12:42:15.033Z","1.1.0":"2023-12-09T13:02:58.400Z","0.0.0-fbd54461938914b148d892ab4ed8c037b9735fc9":"2023-12-09T13:05:29.593Z"},"maintainers":[{"name":"bradenhs","email":"bradenhs@outlook.com"}],"description":"The flexible, type safe routing library.","readme":"","readmeFilename":"","homepage":"https://type-route.zilch.dev","keywords":["react","router","route","routing","history","link","type","types","typescript"],"repository":{"type":"git","url":"git+https://github.com/zilch/type-route.git"},"bugs":{"url":"https://github.com/zilch/type-route/issues"},"license":"MIT"}