{"_id":"@aetheryx/runtypes","_rev":"11-e60782c348a55dab103b7e91a84a8c08","time":{"5.1.0":"2020-09-16T23:15:37.871Z","created":"2020-09-16T23:29:43.994Z","5.1.1":"2020-09-16T23:29:44.161Z","modified":"2022-04-04T11:49:56.300Z","5.1.2":"2020-09-16T23:31:46.184Z","5.1.3":"2020-09-16T23:32:08.056Z","5.1.4":"2020-09-17T00:28:55.308Z","5.1.5":"2020-09-17T00:36:33.903Z","5.1.6":"2020-09-17T00:49:12.217Z","5.1.7":"2020-09-17T01:50:36.371Z","5.1.8":"2020-09-17T02:05:09.901Z"},"name":"@aetheryx/runtypes","dist-tags":{"latest":"5.1.8"},"versions":{"5.1.1":{"name":"@aetheryx/runtypes","version":"5.1.1","description":"Runtime validation for static types","main":"./lib/index.js","types":"./lib/index.d.ts","scripts":{"build":"tsc --pretty","format":"node scripts/format.js","test":"jest $([ \"$CI\" = true ] && echo --coverage || echo --watch)","coveralls":"cat ./coverage/lcov.info | ./node_modules/.bin/coveralls","typecheck":"tsc --noEmit --watch"},"author":{"name":"Thomas Crockett"},"license":"MIT","devDependencies":{"@types/jest":"24.0.18","coveralls":"^3.0.6","jest":"24.9.0","prettier":"^1.19.1","ts-jest":"^24.1.0","typescript":"^3.9.0"},"keywords:":["runtime","type","validation","typescript"],"repository":{"type":"git","url":"git+https://github.com/aetheryx/runtypes.git"},"jest":{"verbose":false,"testRegex":".*/*.spec.ts$","moduleFileExtensions":["js","ts"],"transform":{"\\.ts$":"ts-jest"},"testEnvironment":"node"},"dependencies":{},"gitHead":"9a2dea3ef0f67741d0716d3dce1cb6db972b98c9","bugs":{"url":"https://github.com/aetheryx/runtypes/issues"},"homepage":"https://github.com/aetheryx/runtypes#readme","_id":"@aetheryx/runtypes@5.1.1","_nodeVersion":"14.7.0","_npmVersion":"6.14.7","dist":{"integrity":"sha512-gF0tInWk9LoIFJR48MzIRV1xMLQVWDIZSgXJn6OS4lNBzmSmiKF0okqk6ZLF284wwkaHKV3Sn4KSJDRihZQSKg==","shasum":"def669d1d28457796e2a7472dc314989620301c8","tarball":"https://registry.npmjs.org/@aetheryx/runtypes/-/runtypes-5.1.1.tgz","fileCount":109,"unpackedSize":237669,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYp/oCRA9TVsSAnZWagAArPAP/iP1iiioul4VXNUDYHf8\nTH5LU6aVsXycBNShfhzzgjnRbAtz5v4JLDyXTXD/GbYMAw4lzs2pXafzta9B\nE2aPFpDnFZhMbG+EPaZ3IHio4T0lZb/p80wzpB0QsKEZ8kxYbH8i/IZIr3iQ\n2fmNZVtWlgLOQuwzI6J9ObyxLcFjWjNHcWkL7wRYEinuubpSnNaFN0zhoT/n\nhl3VjF/pyfCs9mmT3vfSCMrTBmqPBwO8cXEi9Jqn080rBKj4ve/lPNovc2hY\nx+KnuwOFVGL+RRZ20Sz+tLD1Kcwn0hHK4A/tcyYm428RvgPKWiGQ/789lnwy\nkAUzGqkFIDanER0oPGfytjgNRo6x9ZwqsW7vjJ9I/WUvc+5+Oep9sHAvHvJv\nUDtVgKrJoWhIubdBMYfrTEUSRqQ/4Uzem6izTjn0S2ttn0f0+T3p/VHLzWDQ\nzdnHuiuDZeLB1vygVyZY7+SHwG7MQOPU9+owgIZNxtmphRSJRqXADfClhnX3\ny+6S2GbHJZWWOzUuuMHktqpT+0C2G9EVoDP/IiHWrwX6Cz17O3GdHScooI9p\nNX5MGVWbzXu7tOAT0TxLd3JFdduS+1cex/jOcsxRmzvz+H7NtcvQ4dYpiFAk\ntQClo2Pq3cTjju5R9DW5HoRBp0ZdkoRM/lMKhegd7qpbm/dZlBChURb6bkQI\ny6ML\r\n=I6o1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC1+KIFCG8/DlQg+BJLRROKnVc3wIyxAJsy7KqdedOQVAiEAu/Pk7CR9RGFj3OAb9YrHLZeXwGHkE9V14eA1egq+Wrk="}]},"maintainers":[{"name":"aetheryx","email":"zain1@live.nl"}],"_npmUser":{"name":"aetheryx","email":"zain1@live.nl"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/runtypes_5.1.1_1600298984044_0.8761812872299406"},"_hasShrinkwrap":false},"5.1.2":{"name":"@aetheryx/runtypes","version":"5.1.2","description":"Runtime validation for static types","main":"./lib/index.js","types":"./lib/index.d.ts","scripts":{"build":"tsc --pretty -p .","format":"node scripts/format.js","test":"jest $([ \"$CI\" = true ] && echo --coverage || echo --watch)","coveralls":"cat ./coverage/lcov.info | ./node_modules/.bin/coveralls","typecheck":"tsc --noEmit --watch"},"author":{"name":"Thomas Crockett"},"license":"MIT","devDependencies":{"@types/jest":"24.0.18","coveralls":"^3.0.6","jest":"24.9.0","prettier":"^1.19.1","ts-jest":"^24.1.0","typescript":"^3.9.0"},"keywords:":["runtime","type","validation","typescript"],"repository":{"type":"git","url":"git+https://github.com/pelotom/runtypes.git"},"jest":{"verbose":false,"testRegex":".*/*.spec.ts$","moduleFileExtensions":["js","ts"],"transform":{"\\.ts$":"ts-jest"},"testEnvironment":"node"},"dependencies":{},"gitHead":"9a2dea3ef0f67741d0716d3dce1cb6db972b98c9","bugs":{"url":"https://github.com/pelotom/runtypes/issues"},"homepage":"https://github.com/pelotom/runtypes#readme","_id":"@aetheryx/runtypes@5.1.2","_nodeVersion":"14.7.0","_npmVersion":"6.14.7","dist":{"integrity":"sha512-MrL2QLALC1OT5LuHEDrv9Ez8N+xb+ZHozCqtbgtEfR0XgDC/wzP/XfyvL0Y03QTR7ZIfexRD1cvQ+IgYsNQeLA==","shasum":"afae079f82da798139421a7acb298e7b3546441d","tarball":"https://registry.npmjs.org/@aetheryx/runtypes/-/runtypes-5.1.2.tgz","fileCount":109,"unpackedSize":237673,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYqBiCRA9TVsSAnZWagAAWsgP/1jpZyPPhxvZO1eJ1NEJ\noa/blBCNi5Ati+B9pj+e9BxbV9uFYWAB5cgfMwT3wCb1oTUiVBDyuDrSLdsY\n/L/aZyFII++ObEFmOVVYkPsmkEWy/Pxp6V3pDIEQGtBAIjce6YCH0V5Yflk9\n5mm8oF0j4KJIqwNrxlWLIuWVfGC7vnDC4n/vqoECImleVQFCuzgXGXh5BLXb\nFf2DN/y4/l5/eYOLVosD/n6Ah/Xa/o9w+aduLYElO1xa5bOiYT0+k9o3AV7o\novNeW5YqCI4qIGE60mwOElKmi1Ii5NimlWEyUUxrpzuimgfx9QDIMAep7vA8\nD95EO/A/NTZtlnF2beVsidXLa8SMsyCGVYIjsoUAaiQNa+6gODVbdqnCZ5BR\n8aKtSl7psm2YVtSAWOIJPziJkSLv7s3oKnbsI/KhN2QyRSdZQP9Bp5OS9Pi1\n7fVHprued6rIpATa4DEZmUH9+C/DDQLXlPfR9hyBQuWbR6UVqYmT28oztZvn\nr1CEH6K04SHfWpMtSdYL0Fr9FFX79qJSzx4hIIACh8v++GmN5IvdmaHTU2mC\nDWWeexqKTltv0i+IFMfBU5QuqS8WZ4U8V/ldIPU2EI5lWUGcn5ZlHupRtHhS\na5FZf8uZzEfdCZ64rp6L0Xmtdh94EAeUSKu1YrfH8LW9av3LtBjsQixwwmab\nhMZ7\r\n=heSK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHHWQhzbyDJTJ7iHYzkjtfIwPedLR1qJ/1Q0JpJNfxcqAiAMmDFi5ojjcDuXOqLcxwGrEarlBnHUKGQlMHaNEx1Zxw=="}]},"maintainers":[{"name":"aetheryx","email":"zain1@live.nl"}],"_npmUser":{"name":"aetheryx","email":"zain1@live.nl"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/runtypes_5.1.2_1600299106055_0.43918728468849255"},"_hasShrinkwrap":false},"5.1.3":{"name":"@aetheryx/runtypes","version":"5.1.3","description":"Runtime validation for static types","main":"./lib/index.js","types":"./lib/index.d.ts","scripts":{"build":"tsc --pretty -p .","format":"node scripts/format.js","test":"jest $([ \"$CI\" = true ] && echo --coverage || echo --watch)","coveralls":"cat ./coverage/lcov.info | ./node_modules/.bin/coveralls","typecheck":"tsc --noEmit --watch"},"author":{"name":"Thomas Crockett"},"license":"MIT","devDependencies":{"@types/jest":"24.0.18","coveralls":"^3.0.6","jest":"24.9.0","prettier":"^1.19.1","ts-jest":"^24.1.0","typescript":"^3.9.0"},"keywords:":["runtime","type","validation","typescript"],"repository":{"type":"git","url":"git+https://github.com/aetheryx/runtypes.git"},"jest":{"verbose":false,"testRegex":".*/*.spec.ts$","moduleFileExtensions":["js","ts"],"transform":{"\\.ts$":"ts-jest"},"testEnvironment":"node"},"dependencies":{},"gitHead":"9a2dea3ef0f67741d0716d3dce1cb6db972b98c9","bugs":{"url":"https://github.com/aetheryx/runtypes/issues"},"homepage":"https://github.com/aetheryx/runtypes#readme","_id":"@aetheryx/runtypes@5.1.3","_nodeVersion":"14.7.0","_npmVersion":"6.14.7","dist":{"integrity":"sha512-3Z5FO6XXkbvGXi3FnSf6c6lK8BIhtgtNl+9zc9MKkKj7peclIzZJpuyZce+FMg/tkngR9Dk/6JFqDFBBoXLyWQ==","shasum":"202f89610d4f76b272d9ddbd42f4eca8afb73542","tarball":"https://registry.npmjs.org/@aetheryx/runtypes/-/runtypes-5.1.3.tgz","fileCount":109,"unpackedSize":237674,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYqB4CRA9TVsSAnZWagAArLwQAKBcBjfyW82WHg4qSww8\nU0+3RWXZ4hx/bEFeYkapHJGtrAxcVp1z5pgbbjbRZ9gof7FgirTO5nMLknuK\n+5nqiuJKxpScy+xI84ImxzyeOGaVv9AiF1DbJ6nz0DehvkRe2EvnQby4VFJh\no7R6wepn4xXMs0K9NEPmqv6BRNP0PCtthMUbQiL1fBD0Uz/1++1/ETu+Chvx\nTP4APvHx+RbS/ywvYsiiYnTJAqkz5F16zSmV7iH8VDGrn1F+HRVmduQVw0lP\nnjH0YpbWr3WIzcoPFxE6+rtAwQGx93yeXkV/YgYiN7AGIhpHlbmbZM2h9jzG\noZJbitv5DI+loxiHnCdUKjKbazRC25LA/L47S+TxMrXOp3M8X20eM3tqrFBS\nBL+62fwQ28IpUbtLcRZ/8YgNAk7++Zgz/l7AsViM6t2T+V9VIvxaaygGoJ+G\nhuaOhYRHYV71xeOOcDBpRdhOCI+C4qugKbCvGKn5N1qA8/qAw+Df5SkHR3/W\nTDyQv1iNn/Acs0MLHQUqhQBCI+6zc18F7gzITEfnp5eIx55ALDpv9x1VLL+1\nCLnLD1Q+ervHNy5v1holiP2CHYspTJ9ZP+QV/OBFmonZh1jlLhy/Svn4E4WE\nQGb5iMAgcLerE82EzZZGOMMvKDOkaCnIaaY35IqpkKTLoyBRI1vdHfYBOA1j\nJkbu\r\n=9M+r\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCjuA1EOeb408mfaeg1EURBQXMmtfjyPwfTBAZs27DkywIgMQx631LTu1kcNYPKAVmmy5nTfH4zgOo5tE/bYNhbj94="}]},"maintainers":[{"name":"aetheryx","email":"zain1@live.nl"}],"_npmUser":{"name":"aetheryx","email":"zain1@live.nl"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/runtypes_5.1.3_1600299127858_0.9947714189297461"},"_hasShrinkwrap":false},"5.1.4":{"name":"@aetheryx/runtypes","version":"5.1.4","description":"Runtime validation for static types","main":"./lib/index.js","types":"./lib/index.d.ts","scripts":{"build":"tsc --pretty","format":"node scripts/format.js","test":"jest $([ \"$CI\" = true ] && echo --coverage || echo --watch)","coveralls":"cat ./coverage/lcov.info | ./node_modules/.bin/coveralls","typecheck":"tsc --noEmit --watch"},"author":{"name":"Thomas Crockett"},"license":"MIT","devDependencies":{"@types/jest":"24.0.18","coveralls":"^3.0.6","jest":"24.9.0","prettier":"^1.19.1","ts-jest":"^24.1.0","typescript":"^3.9.0"},"keywords:":["runtime","type","validation","typescript"],"repository":{"type":"git","url":"git+https://github.com/aetheryx/runtypes.git"},"jest":{"verbose":false,"testRegex":".*/*.spec.ts$","moduleFileExtensions":["js","ts"],"transform":{"\\.ts$":"ts-jest"},"testEnvironment":"node"},"dependencies":{},"gitHead":"6196519fd0d1ee606d795c8f7f9f044f4ca2ad0e","bugs":{"url":"https://github.com/aetheryx/runtypes/issues"},"homepage":"https://github.com/aetheryx/runtypes#readme","_id":"@aetheryx/runtypes@5.1.4","_nodeVersion":"14.7.0","_npmVersion":"6.14.7","dist":{"integrity":"sha512-VsrvZuOfX4KJPDxLpYwTlr4QC7jtXKom8ZxzE06RFWj95l3hIqrMWvbIj1UTSsTTzqBWFb1D5GRdRJBF9k/Xcg==","shasum":"615f20811e65ff741fdc3ade5c22c1d2149a800f","tarball":"https://registry.npmjs.org/@aetheryx/runtypes/-/runtypes-5.1.4.tgz","fileCount":109,"unpackedSize":237676,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYq3HCRA9TVsSAnZWagAAVU0P/RVc2/sf5ElDzEfBQ/kX\n2AwIGVzKK/tXfn/42/qr4LJ9newuD8ADQad+w5QYH3m1fbd8QQQ68EDqJ7qF\njAIBRxyjZqozDItaWlQQsnOuxON22QrbpvFJ5jHm/ee0IvmhXbiEpNsNeK9/\nPB/insVZyFzQqsmagZpTcr+0iY9/2/o9Vk6G0G/f/TCqRcQjnvCfCyi51FpJ\nS9qa2PWBvWcXPUJkxJBmiwBZOCSxp/AxsgEqwlKJE1rAV2kU0RuPUPN6Q3hV\nIEe0hIB57j0tEWLhAdTyYNugPUBcoGMQxcHdzC8SfHj5aTVySbg5eujGz855\n1E43OOqtSvwrJMwskd6KXv+21yG9MfvQCvoMZ9R/36O3Kpve9MGSjbUABAn7\nlZkJ6tzBh6HSPI5qaUt6UGkDqiAb/Mr/harLrHqpkGEesvuDG2CpvEr5D1vQ\npomkG32jmB1eHPxIi4TND1DhxUlX4ZHAQ+bOdY26y/Jw8xBaO2QEPhzRQyMg\nkMeeN20h+Mht1UIVeFCs3ppvzeByLrxCYYZlojAzTExe4mq/Nm6UtU6SRbAe\nIbLpPCIQtDE2NrOW118ialFxCcF7OPGjnPHjq4SS44SXivB0zeEIsoozzLnF\nVer89byvpb9KfvyknhoQvG5/QmU34fvwl+Vn3p2D7Zr8QX8AFFvAyGv76C2N\nsRwD\r\n=b3Hs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBV1ISiapo12aMz+khvzKTUxgxmd8N2iPiM+CR+am7f8AiEAgLaH5oxMP2m9yLGWODWhjn+2waG5qmISUrTBYcb/usg="}]},"maintainers":[{"name":"aetheryx","email":"zain1@live.nl"}],"_npmUser":{"name":"aetheryx","email":"zain1@live.nl"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/runtypes_5.1.4_1600302535165_0.0784768192692169"},"_hasShrinkwrap":false},"5.1.5":{"name":"@aetheryx/runtypes","version":"5.1.5","description":"Runtime validation for static types","main":"./lib/index.js","types":"./lib/index.d.ts","scripts":{"build":"tsc --pretty","format":"node scripts/format.js","test":"jest $([ \"$CI\" = true ] && echo --coverage || echo --watch)","coveralls":"cat ./coverage/lcov.info | ./node_modules/.bin/coveralls","typecheck":"tsc --noEmit --watch"},"author":{"name":"Thomas Crockett"},"license":"MIT","devDependencies":{"@types/jest":"24.0.18","coveralls":"^3.0.6","jest":"24.9.0","prettier":"^1.19.1","ts-jest":"^24.1.0","typescript":"^3.9.0"},"keywords:":["runtime","type","validation","typescript"],"repository":{"type":"git","url":"git+https://github.com/aetheryx/runtypes.git"},"jest":{"verbose":false,"testRegex":".*/*.spec.ts$","moduleFileExtensions":["js","ts"],"transform":{"\\.ts$":"ts-jest"},"testEnvironment":"node"},"dependencies":{},"gitHead":"6196519fd0d1ee606d795c8f7f9f044f4ca2ad0e","bugs":{"url":"https://github.com/aetheryx/runtypes/issues"},"homepage":"https://github.com/aetheryx/runtypes#readme","_id":"@aetheryx/runtypes@5.1.5","_nodeVersion":"14.7.0","_npmVersion":"6.14.7","dist":{"integrity":"sha512-5sX4CpDtw3HZaKRSmE0fDPct4RTPRGGHzdaORpHzf2XwxjNhNtQBQwOBzamMAkVrCuHQASkpks1JZBIMsmBZoQ==","shasum":"ed54e3f2c1fefc051e73a5bfec9b5d63b33c5eff","tarball":"https://registry.npmjs.org/@aetheryx/runtypes/-/runtypes-5.1.5.tgz","fileCount":109,"unpackedSize":238073,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYq+SCRA9TVsSAnZWagAA2t4P/3i1JuZ154PZtIUDPwM/\n6vz6MDkW30VAYkXoOKgQqi07X+uPqxflUeRfKXt6T/vfWJFBcUuaVgx+7LPv\nU+TnSxV0RbBTG+eD1weh26ZcsFUR8Eh7uM7xgqzeBB6Cxay6siaa+lQpu4NK\nTXkQ6h+ua2DcsPohwsjTyJ709O2publnqFRZCF1SGoqv+3gnFUIesmWQH3Q3\nKRkkRs7xR4JMSIS1LyLqQnGVJ/t7WF/K9/rehXWB2Ngz9XHtcwaahwpJ2Di5\nt1eTo8codHXcntj2RNR82pSHzhkpIHlu9hz/zJlHLdVk2JBBAhCk7D7Ua63r\nfMoj5tO4Jn2fbx43Zhhp8HB42GDzJknNHTlEcYRtZ0rUVEcYpa50ac/vYdvo\nTKBRZZtXkO2UayO1WUD3zI5Op2yQCEzd5H8k6sX3v2r1cnnRbMBtgMpjpcAy\n5leFB4dipAlwj4Q3sw4LUT2mqD4UYlz16r2wZKMbwZb1cJaTcxnBqjDAz0+M\njxZl58QOEOHPyZOBfyj8KsDnRESgFZiFqNWC/ejYyqBPpii+yScnBlNZsrhE\n+MyKE7lgkGVo3YmuvzQMRfIM+9mkCuehJO6ZujIdnXDQQAhPxVuKQ9oI6Gcu\nbEmSOTL290viY1HsRztk0xNkSiFJmYRU73oBPhf0qAp4OsZEEbs9lz/Vraw0\n2g25\r\n=OGwk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD8hBvCNHFLLmNtD0ygKBaf3t8fWZbCyMWPWqpsU+TyXQIgHx4QDf6Uq1xSTDVbAOFLDj5AqZobCK7/ZST4J7yr0is="}]},"maintainers":[{"name":"aetheryx","email":"zain1@live.nl"}],"_npmUser":{"name":"aetheryx","email":"zain1@live.nl"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/runtypes_5.1.5_1600302993712_0.35947355467529185"},"_hasShrinkwrap":false},"5.1.6":{"name":"@aetheryx/runtypes","version":"5.1.6","description":"Runtime validation for static types","main":"./lib/index.js","types":"./lib/index.d.ts","scripts":{"build":"tsc --pretty","format":"node scripts/format.js","test":"jest $([ \"$CI\" = true ] && echo --coverage || echo --watch)","coveralls":"cat ./coverage/lcov.info | ./node_modules/.bin/coveralls","typecheck":"tsc --noEmit --watch"},"author":{"name":"Thomas Crockett"},"license":"MIT","devDependencies":{"@types/jest":"24.0.18","coveralls":"^3.0.6","jest":"24.9.0","prettier":"^1.19.1","ts-jest":"^24.1.0","typescript":"^3.9.0"},"keywords:":["runtime","type","validation","typescript"],"repository":{"type":"git","url":"git+https://github.com/aetheryx/runtypes.git"},"jest":{"verbose":false,"testRegex":".*/*.spec.ts$","moduleFileExtensions":["js","ts"],"transform":{"\\.ts$":"ts-jest"},"testEnvironment":"node"},"dependencies":{},"gitHead":"7f8b93b08530ce1e5c2f0e4be446e972eae0990a","bugs":{"url":"https://github.com/aetheryx/runtypes/issues"},"homepage":"https://github.com/aetheryx/runtypes#readme","_id":"@aetheryx/runtypes@5.1.6","_nodeVersion":"14.7.0","_npmVersion":"6.14.7","dist":{"integrity":"sha512-dtO2yWEy9QW9Z0eg2ym8I5J7CEG/I50UtnepzYn1N5PEP7LadOh8zWFfirpRDwdxYevvCT03XwwhhuiR+OvUoQ==","shasum":"edb75db224108f8c455dfc9c98e395cfda1f8ee3","tarball":"https://registry.npmjs.org/@aetheryx/runtypes/-/runtypes-5.1.6.tgz","fileCount":171,"unpackedSize":336393,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYrKICRA9TVsSAnZWagAAD+8QAJn6G5FG7si1qga5674n\nsZMFXvfWJMqbRfqHvlPCkPnXc+OCUYuN76q3h0D0NLH+yfkwzVqxJGe/AfN4\nANwmaNs+dcXkQPImOj3lunDBu/aiGHez61DjTKsu4qb659YcoXNYYPiq+AnZ\nhw5Qoylfox9hUPWoKjQizNyHKk1GpH+gcKR8Z85DFCSVVaHg8HixU8n1XlXg\n1asufqQkYc5QNUBhHz5Vwk9Vs7f8Ldrukvs8v97OYq4KYkqqfodJEjEorZoe\nn4WxifPDbzRMC31ks+swNAumxVEU2QbpTAdTozU/0t0GgfJn7iqC/UBreek4\nTajOW8iayl3N0f+cCotbSUhFG2TguEGLM89eHsh2mD42/T/swmGTu59r22M5\nvZuEBjtmLUSWYMiZTsa+QP4bSASt/WnQhm0TDVf8RH2nK/GOxSGM2/j4Nngh\nIwUglHFLD7yVcDHJ1CHHoZovw0HWixtubeb7W8fz5MBABm3XZPgPjDU+ERsH\n84+VpOm/eaw7zcGrBfr8vlI3tXkSr/0EcTqUQHj3Pk4314Q5OUm0PYKDFNNa\ny9p5IzQrx5LBdyes3/7Eah9v91D8yVxuOZk6WwGMORU57YZHnhJ4CYEvO9aS\nZ3ePoSeXuoRuyusdE7cenp3KzB1zY3fHGJsBHajrWC/qMzzf2Mjo15rWOSxU\n35Z3\r\n=hsYf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDM0WkhKZkiG+bRS4DdmA5E5ByYjaYU3/F+AnTFPI4x8AIgagUQ+dit6AQml5htnQB1MgaJh3Tto0IGErCNEUtaeI0="}]},"maintainers":[{"name":"aetheryx","email":"zain1@live.nl"}],"_npmUser":{"name":"aetheryx","email":"zain1@live.nl"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/runtypes_5.1.6_1600303751928_0.5858063206680599"},"_hasShrinkwrap":false},"5.1.7":{"name":"@aetheryx/runtypes","version":"5.1.7","description":"Runtime validation for static types","main":"./lib/index.js","types":"./lib/index.d.ts","scripts":{"build":"tsc --pretty","format":"node scripts/format.js","test":"jest $([ \"$CI\" = true ] && echo --coverage || echo --watch)","coveralls":"cat ./coverage/lcov.info | ./node_modules/.bin/coveralls","typecheck":"tsc --noEmit --watch"},"author":{"name":"Thomas Crockett"},"license":"MIT","devDependencies":{"@types/jest":"24.0.18","coveralls":"^3.0.6","jest":"24.9.0","prettier":"^1.19.1","ts-jest":"^24.1.0","typescript":"^3.9.0"},"keywords:":["runtime","type","validation","typescript"],"repository":{"type":"git","url":"git+https://github.com/aetheryx/runtypes.git"},"jest":{"verbose":false,"testRegex":".*/*.spec.ts$","moduleFileExtensions":["js","ts"],"transform":{"\\.ts$":"ts-jest"},"testEnvironment":"node"},"dependencies":{},"gitHead":"3313e2924e0b38a3cc4face229f22c6808936a01","bugs":{"url":"https://github.com/aetheryx/runtypes/issues"},"homepage":"https://github.com/aetheryx/runtypes#readme","_id":"@aetheryx/runtypes@5.1.7","_nodeVersion":"14.7.0","_npmVersion":"6.14.7","dist":{"integrity":"sha512-n5M6nSuCaQgDZWPYkTbVbnHx/uX88B6p+M8+EjqImQoaVlOhHVqUKsKwO1/469v7FOGTvg84/YnCpZb3BIEq/Q==","shasum":"cee627f498f9d84a325de6487380f34426012b5d","tarball":"https://registry.npmjs.org/@aetheryx/runtypes/-/runtypes-5.1.7.tgz","fileCount":171,"unpackedSize":336639,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYsDsCRA9TVsSAnZWagAAo5QP/jxC+zyVEgTvuyYppqoE\nqS4j5QwjHpxDgI7VEgDgApzbXaxCupZ8ZlH3xzgrcv8/BSRDtriRJwvsX0cc\nBP9e7rfgx/tOzf/M77Za6sHmcTpIiaC5WCnf2/3RtLWnYv/HSp/LPm3aK9S0\nEp0boTr2pamxjcKvJ3kCaPfkBOYj1hkK/hDTTrqpJTbAwJ3BzNHZoewUySi5\naoWNIZp5Sk3Ujbo/dlfb/pGnP9pvLt1H+b9crxlqcqaZgzIjUQOPEhUj6rzQ\nC/RJ9gZ/E0AxibtpOeMJddiV09zCGI2BQhXHKaPyBhMAETTXHtXAae8q3c+o\nQvOfBTeo34dtMz7aqcmEj1A7DFiIG/QRRAsW82KgbJll+jUPhgxKKOYJczhA\ncqNwANk97yyqOpBXT2x9Wlx/F1Io9GAYFzYRo4s9N3k0UMqUfLlFZdPYxYml\nVsXihQei0pd8PyO1UPTdRfoUH90X92T10Uc9l63Yv8YCqlAv9Q77BgskROxO\nkKHmq/0sVK7YqpYRK+R4sSRnzJTsIgO/Db8WFmZQKdL0gRUYAdNtmGmg1NY2\nthrZWf2tY2ApRCFxcpixMoSvE+bjU9+2qpALuyggvRrda4/weMQHeAWv7RkN\nUS9RuX2r3E1YoeStNq9UG6En6AwglZfJKNH7M07Zt80KnY91IOPxMf3/q5L5\nhsT9\r\n=sSsv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCRCSLwXCmOEKU3uZFSKaxmP8YEni9td18HWUKT9IkpAQIhAJImNa40/7nMFhllqEUMNWImJI6TVSRmzqJw7kuOQ7G6"}]},"maintainers":[{"name":"aetheryx","email":"zain1@live.nl"}],"_npmUser":{"name":"aetheryx","email":"zain1@live.nl"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/runtypes_5.1.7_1600307436245_0.766195010833685"},"_hasShrinkwrap":false},"5.1.8":{"name":"@aetheryx/runtypes","version":"5.1.8","description":"Runtime validation for static types","main":"./lib/index.js","types":"./lib/index.d.ts","scripts":{"build":"tsc --pretty","format":"node scripts/format.js","test":"jest $([ \"$CI\" = true ] && echo --coverage || echo --watch)","coveralls":"cat ./coverage/lcov.info | ./node_modules/.bin/coveralls","typecheck":"tsc --noEmit --watch"},"author":{"name":"Thomas Crockett"},"license":"MIT","devDependencies":{"@types/jest":"24.0.18","coveralls":"^3.0.6","jest":"24.9.0","prettier":"^1.19.1","ts-jest":"^24.1.0","typescript":"^3.9.0"},"keywords:":["runtime","type","validation","typescript"],"repository":{"type":"git","url":"git+https://github.com/aetheryx/runtypes.git"},"jest":{"verbose":false,"testRegex":".*/*.spec.ts$","moduleFileExtensions":["js","ts"],"transform":{"\\.ts$":"ts-jest"},"testEnvironment":"node"},"dependencies":{},"gitHead":"3313e2924e0b38a3cc4face229f22c6808936a01","bugs":{"url":"https://github.com/aetheryx/runtypes/issues"},"homepage":"https://github.com/aetheryx/runtypes#readme","_id":"@aetheryx/runtypes@5.1.8","_nodeVersion":"14.7.0","_npmVersion":"6.14.7","dist":{"integrity":"sha512-2GrM1+o5bBKPsgLZBiiZJR/HyKlgspWAB/I0SrEu4Ic5rhro4aM3On13T71OloeMj/vfUQmTqnAvrJTTDzceBQ==","shasum":"0bbb1231ea8fd9adee22e6e0e112d4fbcb205e9a","tarball":"https://registry.npmjs.org/@aetheryx/runtypes/-/runtypes-5.1.8.tgz","fileCount":171,"unpackedSize":336800,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYsRWCRA9TVsSAnZWagAAvJYP/0bNZy1CvHOznITdOocT\nmlvvce/szT41XXAE1ImlJxQmGoKiV2XIZmgKT3gHNcnf0/nN2MyT3yRYXiyE\nrkB0ayV94wmRTJ7z+7OMKVTJ9EMiYjBJ76nIHaa3dghNpjfpyqqolOXcQ4Ew\nT4yhw57KgMEjY+oCQqezVNnjLz/nuDyiy0AbSUFnh34Uw2NIIfs0FoFIZiz6\nV9fdTjIXasqiKpESv7X2Ky/1tpgW5SU2/PG5v+7XwzSUcSrWftVXTqNQlnxy\nq6OZKP9N98MD/1KCAfgugOFqYmK79nqtU/4YkAHXSCn1C7IJde2Z3hpfRQiP\n8C5WR29XKsLThlc3DGAQw/og2A60DYXxhCzgbNGtrsWcHwQoPsvAfKwAaxY4\nVY2u+AMO1lIQnDxjwxFSua9qLFmnhVMVZZBJH+DhbLDJDp4eYuBHx4yF9lCr\nxUqpshF2+9NlTxTuZPnttDlm5o4uC80TlyGgs4zyKnIUEjKM01UIG4DoAJkZ\ncoxkwcsiUT2AF95AiL+Wi7uPE8DQeZOz+tFu8Ls93uu4ApJnOFDAwzrKwPpc\nYiUjIZIpQdyVAsVF6UknZpwYHBTFcCSAYzgwxb9jtez0xlFzkw74Ikw5VO0D\n1H1KtklqvZyBC49IiG0I2Wx5AnVmmpmJaz5Qv6dKVXY4h3xNEYzg2Uu8oxzg\njcfn\r\n=2CjW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6MS6d/vl2Ttl6u6OEDWiyX6hvjzpCviGpfd3cnsSYuQIgdQeNY2IwtTh9tXBiLd0h8lnfsUFqwQxfZblgiOJ55YM="}]},"maintainers":[{"name":"aetheryx","email":"zain1@live.nl"}],"_npmUser":{"name":"aetheryx","email":"zain1@live.nl"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/runtypes_5.1.8_1600308309593_0.5572880433568337"},"_hasShrinkwrap":false}},"maintainers":[{"name":"aetheryx","email":"zain1@live.nl"}],"description":"Runtime validation for static types","homepage":"https://github.com/aetheryx/runtypes#readme","repository":{"type":"git","url":"git+https://github.com/aetheryx/runtypes.git"},"author":{"name":"Thomas Crockett"},"bugs":{"url":"https://github.com/aetheryx/runtypes/issues"},"license":"MIT","readme":"# Runtypes [![Build Status](https://travis-ci.org/pelotom/runtypes.svg?branch=master)](https://travis-ci.org/pelotom/runtypes) [![Coverage Status](https://coveralls.io/repos/github/pelotom/runtypes/badge.svg?branch=master)](https://coveralls.io/github/pelotom/runtypes?branch=master)\r\n\r\n### Safely bring untyped data into the fold\r\n\r\nRuntypes allow you to take values about which you have no assurances and check that they conform to some type `A`.\r\nThis is done by means of composable type validators of primitives, literals, arrays, tuples, records, unions,\r\nintersections and more.\r\n\r\n## Installation\r\n\r\n```\r\nnpm install --save runtypes\r\n```\r\n\r\n## Example\r\n\r\nSuppose you have objects which represent asteroids, planets, ships and crew members. In TypeScript, you might write their types like so:\r\n\r\n```ts\r\ntype Vector = [number, number, number];\r\n\r\ntype Asteroid = {\r\n  type: 'asteroid';\r\n  location: Vector;\r\n  mass: number;\r\n};\r\n\r\ntype Planet = {\r\n  type: 'planet';\r\n  location: Vector;\r\n  mass: number;\r\n  population: number;\r\n  habitable: boolean;\r\n};\r\n\r\ntype Rank = 'captain' | 'first mate' | 'officer' | 'ensign';\r\n\r\ntype CrewMember = {\r\n  name: string;\r\n  age: number;\r\n  rank: Rank;\r\n  home: Planet;\r\n};\r\n\r\ntype Ship = {\r\n  type: 'ship';\r\n  location: Vector;\r\n  mass: number;\r\n  name: string;\r\n  crew: CrewMember[];\r\n};\r\n\r\ntype SpaceObject = Asteroid | Planet | Ship;\r\n```\r\n\r\nIf the objects which are supposed to have these shapes are loaded from some external source, perhaps a JSON file, we need to\r\nvalidate that the objects conform to their specifications. We do so by building corresponding `Runtype`s in a very straightforward\r\nmanner:\r\n\r\n```ts\r\nimport { Boolean, Number, String, Literal, Array, Tuple, Record, Union } from 'runtypes';\r\n\r\nconst Vector = Tuple(Number, Number, Number);\r\n\r\nconst Asteroid = Record({\r\n  type: Literal('asteroid'),\r\n  location: Vector,\r\n  mass: Number,\r\n});\r\n\r\nconst Planet = Record({\r\n  type: Literal('planet'),\r\n  location: Vector,\r\n  mass: Number,\r\n  population: Number,\r\n  habitable: Boolean,\r\n});\r\n\r\nconst Rank = Union(\r\n  Literal('captain'),\r\n  Literal('first mate'),\r\n  Literal('officer'),\r\n  Literal('ensign'),\r\n);\r\n\r\nconst CrewMember = Record({\r\n  name: String,\r\n  age: Number,\r\n  rank: Rank,\r\n  home: Planet,\r\n});\r\n\r\nconst Ship = Record({\r\n  type: Literal('ship'),\r\n  location: Vector,\r\n  mass: Number,\r\n  name: String,\r\n  crew: Array(CrewMember),\r\n});\r\n\r\nconst SpaceObject = Union(Asteroid, Planet, Ship);\r\n```\r\n\r\n(See the [examples](examples) directory for an expanded version of this.)\r\n\r\nNow if we are given a putative `SpaceObject` we can validate it like so:\r\n\r\n```ts\r\n// spaceObject: SpaceObject\r\nconst spaceObject = SpaceObject.check(obj);\r\n```\r\n\r\nIf the object doesn't conform to the type specification, `check` will throw an exception.\r\n\r\n## Static type inference\r\n\r\nIn TypeScript, the inferred type of `Asteroid` in the above example is\r\n\r\n```ts\r\nRuntype<{\r\n  type: 'asteroid'\r\n  location: [number, number, number]\r\n  mass: number\r\n}>\r\n```\r\n\r\nThat is, it's a `Runtype<Asteroid>`, and you could annotate it as such. But we don't really have to define the\r\n`Asteroid` type in TypeScript at all now, because the inferred type is correct. Defining each of your types\r\ntwice, once at the type level and then again at the value level, is a pain and not very [DRY](https://en.wikipedia.org/wiki/Don't_repeat_yourself).\r\nFortunately you can define a static `Asteroid` type which is an alias to the `Runtype`-derived type like so:\r\n\r\n```ts\r\nimport { Static } from 'runtypes';\r\n\r\ntype Asteroid = Static<typeof Asteroid>;\r\n```\r\n\r\nwhich achieves the same result as\r\n\r\n```ts\r\ntype Asteroid = {\r\n  type: 'asteroid';\r\n  location: [number, number, number];\r\n  mass: number;\r\n};\r\n```\r\n\r\n## Type guards\r\n\r\nIn addition to providing a `check` method, runtypes can be used as [type guards](https://basarat.gitbook.io/typescript/type-system/typeguard):\r\n\r\n```ts\r\nfunction disembark(obj: {}) {\r\n  if (SpaceObject.guard(obj)) {\r\n    // obj: SpaceObject\r\n    if (obj.type === 'ship') {\r\n      // obj: Ship\r\n      obj.crew = [];\r\n    }\r\n  }\r\n}\r\n```\r\n\r\n## Pattern matching\r\n\r\nThe `Union` runtype offers the ability to do type-safe, exhaustive case analysis across its variants using the `match` method:\r\n\r\n```ts\r\nconst isHabitable = SpaceObject.match(\r\n  asteroid => false,\r\n  planet => planet.habitable,\r\n  ship => true,\r\n);\r\n\r\nif (isHabitable(spaceObject)) {\r\n  // ...\r\n}\r\n```\r\n\r\nThere's also a top-level `match` function which allows testing an ad-hoc sequence of runtypes:\r\n\r\n```ts\r\nconst makeANumber = match(\r\n  [Number, n => n * 3],\r\n  [Boolean, b => b ? 1 : 0],\r\n  [String, s => s.length],\r\n);\r\n\r\nmakeANumber(9); // = 27\r\n```\r\n\r\nTo allow the function to be applied to anything and then handle match failures, simply use an `Unknown` case at the end:\r\n\r\n```ts\r\nconst makeANumber = match(\r\n  [Number, n => n * 3],\r\n  [Boolean, b => b ? 1 : 0],\r\n  [String, s => s.length],\r\n  [Unknown, () => 42]\r\n);\r\n```\r\n\r\n## Constraint checking\r\n\r\nBeyond mere type checking, we can add arbitrary runtime constraints to a `Runtype`:\r\n\r\n```ts\r\nconst Positive = Number.withConstraint(n => n > 0);\r\n\r\nPositive.check(-3); // Throws error: Failed constraint check\r\n```\r\n\r\nYou can provide more descriptive error messages for failed constraints by returning\r\na string instead of `false`:\r\n\r\n```ts\r\nconst Positive = Number.withConstraint(n => n > 0 || `${n} is not positive`);\r\n\r\nPositive.check(-3); // Throws error: -3 is not positive\r\n```\r\n\r\nYou can set a custom name for your runtype, which will be used in default error\r\nmessages and reflection, by using the `name` prop on the optional `options`\r\nparameter: \r\n\r\n```typescript\r\nconst C = Number.withConstraint(n => n > 0, {name: 'PositiveNumber'});\r\n```\r\n\r\nTo change the type, there are two ways to do it: passing a type guard function\r\nto a new `Runtype.withGuard()` method, or using the familiar\r\n`Runtype.withConstraint()` method. (Both methods also accept an `options`\r\nparameter to optionally set the name.) \r\n\r\nUsing a type guard function is the easiest option to change the static type,\r\nbecause TS will infer the desired type from the return type of the guard\r\nfunction.\r\n\r\n```typescript\r\n// use Buffer.isBuffer, which is typed as: isBuffer(obj: any): obj is Buffer;\r\nconst B = Unknown.withGuard(Buffer.isBuffer);\r\ntype T = Static<typeof B>; // T is Buffer\r\n```\r\n\r\nHowever, if you want to return a custom error message from your constraint\r\nfunction, you can't do this with a type guard because these functions can only\r\nreturn boolean values.  Instead, you can roll your own constraint function and\r\nuse the `withConstraint<T>()` method. Remember to specify the type parameter for\r\nthe `Constraint` because it can't be inferred from your check function!\r\n\r\n```typescript\r\nconst check = (o: any) => Buffer.isBuffer(o) || 'Dude, not a Buffer!';\r\nconst B = Unknown.withConstraint<Buffer>(check);\r\ntype T = Static<typeof B>; // T will have type of `Buffer`\r\n```\r\n\r\nOne important choice when changing `Constraint` static types is choosing the\r\ncorrect underlying type. The implementation of `Constraint` will validate the\r\nunderlying type *before* running your constraint function. So it's important to\r\nuse a lowest-common-denominator type that will pass validation for all expected\r\ninputs of your constraint function or type guard.  If there's no obvious\r\nlowest-common-denominator type, you can always use `Unknown` as the underlying\r\ntype, as shown in the `Buffer` examples above.  \r\n\r\nSpeaking of base types, if you're using a type guard function and your base type\r\nis `Unknown`, then there's a convenience runtype `Guard` available, which is a\r\nshorthand for `Unknown.withGuard`.\r\n\r\n```typescript\r\n// use Buffer.isBuffer, which is typed as: isBuffer(obj: any): obj is Buffer;\r\nconst B = Guard(Buffer.isBuffer);\r\ntype T = Static<typeof B>; // T will have type of `Buffer`\r\n```\r\n\r\n## Function contracts\r\n\r\nRuntypes along with constraint checking are a natural fit for enforcing function\r\ncontracts. You can construct a contract from `Runtype`s for the parameters and\r\nreturn type of the function:\r\n\r\n```ts\r\nconst divide = Contract(\r\n  // Parameters:\r\n  Number,\r\n  Number.withConstraint(n => n !== 0 || 'division by zero'),\r\n  // Return type:\r\n  Number,\r\n).enforce((n, m) => n / m);\r\n\r\ndivide(10, 2); // 5\r\n\r\ndivide(10, 0); // Throws error: division by zero\r\n```\r\n\r\n## Optional values\r\n\r\nRuntypes can be used to represent a variable that may be null or undefined\r\nas well as representing keys within records that may or may not be present.\r\n\r\n\r\n```ts\r\n// For variables that might be undefined or null\r\nconst MyString = String;                    // string             (e.g. 'text')\r\nconst MyStringMaybe = String.Or(Undefined); // string | undefined (e.g. 'text', undefined)\r\nconst MyStringNullable = String.Or(Null);   // string | null      (e.g. 'text', null)\r\n```\r\n\r\nIf a `Record` may or may not have some keys, we can declare the optional\r\nkeys using `myRecord.And(Partial({ ... }))`.  Partial keys validate successfully if\r\nthey are absent or undefined (but not null) or the type specified\r\n(which can be null).\r\n\r\n```ts\r\n// Using `Ship` from above\r\nconst RegisteredShip = Ship.And(Record({\r\n  // All registered ships must have this flag\r\n  isRegistered: Literal(true),\r\n})).And(Partial({\r\n  // We may or may not know the ship's classification\r\n  shipClass: Union(Literal('military'), Literal('civilian')),\r\n\r\n  // We may not know the ship's rank (so we allow it to be undefined via `Partial`),\r\n  // we may also know that a civilian ship doesn't have a rank (e.g. null)\r\n  rank: Rank.Or(Null),\r\n}));\r\n```\r\n\r\nIf a record has keys which _must be present_ but can be null, then use\r\nthe `Record` runtype normally instead.\r\n\r\n```ts\r\nconst MilitaryShip = Ship.And(Record({\r\n  shipClass: Literal('military'),\r\n  \r\n  // Must NOT be undefined, but can be null\r\n  lastDeployedTimestamp: Number.Or(Null),\r\n}));\r\n```\r\n\r\n## Readonly records and arrays\r\n\r\nArray and Record runtypes have a special function `.asReadonly()`, that creates a new runtype where the values are readonly.\r\n\r\nFor example:\r\n\r\n```typescript\r\nconst Asteroid = Record({\r\n  type: Literal('asteroid'),\r\n  location: Vector,\r\n  mass: Number,\r\n}).asReadonly()\r\n\r\nStatic<typeof Asteroid> // { readonly type: 'asteroid', readonly location: Vector, readonly mass: number }\r\n\r\nconst AsteroidArray = Array(Asteroid).asReadonly()\r\n\r\nStatic<typeof AsteroidArray> // ReadonlyArray<Asteroid>\r\n```\r\n\r\n## Related libraries\r\n\r\n* [runtypes-generate](https://github.com/typeetfunc/runtypes-generate) Generates random data by `Runtype` for property-based testing\r\n* [rest.ts](https://github.com/hmil/rest.ts) Allows building type safe and runtime-checked APIs\r\n","readmeFilename":"README.md"}