{"_id":"@types/check-error","_rev":"3016257","name":"@types/check-error","description":"TypeScript definitions for check-error","dist-tags":{"latest":"1.0.1","ts2.1":"1.0.0","ts2.2":"1.0.0","ts2.3":"1.0.0","ts2.4":"1.0.0","ts2.5":"1.0.0","ts2.6":"1.0.0","ts2.7":"1.0.0","ts2.8":"1.0.0","ts2.9":"1.0.0","ts3.0":"1.0.0","ts3.1":"1.0.0","ts3.2":"1.0.0","ts3.3":"1.0.0","ts3.4":"1.0.0","ts3.5":"1.0.0","ts3.6":"1.0.0","ts3.7":"1.0.0","ts3.8":"1.0.0","ts3.9":"1.0.0","ts4.0":"1.0.0","ts4.1":"1.0.0","ts4.2":"1.0.0","ts4.3":"1.0.1","ts4.4":"1.0.1","ts4.5":"1.0.1","ts4.6":"1.0.1","ts4.7":"1.0.1","ts4.8":"1.0.1","ts4.9":"1.0.1","ts5.0":"1.0.1","ts5.1":"1.0.1","ts5.2":"1.0.1","ts5.3":"1.0.1"},"maintainers":[{"name":"types","email":""}],"time":{"modified":"2023-10-17T06:04:06.000Z","created":"2019-10-01T22:55:56.639Z","1.0.1":"2023-09-04T15:54:18.719Z","1.0.0":"2019-10-01T22:55:56.639Z"},"users":{},"repository":{"type":"git","url":"https://github.com/DefinitelyTyped/DefinitelyTyped.git","directory":"types/check-error"},"versions":{"1.0.1":{"name":"@types/check-error","version":"1.0.1","description":"TypeScript definitions for check-error","homepage":"https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/check-error","license":"MIT","contributors":[{"name":"Porama Ignoi Ruengrairatanaroj","url":"https://github.com/Seally","githubUsername":"Seally"}],"main":"","types":"index.d.ts","repository":{"type":"git","url":"https://github.com/DefinitelyTyped/DefinitelyTyped.git","directory":"types/check-error"},"scripts":{},"dependencies":{},"typesPublisherContentHash":"47b2973b28b2d78964e60217b798f8dd337c502e855eacee5900350cffcb72ca","typeScriptVersion":"4.3","_id":"@types/check-error@1.0.1","dist":{"shasum":"ab1ab92ed21897ec06e7cc6ea57fe77df2613631","size":2161,"noattachment":false,"key":"/@types/check-error/-/@types/check-error-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/@types/check-error/download/@types/check-error-1.0.1.tgz"},"_npmUser":{"name":"types","email":"ts-npm-types@microsoft.com"},"directories":{},"maintainers":[{"name":"types","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/check-error_1.0.1_1693842858415_0.7347250171374553"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-09-04T15:54:18.719Z","publish_time":1693842858719,"_source_registry_name":"default","_cnpm_publish_time":1693842858719},"1.0.0":{"name":"@types/check-error","version":"1.0.0","description":"TypeScript definitions for check-error","license":"MIT","contributors":[{"name":"Porama Ignoi Ruengrairatanaroj","url":"https://github.com/Seally","githubUsername":"Seally"}],"main":"","types":"index","repository":{"type":"git","url":"https://github.com/DefinitelyTyped/DefinitelyTyped.git","directory":"types/check-error"},"scripts":{},"dependencies":{},"typesPublisherContentHash":"e1d8e683bd69976cda5bd878d419f339c1ff69fd5b58c1b814a45c90474cc035","typeScriptVersion":"2.1","_id":"@types/check-error@1.0.0","dist":{"shasum":"af9a4c132ce21c5afd141af1848cc3382543d3b2","size":2065,"noattachment":false,"key":"/@types/check-error/-/@types/check-error-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@types/check-error/download/@types/check-error-1.0.0.tgz"},"maintainers":[{"name":"types","email":""}],"_npmUser":{"name":"types","email":"ts-npm-types@microsoft.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/check-error_1.0.0_1569970556492_0.3412086167045565"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-20T07:57:43.678Z","publish_time":1569970556639,"_cnpm_publish_time":1569970556639}},"readme":"# Installation\r\n> `npm install --save @types/check-error`\r\n\r\n# Summary\r\nThis package contains type definitions for check-error (https://github.com/chaijs/check-error#readme).\r\n\r\n# Details\r\nFiles were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/check-error.\r\n## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/check-error/index.d.ts)\r\n````ts\r\n// Type definitions for check-error 1.0\n// Project: https://github.com/chaijs/check-error#readme\n// Definitions by: Porama Ignoi Ruengrairatanaroj <https://github.com/Seally>\n// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped\n// TypeScript Version: 2.1\n\nexport type ErrorInstanceOrConstructor =\n    | Error\n    | {\n        new(...args: any[]): Error;\n    }\n    | {\n        (...args: any[]): Error;\n    };\n\n/**\n * Checks if two instances are compatible (strict equal).\n *\n * Returns false if errorLike is not an instance of Error, because instances\n * can only be compatible if they're both error instances.\n *\n * @param thrown - thrown error\n * @param errorLike - error object to compare against\n */\nexport function compatibleInstance(thrown: Error, errorLike: Error): boolean;\n\n/**\n * Checks if two constructors are compatible.\n *\n * This function can receive either an error constructor or an error\n * instance as the `errorLike` argument.\n *\n * Constructors are compatible if they're the same or if one is an instance\n * of another.\n *\n * @param thrown - error\n * @param errorLike - object to compare against\n */\nexport function compatibleConstructor(thrown: Error, errorLike: ErrorInstanceOrConstructor): boolean;\n\n/**\n * Checks if an error's message is compatible with a matcher (String or\n * RegExp).\n *\n * If the message contains the String or passes the RegExp test,\n * it is considered compatible.\n *\n * @param thrown - thrown error\n * @param errMatcher - string/regex to look for in the message\n */\nexport function compatibleMessage(thrown: Error | string, errMatcher: string | RegExp): boolean;\n\n/**\n * Gets the error message from an error.\n *\n * If `err` is a String itself, we return it.\n * If the error has no message, we return an empty string.\n *\n * @param err\n */\nexport function getMessage(err: Error | string): string;\n\n/**\n * Gets the constructor name for an Error instance or constructor itself.\n */\nexport function getConstructorName(errorLike: ErrorInstanceOrConstructor): string;\n\r\n````\r\n\r\n### Additional Details\r\n * Last updated: Mon, 04 Sep 2023 15:40:45 GMT\r\n * Dependencies: none\r\n * Global values: none\r\n\r\n# Credits\r\nThese definitions were written by [Porama Ignoi Ruengrairatanaroj](https://github.com/Seally).\r\n","_attachments":{},"homepage":"https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/check-error","license":"MIT"}