{"_id":"assert-never","_rev":"8-530cf62cae415ff9fb44665f36befe90","name":"assert-never","dist-tags":{"latest":"1.4.0"},"versions":{"1.0.0":{"name":"assert-never","version":"1.0.0","keywords":["typescript","discriminated union"],"author":{"name":"Daniel Lytkin","email":"dan.lytkin@gmail.com"},"license":"MIT","_id":"assert-never@1.0.0","maintainers":[{"name":"aikoven","email":"dan.lytkin@gmail.com"}],"homepage":"https://github.com/aikoven/assert-never#readme","bugs":{"url":"https://github.com/aikoven/assert-never/issues"},"dist":{"shasum":"8071f3a681c81ffeafa6d5c2f3aa049a76b07226","tarball":"https://registry.npmjs.org/assert-never/-/assert-never-1.0.0.tgz","integrity":"sha512-j6dh+VKTPKFfTEBo2vWgr+4193jE4rm7OP+8Lb/Jp414w3dofCaRaGERKPR6/jKB+UHrOMcUsLAqc96UjFlSoQ==","signatures":[{"sig":"MEUCIQDBYv4Crwq8m7/wAbT4D1gst/P5U8R7ae6QKxvrvTl3YQIgeZKTHkLkO0YHWHdJ5XFmlSQN/jRhkRoIVr9XxKt8jm0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"8071f3a681c81ffeafa6d5c2f3aa049a76b07226","gitHead":"718d32467abe1d306005032ebee5711ec0caf525","scripts":{"build":"tsc","prepublish":"npm run build"},"typings":"index.d.ts","_npmUser":{"name":"aikoven","email":"dan.lytkin@gmail.com"},"repository":{"url":"git+https://github.com/aikoven/assert-never.git","type":"git"},"_npmVersion":"3.10.10","description":"Helper function for exhaustive checks of discriminated unions in TypeScript","directories":{},"_nodeVersion":"6.10.0","devDependencies":{"typescript":"^2.2.1"},"_npmOperationalInternal":{"tmp":"tmp/assert-never-1.0.0.tgz_1490617110006_0.048595757223665714","host":"packages-18-east.internal.npmjs.com"}},"1.1.0":{"name":"assert-never","version":"1.1.0","keywords":["typescript","discriminated unions","assert","never"],"author":{"name":"Daniel Lytkin","email":"dan.lytkin@gmail.com"},"license":"MIT","_id":"assert-never@1.1.0","maintainers":[{"name":"aikoven","email":"dan.lytkin@gmail.com"}],"homepage":"https://github.com/aikoven/assert-never#readme","bugs":{"url":"https://github.com/aikoven/assert-never/issues"},"dist":{"shasum":"e7ac87d6d0191f19f19694c1266a2dd5c9e3becb","tarball":"https://registry.npmjs.org/assert-never/-/assert-never-1.1.0.tgz","integrity":"sha512-2UWrFcOh9vapYO4Me26dZWgFK4x0F9cyVR17v/hkf/J6z6RtZGKFWzmWMg65+9fQLpAv0o7wx+U8b3DFLSh1rw==","signatures":[{"sig":"MEYCIQCt6y+LDOk+m+4n+S3xqkp9Y8EBdzgDacAEG6hpQps3cgIhAI1uQBC3qPfjmzFpChaX71idb+SvDvZThDzQtGCSoaYO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","gitHead":"2f4387a213003fa64d5bf5afb21a34f72fee475a","scripts":{"build":"tsc","prepublish":"npm run build"},"typings":"index.d.ts","_npmUser":{"name":"aikoven","email":"dan.lytkin@gmail.com"},"repository":{"url":"git+https://github.com/aikoven/assert-never.git","type":"git"},"_npmVersion":"5.6.0","description":"Helper function for exhaustive checks of discriminated unions in TypeScript","directories":{},"_nodeVersion":"8.9.1","devDependencies":{"typescript":"^2.2.1"},"_npmOperationalInternal":{"tmp":"tmp/assert-never-1.1.0.tgz_1514174704758_0.9342390205711126","host":"s3://npm-registry-packages"}},"1.2.0":{"name":"assert-never","version":"1.2.0","keywords":["typescript","discriminated unions","assert","never"],"author":{"name":"Daniel Lytkin","email":"dan.lytkin@gmail.com"},"license":"MIT","_id":"assert-never@1.2.0","maintainers":[{"name":"aikoven","email":"dan.lytkin@gmail.com"}],"homepage":"https://github.com/aikoven/assert-never#readme","bugs":{"url":"https://github.com/aikoven/assert-never/issues"},"dist":{"shasum":"e6597ed9e357f7e62c074dfa7c71e30ed7b67a8b","tarball":"https://registry.npmjs.org/assert-never/-/assert-never-1.2.0.tgz","fileCount":6,"integrity":"sha512-61QPxh2lfV5j2dBsEtwhz8/sUj+baAIuCpQxeWorGeMxlTkbeyGyq7igxJB8yij1JdzUhyoiekNHMXrMYnkjvA==","signatures":[{"sig":"MEYCIQDr7JJO8LPhfnTMqfVUlZ8N1U2I0ZgLxjp1Zi1mBuS9iwIhAOtKybYK7RrsxruC/e4cfMZ3vMerb2SNFMBlTSsxvRjV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3832,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcv9tsCRA9TVsSAnZWagAA1LgP/3Byr37OkXtSnq1/KPDm\nxQ/YeVIu2+2xhn0YbKay7YnTzNXie3hP18mIDKPxNzsGSA3KVi6W5UIfY/xV\n23q33Mybb1+yvmJ+wa69iHGYj3Y3/in37VjCP4xLOz8m1rDdX8mWa1anJmaX\na+kfTvWK4At/dw0ksPegNlrolM9Ibs7/2r1MlQAHh8dt2jQS+a52wQQopZn5\nS/jhi1hu7LHPEN27LyK+Tqm28wZzIcnoqi+6EMQE4njvtzMvZ6LGaBqJP+sA\nal9gryHQqEo2x02wjfQ9rI6v5p+DJwHG6sc/hSWt+KZ/SCJYpovvy5/KbTjp\nbYEUea6qqgvzTmlTUEHoE/7C+LOp3jTnrViiny/SY/RdJpwAhvTn9/68UddB\nm8edKNMvytg9IFy50ctEBzoScVYKtyeoBWrZg9yIoV1fVdG5OrOTMPww8fO8\n1go6PMZIHcFjTDzb2izWfawTUq+MR3o9EYu9pEJXKAB2d5S/1P119uJqpm6/\n4cmlANrRQ1ox/LYjlt2FORM2Uod6A0H2vDkVOOj5BWwbzISwMeYRz6st3CYq\nXYJaxyvMI9OpIKgaoLqC7k9PdqU2wgyx0ySz/ylYbl5uOdDiPOq5lVkBx6cL\nNR+J4axfsM9ACAnz1eBiPvinKWRX+DOhoZUpumd6mpGqnmtiN5j8qVbF5TTY\nk6lk\r\n=rl1L\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"981191bcdc603a0eb9833e952fc0c66c3ed67c3c","scripts":{"build":"tsc","prepublish":"npm run build"},"typings":"index.d.ts","_npmUser":{"name":"aikoven","email":"dan.lytkin@gmail.com"},"repository":{"url":"git+https://github.com/aikoven/assert-never.git","type":"git"},"_npmVersion":"6.4.1","description":"Helper function for exhaustive checks of discriminated unions in TypeScript","directories":{},"_nodeVersion":"10.15.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^2.2.1"},"_npmOperationalInternal":{"tmp":"tmp/assert-never_1.2.0_1556077419843_0.08649878638742847","host":"s3://npm-registry-packages"}},"1.2.1":{"name":"assert-never","version":"1.2.1","keywords":["typescript","discriminated unions","assert","never"],"author":{"name":"Daniel Lytkin","email":"dan.lytkin@gmail.com"},"license":"MIT","_id":"assert-never@1.2.1","maintainers":[{"name":"aikoven","email":"dan.lytkin@gmail.com"}],"homepage":"https://github.com/aikoven/assert-never#readme","bugs":{"url":"https://github.com/aikoven/assert-never/issues"},"dist":{"shasum":"11f0e363bf146205fb08193b5c7b90f4d1cf44fe","tarball":"https://registry.npmjs.org/assert-never/-/assert-never-1.2.1.tgz","fileCount":5,"integrity":"sha512-TaTivMB6pYI1kXwrFlEhLeGfOqoDNdTxjCdwRfFFkEA30Eu+k48W34nlok2EYWJfFFzqaEmichdNM7th6M5HNw==","signatures":[{"sig":"MEUCIQDjS/5jsUAl2u0Chei35UNDgqqqaSdtWFbGct54cKDhiAIgN2HZb9iDaK3MgGxKI4Yy+s/d75t4ne2BqRSN3SELIcQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4168,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeu3ajCRA9TVsSAnZWagAAjXAQAIjK4GgTWXs0EJ3TBCLk\nKpwFM/toG2VDhFy5Cl72+BYeU+rQ/UNVFZ0yawVpyozO3+WLfL+4TMu0FPtt\nVczufY/+GvwHB5oOZbVRkpbu1+rCnFbrsI39mq12XmR1lEl7BrWgAp0Bwbv4\ngUBRPOQLvKXVF5vH5dfUNgq+hH8C3vxYmnVbEEoPJGHAqzrOnXRC5bngXneP\nbKaooMZnU4l1kzZ7a/p6xZX8blcndg4evRAB+Y3DoNDWwesuqLq1Ek7230my\nUQwKZt7vfKCEDGQ7JxO7zosj0l+V5vTmxqQRlMKk39yXMteM8iGt0HGIlWS3\nT8ZeYFL+S5XJyDx0d6LYk0jhRIl5A7Zm7PFTIjb/GSaYI0q/B3xKAst7YL2e\njupvvkckt8Uym0CtrSdcWkP55OC8vKvy/Ntty/BRdc+AzosvqX3AkaDa/EYA\naivJhCpVSyL6vw69pwpv8aMNQDwVfgueU+ezMrrsJeN4x+1hkJtU7D5QUlWL\nmvdw/f7CFFyovN0xRjrzPJQHEF/eBbNQsBDa9UvE0+SArLFywOwkdMG7I/aq\nU5EoZND+sNKFQYPrAWmCwJYwLu0EytObItv5Tl1JahTkhx4MOv7Oiiaz2SBf\ncu9SXnadic45njdAKgIANoMPPOwjp/MjQJe8GkPPQ3ASmtjhAKq2QJ16YiX7\nUrln\r\n=Oe3c\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","gitHead":"a5197695021f865f8165bbe3b1a6803d20bb0fb6","scripts":{"build":"tsc","prepublish":"npm run build"},"typings":"index.d.ts","_npmUser":{"name":"aikoven","email":"dan.lytkin@gmail.com"},"repository":{"url":"git+https://github.com/aikoven/assert-never.git","type":"git"},"_npmVersion":"6.14.4","description":"Helper function for exhaustive checks of discriminated unions in TypeScript","directories":{},"_nodeVersion":"13.13.0","_hasShrinkwrap":false,"devDependencies":{"typescript":"^2.2.1"},"_npmOperationalInternal":{"tmp":"tmp/assert-never_1.2.1_1589343906939_0.7969730514777897","host":"s3://npm-registry-packages"}},"1.3.0":{"name":"assert-never","version":"1.3.0","keywords":["typescript","discriminated unions","assert","never"],"author":{"name":"Daniel Lytkin","email":"dan.lytkin@gmail.com"},"license":"MIT","_id":"assert-never@1.3.0","maintainers":[{"name":"aikoven","email":"dan.lytkin@gmail.com"}],"homepage":"https://github.com/aikoven/assert-never#readme","bugs":{"url":"https://github.com/aikoven/assert-never/issues"},"dist":{"shasum":"c53cf3ad8fcdb67f400a941dea66dac7fe82dd2e","tarball":"https://registry.npmjs.org/assert-never/-/assert-never-1.3.0.tgz","fileCount":5,"integrity":"sha512-9Z3vxQ+berkL/JJo0dK+EY3Lp0s3NtSnP3VCLsh5HDcZPrh0M+KQRK5sWhUeyPPH+/RCxZqOxLMR+YC6vlviEQ==","signatures":[{"sig":"MEYCIQCNOLkG2QXviRnG9l58pEYiM0z53oQpVGNYDiAoPkZH1wIhAMTh/tlzb+A9PtKxHImxbNIFE907g9nATDdc9tqWdntJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":4701},"main":"index.js","gitHead":"129add29afae86f0d0fee1dab8f469c91a39b833","scripts":{"test":"jest","build":"tsc","prepublish":"npm run build && npm test"},"typings":"index.d.ts","_npmUser":{"name":"aikoven","email":"dan.lytkin@gmail.com"},"repository":{"url":"git+https://github.com/aikoven/assert-never.git","type":"git"},"_npmVersion":"10.5.0","description":"Helper function for exhaustive checks of discriminated unions in TypeScript","directories":{},"_nodeVersion":"20.12.2","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","babel-jest":"^29.7.0","typescript":"^5.5.3","@babel/core":"^7.24.7","@types/jest":"^29.5.12","type-assertions":"^1.1.0","@babel/preset-env":"^7.24.7","@babel/preset-typescript":"^7.24.7"},"_npmOperationalInternal":{"tmp":"tmp/assert-never_1.3.0_1720352003566_0.5486109919237372","host":"s3://npm-registry-packages"}},"1.4.0":{"name":"assert-never","version":"1.4.0","description":"Helper function for exhaustive checks of discriminated unions in TypeScript","main":"index.js","typings":"index.d.ts","scripts":{"build":"tsc","prepublish":"npm run build && npm test","test":"jest"},"keywords":["typescript","discriminated unions","assert","never"],"repository":{"type":"git","url":"git+https://github.com/aikoven/assert-never.git"},"author":{"name":"Daniel Lytkin","email":"dan.lytkin@gmail.com"},"license":"MIT","devDependencies":{"@babel/core":"^7.24.7","@babel/preset-env":"^7.24.7","@babel/preset-typescript":"^7.24.7","@types/jest":"^29.5.12","babel-jest":"^29.7.0","jest":"^29.7.0","type-assertions":"^1.1.0","typescript":"^5.5.3"},"_id":"assert-never@1.4.0","gitHead":"d55b0887a4c8336fe308c3d155a8d838efe0e9f0","bugs":{"url":"https://github.com/aikoven/assert-never/issues"},"homepage":"https://github.com/aikoven/assert-never#readme","_nodeVersion":"20.12.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-5oJg84os6NMQNl27T9LnZkvvqzvAnHu03ShCnoj6bsJwS7L8AO4lf+C/XjK/nvzEqQB744moC6V128RucQd1jA==","shasum":"b0d4988628c87f35eb94716cc54422a63927e175","tarball":"https://registry.npmjs.org/assert-never/-/assert-never-1.4.0.tgz","fileCount":6,"unpackedSize":5775,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICPj3BLdoHpDcYw7w9PfwIkJ83l8pYFZne+BaRqFf+SJAiEAvlcPfgmDrihNR2ziZ9dkqSaFaQcLTobjKVYpqYCNKhU="}]},"_npmUser":{"name":"aikoven","email":"dan.lytkin@gmail.com"},"directories":{},"maintainers":[{"name":"aikoven","email":"dan.lytkin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/assert-never_1.4.0_1734430231577_0.7072927650806231"},"_hasShrinkwrap":false}},"time":{"created":"2017-03-27T12:18:30.576Z","modified":"2024-12-17T10:10:31.875Z","1.0.0":"2017-03-27T12:18:30.576Z","1.1.0":"2017-12-25T04:05:05.777Z","1.2.0":"2019-04-24T03:43:40.049Z","1.2.1":"2020-05-13T04:25:07.043Z","1.3.0":"2024-07-07T11:33:23.706Z","1.4.0":"2024-12-17T10:10:31.732Z"},"bugs":{"url":"https://github.com/aikoven/assert-never/issues"},"author":{"name":"Daniel Lytkin","email":"dan.lytkin@gmail.com"},"license":"MIT","homepage":"https://github.com/aikoven/assert-never#readme","keywords":["typescript","discriminated unions","assert","never"],"repository":{"type":"git","url":"git+https://github.com/aikoven/assert-never.git"},"description":"Helper function for exhaustive checks of discriminated unions in TypeScript","maintainers":[{"name":"aikoven","email":"dan.lytkin@gmail.com"}],"readme":"# Assert Never [![npm version][npm-image]][npm-url]\n\nHelper function for [exhaustive checks][exhaustive-checks] of discriminated\nunions in TypeScript.\n\n## Installation\n\n```\nnpm install --save assert-never\n```\n\n## Usage\n\n```ts\nimport {assertNever} from \"assert-never\";\n\ntype A = {type: 'a'};\ntype B = {type: 'b'};\ntype Union = A | B;\n\nfunction doSomething(arg: Union) {\n if (arg.type === 'a') {\n return something;\n }\n\n if (arg.type === 'b') {\n return somethingElse;\n }\n\n // TS will error if there are other types in the union\n // Will throw an Error when called at runtime. Use `assertNever(arg, true)`\n // instead to fail silently.\n return assertNever(arg);\n}\n```\n\n[npm-image]: https://badge.fury.io/js/assert-never.svg\n[npm-url]: https://badge.fury.io/js/assert-never\n[exhaustive-checks]: https://basarat.gitbook.io/typescript/type-system/discriminated-unions#exhaustive-checks\n","readmeFilename":"README.md"}