Attempt at fixing travis errors.

This commit is contained in:
Rogier Schouten
2017-12-25 16:45:32 +01:00
parent ff530246cf
commit 18f1ee49d4
2 changed files with 49 additions and 46 deletions

View File

@@ -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);
}

View File

@@ -1 +1,6 @@
{ "extends": "dtslint/dt.json" }
{
"extends": "dtslint/dt.json",
"rules": {
"strict-export-declare-modifiers": false
}
}