plugin-error
Advanced tools
Comparing version 1.0.0 to 1.0.1
declare namespace PluginError { | ||
export interface Constructor { | ||
interface Constructor { | ||
/** | ||
* @param options Options with plugin name and message | ||
* @param plugin Plugin name | ||
* @param error Base error | ||
* @param options Error options | ||
*/ | ||
new(options: Options & {plugin: string, message: string}): PluginError; | ||
new <E extends Error>(plugin: string, error: E, options?: Options): PluginError<E>; | ||
/** | ||
* @param plugin Plugin name | ||
* @param message Error message | ||
* @param error Base error or error message | ||
* @param options Error options | ||
*/ | ||
new (plugin: string, message: string, options?: Options): PluginError; | ||
new <E extends Error = Error>(plugin: string, error: E | string, options: Options): PluginError<E | {[K in keyof E]: undefined}>; | ||
/** | ||
* @param plugin Plugin name | ||
* @param error Base error | ||
* @param options Error options | ||
* @param error Base error, error message, or options with message | ||
*/ | ||
new <E extends Error>(plugin: string, error: E, options?: Options): PluginError<E>; | ||
new <E extends Error = Error>(plugin: string, error: E | string | (Options & {message: string})): PluginError<E | {[K in keyof E]: undefined}>; | ||
/** | ||
* @param plugin Plugin name | ||
* @param options Options with message | ||
* @param options Options with plugin name and message | ||
*/ | ||
new(plugin: string, options: Options & {message: string}): PluginError; | ||
new(options: Options & {plugin: string, message: string}): PluginError; | ||
} | ||
@@ -74,7 +74,8 @@ | ||
/** | ||
* The `Base` interface defines the properties available on all the the instances of `PluginError`. | ||
* The `SimplePluginError` interface defines the properties available on all the the instances of `PluginError`. | ||
* | ||
* @internal | ||
*/ | ||
export interface Base extends Error { | ||
interface SimplePluginError extends Error { | ||
/** | ||
@@ -110,3 +111,3 @@ * Plugin name | ||
*/ | ||
type PluginError<T = {}> = PluginError.Base & T; | ||
type PluginError<T = {}> = PluginError.SimplePluginError & T; | ||
@@ -113,0 +114,0 @@ declare const PluginError: PluginError.Constructor; |
{ | ||
"name": "plugin-error", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Error handling for Vinyl plugins.", | ||
@@ -5,0 +5,0 @@ "author": "Gulp Team <team@gulpjs.com> (http://gulpjs.com/)", |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
11915
254
0