@types/nanoassert
TypeScript icon, indicating that this package has built-in type declarations

2.0.3 • Public • Published

Installation

npm install --save @types/nanoassert

Summary

This package contains type definitions for nanoassert (https://github.com/emilbayes/nanoassert).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/nanoassert.

index.d.ts

/**
 * Assert that `declaration` is truthy otherwise throw `AssertionError`.
 * In JavaScript runtimes that use v8, you will get a nicer
 * stack trace with this error.
 *
 * If you want friendlier messages you can use template strings to show the
 * assertion made.
 *
 * @throws {AssertionError} with optional `message`.
 *
 * @example
 * import assert = require('nanoassert')
 *
 * assert(a !== b, `${a} !== ${b}`)
 */
declare function assert(declaration: unknown, message?: string): asserts declaration;

export = assert;

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: none

Credits

These definitions were written by Junxiao Shi, and BendingBender.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/nanoassert

Weekly Downloads

261

Version

2.0.3

License

MIT

Unpacked Size

3.81 kB

Total Files

5

Last publish

Collaborators

  • types