@types/http-assert

  • Version 1.5.6
  • Published
  • 6.88 kB
  • No dependencies
  • MIT license

Install

npm i @types/http-assert
yarn add @types/http-assert
pnpm add @types/http-assert

Overview

TypeScript definitions for http-assert

Index

Variables

variable deepEqual

const deepEqual: AssertEqual;

    variable equal

    const equal: Assert;

      variable fail

      const fail: AssertFail;

        variable notDeepEqual

        const notDeepEqual: AssertEqual;

          variable notEqual

          const notEqual: Assert;

            variable notStrictEqual

            const notStrictEqual: AssertEqual;

              variable ok

              const ok: AssertOK;

                variable strictEqual

                const strictEqual: AssertEqual;

                  Functions

                  function assert

                  assert: typeof assert;
                  • Parameter status

                    the status code

                    Parameter msg

                    the message of the error, defaulting to node's text for that status code

                    Parameter opts

                    custom properties to attach to the error object

                  Type Aliases

                  type Assert

                  type Assert = <T>(
                  a: T,
                  b: T,
                  status?: number,
                  msg?: string,
                  opts?: Record<string, any>
                  ) => void;
                  • Parameter status

                    the status code

                    Parameter msg

                    the message of the error, defaulting to node's text for that status code

                    Parameter opts

                    custom properties to attach to the error object

                  type AssertEqual

                  type AssertEqual = (
                  a: any,
                  b: any,
                  status?: number,
                  msg?: string,
                  opts?: Record<string, any>
                  ) => void;
                  • Parameter status

                    the status code

                    Parameter msg

                    the message of the error, defaulting to node's text for that status code

                    Parameter opts

                    custom properties to attach to the error object

                  type AssertFail

                  type AssertFail = (
                  status?: number,
                  msg?: string,
                  opts?: Record<string, any>
                  ) => void;
                  • Parameter status

                    the status code

                    Parameter msg

                    the message of the error, defaulting to node's text for that status code

                    Parameter opts

                    custom properties to attach to the error object

                  type AssertOK

                  type AssertOK = (
                  a: any,
                  status?: number,
                  msg?: string,
                  opts?: Record<string, any>
                  ) => asserts a;
                  • Parameter status

                    the status code

                    Parameter msg

                    the message of the error, defaulting to node's text for that status code

                    Parameter opts

                    custom properties to attach to the error object

                  Package Files (1)

                  Dependencies (0)

                  No dependencies.

                  Dev Dependencies (0)

                  No dev dependencies.

                  Peer Dependencies (0)

                  No peer dependencies.

                  Badge

                  To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                  You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/http-assert.

                  • Markdown
                    [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/http-assert)
                  • HTML
                    <a href="https://www.jsdocs.io/package/@types/http-assert"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>