assert/000755 001751 000177 0000000000 14706067511014057 5ustar00runner000000 000000 1470606751114706067511assert/LICENSE000644 001751 000177 0000002165 14706067511015070 0ustar00runner000000 000000 1470606751114706067511 MIT License Copyright (c) Microsoft Corporation. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE assert/README.md000644 001751 000177 0000001065 14706067511015351 0ustar00runner000000 000000 1470606755614706067511# Installation > `npm install --save @types/assert` # Summary This package contains type definitions for assert (https://github.com/browserify/commonjs-assert). # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/assert. ### Additional Details * Last updated: Wed, 23 Oct 2024 03:36:41 GMT * Dependencies: none # Credits These definitions were written by [Nico Gallinal](https://github.com/nicoabie), [Linus Unnebäck](https://github.com/LinusU), and [ExE Boss](https://github.com/ExE-Boss). assert/index.d.ts000644 001751 000177 0000011140 14706067511015755 0ustar00runner000000 000000 1470606751114706067511/** An alias of `assert.ok()`. */ declare function assert(value: any, message?: string | Error): asserts value; declare namespace assert { class AssertionError extends Error { actual: any; expected: any; operator: string; generatedMessage: boolean; code: "ERR_ASSERTION"; constructor(options?: { /** If provided, the error message is set to this value. */ message?: string | undefined; /** The `actual` property on the error instance. */ actual?: any; /** The `expected` property on the error instance. */ expected?: any; /** The `operator` property on the error instance. */ operator?: string | undefined; /** If provided, the generated stack trace omits frames before this function. */ // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type stackStartFn?: Function | undefined; }); } type AssertPredicate = RegExp | (new() => object) | ((thrown: any) => boolean) | object | Error; function fail(message?: string | Error): never; /** @deprecated since v10.0.0 - use fail([message]) or other assert functions instead. */ function fail( actual: any, expected: any, message?: string | Error, operator?: string, // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type stackStartFn?: Function, ): never; function ok(value: any, message?: string | Error): asserts value; /** @deprecated since v9.9.0 - use strictEqual() instead. */ function equal(actual: any, expected: any, message?: string | Error): void; /** @deprecated since v9.9.0 - use notStrictEqual() instead. */ function notEqual(actual: any, expected: any, message?: string | Error): void; /** @deprecated since v9.9.0 - use deepStrictEqual() instead. */ function deepEqual(actual: any, expected: any, message?: string | Error): void; /** @deprecated since v9.9.0 - use notDeepStrictEqual() instead. */ function notDeepEqual(actual: any, expected: any, message?: string | Error): void; function strictEqual(actual: any, expected: T, message?: string | Error): asserts actual is T; function notStrictEqual(actual: any, expected: any, message?: string | Error): void; function deepStrictEqual(actual: any, expected: T, message?: string | Error): asserts actual is T; function notDeepStrictEqual(actual: any, expected: any, message?: string | Error): void; function throws(block: () => any, message?: string | Error): void; function throws(block: () => any, error: AssertPredicate, message?: string | Error): void; function doesNotThrow(block: () => any, message?: string | Error): void; function doesNotThrow(block: () => any, error: AssertPredicate, message?: string | Error): void; function ifError(value: any): asserts value is null | undefined; function rejects(block: (() => Promise) | Promise, message?: string | Error): Promise; function rejects( block: (() => Promise) | Promise, error: AssertPredicate, message?: string | Error, ): Promise; function doesNotReject(block: (() => Promise) | Promise, message?: string | Error): Promise; function doesNotReject( block: (() => Promise) | Promise, error: AssertPredicate, message?: string | Error, ): Promise; function match(value: string, regExp: RegExp, message?: string | Error): void; function doesNotMatch(value: string, regExp: RegExp, message?: string | Error): void; const strict: & Omit< typeof assert, | "equal" | "notEqual" | "deepEqual" | "notDeepEqual" | "ok" | "strictEqual" | "deepStrictEqual" | "ifError" | "strict" > & { (value: any, message?: string | Error): asserts value; equal: typeof strictEqual; notEqual: typeof notStrictEqual; deepEqual: typeof deepStrictEqual; notDeepEqual: typeof notDeepStrictEqual; // Mapped types and assertion functions are incompatible? // TS2775: Assertions require every name in the call target // to be declared with an explicit type annotation. ok: typeof ok; strictEqual: typeof strictEqual; deepStrictEqual: typeof deepStrictEqual; ifError: typeof ifError; strict: typeof strict; }; } export = assert; assert/package.json000644 001751 000177 0000002117 14706067511016357 0ustar00runner000000 000000 1470606755614706067511{ "name": "@types/assert", "version": "1.5.11", "description": "TypeScript definitions for assert", "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/assert", "license": "MIT", "contributors": [ { "name": "Nico Gallinal", "githubUsername": "nicoabie", "url": "https://github.com/nicoabie" }, { "name": "Linus Unnebäck", "githubUsername": "LinusU", "url": "https://github.com/LinusU" }, { "name": "ExE Boss", "githubUsername": "ExE-Boss", "url": "https://github.com/ExE-Boss" } ], "main": "", "types": "index.d.ts", "repository": { "type": "git", "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", "directory": "types/assert" }, "scripts": {}, "dependencies": {}, "peerDependencies": {}, "typesPublisherContentHash": "713e04c34c09c5eb8b41c43e626c31e252adfeadc7fa746fa68bc7ef11c56dda", "typeScriptVersion": "4.8" }