Standardize on {}|void instead of ?{} options.

This commit is contained in:
Logan Smyth
2017-10-05 21:40:16 -04:00
parent 597f1a12cf
commit ca4460c0b8
2 changed files with 6 additions and 5 deletions

View File

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