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.