Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
@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 856,145 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.