@types/empower
TypeScript definitions for empower
Last updated 5 years ago by types .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @types/empower 
SYNC missed versions from official npm registry.

Installation

npm install --save @types/empower

Summary

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

Details

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

index.d.ts

// Type definitions for empower 1.2
// Project: https://github.com/power-assert-js/empower
// Definitions by: vvakame <https://github.com/vvakame>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.5

import { Options as CoreOptions } from 'empower-core';
import { Formatter } from 'power-assert-formatter';

/**
 * Enhances Power Assert feature to assert function/object.
 *
 * @param originalAssert An instance of standard `assert` function or any assert-like object to enhance.
 * @param formatter A formatter function created by power-assert-formatter.
 * @param options Configuration options. If not passed, default options will be used.
 * @return Enhanced assert function/object.
 */
declare function empower<T>(originalAssert: T, formatter: Formatter, options?: empower.Options): T;

declare namespace empower {
    // The omitted options can be provided, but they will be always overridden.
    type Options = Omit<CoreOptions, 'modifyMessageBeforeAssert' | 'onError'> & {
        /**
         * If truthy, modify message property of `AssertionError` on rethrow.
         *
         * @default false
         */
        modifyMessageOnRethrow?: boolean | undefined;
        /**
         * If truthy, add `powerAssertContext` property to `AssertionError` on rethrow.
         *
         * @default false
         */
        saveContextOnRethrow?: boolean | undefined;
    };

    /**
     * Returns default options object for `empower` function.
     */
    function defaultOptions(): Required<Options>;
}

export = empower;

Additional Details

Credits

These definitions were written by vvakame.

Current Tags

  • 1.2.32                                ...           latest (5 years ago)
  • 1.2.30                                ...           ts2.0 (10 years ago)
  • 1.2.30                                ...           ts2.1 (10 years ago)
  • 1.2.30                                ...           ts2.2 (10 years ago)
  • 1.2.30                                ...           ts2.3 (10 years ago)
  • 1.2.30                                ...           ts2.4 (10 years ago)
  • 1.2.30                                ...           ts2.5 (10 years ago)
  • 1.2.30                                ...           ts2.6 (10 years ago)
  • 1.2.30                                ...           ts2.7 (10 years ago)
  • 1.2.30                                ...           ts2.8 (10 years ago)
  • 1.2.30                                ...           ts2.9 (10 years ago)
  • 1.2.30                                ...           ts3.0 (10 years ago)
  • 1.2.30                                ...           ts3.1 (10 years ago)
  • 1.2.30                                ...           ts3.2 (10 years ago)
  • 1.2.30                                ...           ts3.3 (10 years ago)
  • 1.2.30                                ...           ts3.4 (10 years ago)
  • 1.2.31                                ...           ts3.5 (5 years ago)
  • 1.2.32                                ...           ts3.6 (5 years ago)
  • 1.2.32                                ...           ts3.7 (5 years ago)
  • 1.2.32                                ...           ts3.8 (5 years ago)
  • 1.2.32                                ...           ts3.9 (5 years ago)
  • 1.2.32                                ...           ts4.0 (5 years ago)
  • 1.2.32                                ...           ts4.1 (5 years ago)
  • 1.2.32                                ...           ts4.2 (5 years ago)
  • 1.2.32                                ...           ts4.3 (5 years ago)
  • 1.2.32                                ...           ts4.4 (5 years ago)
  • 1.2.32                                ...           ts4.5 (5 years ago)
  • 1.2.32                                ...           ts4.6 (5 years ago)

14 Versions

  • 1.2.32                                ...           5 years ago
  • 1.2.31                                ...           5 years ago
  • 1.2.30                                ...           10 years ago
  • 0.0.29                                ...           10 years ago
  • 0.0.28                                ...           10 years ago
  • 0.0.27-alpha                                ...           10 years ago
  • 0.0.26-alpha                                ...           10 years ago
  • 0.0.25-alpha                                ...           10 years ago
  • 0.0.24-alpha                                ...           10 years ago
  • 0.0.23-alpha                                ...           10 years ago
  • 0.0.22-alpha                                ...           10 years ago
  • 0.0.21-alpha                                ...           10 years ago
  • 0.0.16-alpha                                ...           10 years ago
  • 0.0.15-alpha                                ...           10 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dev Dependencies (0)
None
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |