Standardize on {}|void instead of ?{} options.
This commit is contained in:
@@ -9,7 +9,7 @@ export default class Plugin {
|
||||
|
||||
options: {} | void;
|
||||
|
||||
constructor(plugin: {}, options: ?{}, key?: string) {
|
||||
constructor(plugin: {}, options: {} | void, key?: string) {
|
||||
if (plugin.name != null && typeof plugin.name !== "string") {
|
||||
throw new Error("Plugin .name must be a string, null, or undefined");
|
||||
}
|
||||
@@ -37,6 +37,6 @@ export default class Plugin {
|
||||
this.post = plugin.post;
|
||||
this.pre = plugin.pre;
|
||||
this.visitor = plugin.visitor;
|
||||
this.options = options || undefined;
|
||||
this.options = options;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user