Socket
Socket
Sign inDemoInstall

@types/power-assert

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/power-assert

TypeScript definitions for power-assert


Version published
Weekly downloads
21K
decreased by-4.5%
Maintainers
1
Weekly downloads
 
Created
Source

Installation

npm install --save @types/power-assert

Summary

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

Details

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

index.d.ts

// copy from assert external module in node.d.ts

import { Options as EmpowerOptions } from "empower";
import { Options as PowerAssertFormatterOptions } from "power-assert-formatter";

export = assert;
export as namespace assert;

declare function assert(value: unknown, message?: string): void;
declare namespace assert {
    class AssertionError implements Error {
        name: string;
        message: string;
        actual: unknown;
        expected: unknown;
        operator: string;
        generatedMessage: boolean;

        constructor(options?: {
            message?: string | undefined;
            actual?: unknown;
            expected?: unknown;
            operator?: string | undefined;
            stackStartFunction?: () => void | undefined;
        });
    }

    function fail(actual?: unknown, expected?: unknown, message?: string, operator?: string): never;
    function ok(value: unknown, message?: string): void;
    function equal(actual: unknown, expected: unknown, message?: string): void;
    function notEqual(actual: unknown, expected: unknown, message?: string): void;
    function deepEqual(actual: unknown, expected: unknown, message?: string): void;
    function notDeepEqual(actual: unknown, expected: unknown, message?: string): void;
    function strictEqual(actual: unknown, expected: unknown, message?: string): void;
    function notStrictEqual(actual: unknown, expected: unknown, message?: string): void;
    function deepStrictEqual(actual: unknown, expected: unknown, message?: string): void;
    function notDeepStrictEqual(actual: unknown, expected: unknown, message?: string): void;
    const throws: {
        (block: () => unknown, message?: string): void;
        (
            block: () => unknown,
            error: (new() => object) | RegExp | ((err: unknown) => boolean),
            message?: string,
        ): void;
    };
    const doesNotThrow: {
        (block: () => unknown, message?: string): void;
        (block: () => unknown, error: (new() => object) | RegExp | ((err: any) => boolean), message?: string): void;
    };
    function ifError(value: unknown): void | undefined;

    const strict: typeof assert;

    interface Options {
        assertion?: EmpowerOptions | undefined;
        output?: PowerAssertFormatterOptions | undefined;
    }

    function customize(options: Options): typeof assert;
}

Additional Details

Credits

These definitions were written by vvakame, and Christian Murphy.

FAQs

Package last updated on 07 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc