Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@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 1,689,163 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.