File: typings.ts

package info (click to toggle)
node-assertion-error 1.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 216 kB
  • sloc: javascript: 129; makefile: 24
file content (14 lines) | stat: -rw-r--r-- 412 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import AssertionError = require('../index');

const str: string = "";
let e: AssertionError;

function foo () { }

e = new AssertionError(str);
e = new AssertionError(str, {a:1, b:2});
e = new AssertionError(str, {a:1, b:2}, foo);

const assertionError: AssertionError<{ bar: number }> = new AssertionError("msg", { bar: 42 });
const msg: string = assertionError.message;
const bar: number = assertionError.bar;