mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 21:00:01 +08:00
Attempt at fixing travis errors.
This commit is contained in:
88
types/plugin-error/index.d.ts
vendored
88
types/plugin-error/index.d.ts
vendored
@@ -3,56 +3,54 @@
|
||||
// Definitions by: Rogier Schouten <https://github.com/rogierschouten>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare module 'plugin-error' {
|
||||
namespace PluginError {
|
||||
interface PluginErrorOpts {
|
||||
/**
|
||||
* By default the stack will not be shown. Set options.showStack to true if you think the stack is important for your error.
|
||||
*/
|
||||
showStack?: boolean;
|
||||
/**
|
||||
* Error properties will be included in err.toString(), but may be omitted by including {showProperties: false} in the options
|
||||
*/
|
||||
showProperties?: boolean;
|
||||
}
|
||||
export = PluginError;
|
||||
|
||||
interface PluginErrorOpts2 extends PluginErrorOpts {
|
||||
/**
|
||||
* If you pass an error object as the message the stack will be pulled from that, otherwise one will be created.
|
||||
*/
|
||||
message?: string | Error;
|
||||
}
|
||||
|
||||
interface PluginErrorOpts3 extends PluginErrorOpts2 {
|
||||
/**
|
||||
* The name of the plugin
|
||||
*/
|
||||
plugin?: string;
|
||||
}
|
||||
declare namespace PluginError {
|
||||
export interface PluginErrorOpts {
|
||||
/**
|
||||
* By default the stack will not be shown. Set options.showStack to true if you think the stack is important for your error.
|
||||
*/
|
||||
showStack?: boolean;
|
||||
/**
|
||||
* Error properties will be included in err.toString(), but may be omitted by including {showProperties: false} in the options
|
||||
*/
|
||||
showProperties?: boolean;
|
||||
}
|
||||
|
||||
class PluginError extends Error {
|
||||
export interface PluginErrorOpts2 extends PluginErrorOpts {
|
||||
/**
|
||||
* Constructor
|
||||
* @param pluginName
|
||||
* @param message If you pass an error object as the message the stack will be pulled from that, otherwise one will be created.
|
||||
* @param options
|
||||
* If you pass an error object as the message the stack will be pulled from that, otherwise one will be created.
|
||||
*/
|
||||
constructor(pluginName: string, message: string | Error, options?: PluginError.PluginErrorOpts);
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param pluginName
|
||||
* @param options
|
||||
*/
|
||||
constructor(pluginName: string, options: PluginError.PluginErrorOpts2);
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param options
|
||||
*/
|
||||
constructor(options: PluginError.PluginErrorOpts3);
|
||||
message?: string | Error;
|
||||
}
|
||||
|
||||
export = PluginError;
|
||||
export interface PluginErrorOpts3 extends PluginErrorOpts2 {
|
||||
/**
|
||||
* The name of the plugin
|
||||
*/
|
||||
plugin?: string;
|
||||
}
|
||||
}
|
||||
|
||||
declare class PluginError extends Error {
|
||||
/**
|
||||
* Constructor
|
||||
* @param pluginName The name of your plugin
|
||||
* @param message If you pass an error object as the message the stack will be pulled from that, otherwise one will be created.
|
||||
* @param options Options
|
||||
*/
|
||||
constructor(pluginName: string, message: string | Error, options?: PluginError.PluginErrorOpts);
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param pluginName The name of your plugin
|
||||
* @param options Options, including message
|
||||
*/
|
||||
constructor(pluginName: string, options: PluginError.PluginErrorOpts2);
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param options Options, including message and plugin name
|
||||
*/
|
||||
constructor(options: PluginError.PluginErrorOpts3);
|
||||
}
|
||||
|
||||
@@ -1 +1,6 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
"rules": {
|
||||
"strict-export-declare-modifiers": false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user