@types/http-assert
TypeScript definitions for http-assert
Last updated 6 years ago by types .
MIT · Repository · Original npm · Tarball · package.json
$ gnpm install @types/http-assert 
SYNC missed versions from official npm registry.

Installation

npm install --save @types/http-assert

Summary

This package contains type definitions for http-assert (https://github.com/jshttp/http-assert).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/http-assert.

index.d.ts

// Type definitions for http-assert 1.5
// Project: https://github.com/jshttp/http-assert
// Definitions by: jKey Lu <https://github.com/jkeylu>
//                 Peter Squicciarini <https://github.com/stripedpajamas>
//                 Alex Bulanov <https://github.com/sapfear>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

/**
 * @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 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;
}

export = assert;

Additional Details

  • Last updated: Thu, 26 Aug 2021 01:01:28 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by jKey Lu, Peter Squicciarini, and Alex Bulanov.

Current Tags

  • 1.5.3                                ...           latest (3 years ago)
  • 1.2.1                                ...           ts2.0 (7 years ago)
  • 1.2.1                                ...           ts2.1 (7 years ago)
  • 1.5.0                                ...           ts2.2 (6 years ago)
  • 1.5.1                                ...           ts2.3 (5 years ago)
  • 1.5.1                                ...           ts2.4 (5 years ago)
  • 1.5.1                                ...           ts2.5 (5 years ago)
  • 1.5.1                                ...           ts2.6 (5 years ago)
  • 1.5.1                                ...           ts2.7 (5 years ago)
  • 1.5.1                                ...           ts2.8 (5 years ago)
  • 1.5.1                                ...           ts2.9 (5 years ago)
  • 1.5.1                                ...           ts3.0 (5 years ago)
  • 1.5.1                                ...           ts3.1 (5 years ago)
  • 1.5.1                                ...           ts3.2 (5 years ago)
  • 1.5.1                                ...           ts3.3 (5 years ago)
  • 1.5.1                                ...           ts3.4 (5 years ago)
  • 1.5.1                                ...           ts3.5 (5 years ago)
  • 1.5.2                                ...           ts3.6 (3 years ago)
  • 1.5.3                                ...           ts3.7 (3 years ago)
  • 1.5.3                                ...           ts3.8 (3 years ago)
  • 1.5.3                                ...           ts3.9 (3 years ago)
  • 1.5.3                                ...           ts4.0 (3 years ago)
  • 1.5.3                                ...           ts4.1 (3 years ago)
  • 1.5.3                                ...           ts4.2 (3 years ago)
  • 1.5.3                                ...           ts4.3 (3 years ago)
  • 1.5.3                                ...           ts4.4 (3 years ago)
  • 1.5.3                                ...           ts4.5 (3 years ago)
  • 1.5.3                                ...           ts4.6 (3 years ago)
  • 1.5.3                                ...           ts4.7 (3 years ago)
  • 1.5.3                                ...           ts4.8 (3 years ago)
  • 1.5.3                                ...           ts4.9 (3 years ago)
  • 1.5.3                                ...           ts5.0 (3 years ago)
  • 1.5.3                                ...           ts5.1 (3 years ago)
  • 1.5.3                                ...           ts5.2 (3 years ago)
  • 1.5.3                                ...           ts5.3 (3 years ago)

10 Versions

  • 1.5.3                                ...           3 years ago
  • 1.5.2                                ...           3 years ago
  • 1.5.1                                ...           5 years ago
  • 1.5.0                                ...           6 years ago
  • 1.4.1                                ...           6 years ago
  • 1.4.0                                ...           6 years ago
  • 1.3.0                                ...           7 years ago
  • 1.2.2                                ...           7 years ago
  • 1.2.1                                ...           7 years ago
  • 1.2.0                                ...           8 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 10
Last Day 0
Last Week 10
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |