@types/empower
Advanced tools
Comparing version 1.2.31 to 1.2.32
@@ -28,3 +28,3 @@ // Type definitions for empower 1.2 | ||
*/ | ||
modifyMessageOnRethrow?: boolean; | ||
modifyMessageOnRethrow?: boolean | undefined; | ||
/** | ||
@@ -35,3 +35,3 @@ * If truthy, add `powerAssertContext` property to `AssertionError` on rethrow. | ||
*/ | ||
saveContextOnRethrow?: boolean; | ||
saveContextOnRethrow?: boolean | undefined; | ||
}; | ||
@@ -38,0 +38,0 @@ |
{ | ||
"name": "@types/empower", | ||
"version": "1.2.31", | ||
"version": "1.2.32", | ||
"description": "TypeScript definitions for empower", | ||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/empower", | ||
"license": "MIT", | ||
@@ -25,4 +26,4 @@ "contributors": [ | ||
}, | ||
"typesPublisherContentHash": "520b6f559e784c53821c769b9665e6b012753be88dceabf5fc385f4be4de28a9", | ||
"typeScriptVersion": "3.5" | ||
"typesPublisherContentHash": "03912a461197efee8b1683fb49d0d28957719855b2c8908a227f3fed6f26aae9", | ||
"typeScriptVersion": "3.6" | ||
} |
@@ -9,5 +9,52 @@ # Installation | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/empower. | ||
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/empower/index.d.ts) | ||
````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 | ||
* Last updated: Wed, 07 Apr 2021 23:01:21 GMT | ||
* Last updated: Tue, 06 Jul 2021 19:03:12 GMT | ||
* Dependencies: [@types/empower-core](https://npmjs.com/package/@types/empower-core), [@types/power-assert-formatter](https://npmjs.com/package/@types/power-assert-formatter) | ||
@@ -14,0 +61,0 @@ * Global values: none |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
5922
0
64