Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@types/http-assert
Advanced tools
TypeScript definitions for http-assert
npm install --save @types/http-assert
This package contains type definitions for http-assert (https://github.com/jshttp/http-assert).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/http-assert.
/**
* @param status the status code
* @param msg the message of the error, defaulting to node's text for that status code
* @param opts custom properties to attach to the error object
*/
declare function assert(value: any, status?: number, msg?: string, opts?: Record<string, any>): asserts value;
declare function assert(value: any, status?: number, opts?: Record<string, any>): asserts value;
declare namespace assert {
/**
* @param status the status code
* @param msg the message of the error, defaulting to node's text for that status code
* @param opts custom properties to attach to the error object
*/
type Assert = <T>(a: T, b: T, status?: number, msg?: string, opts?: Record<string, any>) => void;
/**
* @param status the status code
* @param msg the message of the error, defaulting to node's text for that status code
* @param opts custom properties to attach to the error object
*/
type AssertOK = (a: any, status?: number, msg?: string, opts?: Record<string, any>) => asserts a;
/**
* @param status the status code
* @param msg the message of the error, defaulting to node's text for that status code
* @param opts custom properties to attach to the error object
*/
type AssertFail = (status?: number, msg?: string, opts?: Record<string, any>) => void;
/**
* @param status the status code
* @param msg the message of the error, defaulting to node's text for that status code
* @param opts custom properties to attach to the error object
*/
type AssertEqual = (a: any, b: any, status?: number, msg?: string, opts?: Record<string, any>) => void;
const equal: Assert;
const notEqual: Assert;
const ok: AssertOK;
const strictEqual: AssertEqual;
const notStrictEqual: AssertEqual;
const deepEqual: AssertEqual;
const notDeepEqual: AssertEqual;
const fail: AssertFail;
}
export = assert;
These definitions were written by jKey Lu, Peter Squicciarini, and Alex Bulanov.
FAQs
TypeScript definitions for http-assert
The npm package @types/http-assert receives a total of 329,690 weekly downloads. As such, @types/http-assert popularity was classified as popular.
We found that @types/http-assert demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.