import { Plugin , PluginOptions , PluginWithOptions , PluginWithOptionsFunction } from './types' ; function plugin ( handlers ) { return handlers ; } function pluginWithOptions < T = PluginOptions > ( handlers ) { function optionsFunction ( options ? ) { return { __options : options , ... handlers } ; } optionsFunction . __isOptionsFunction = true ; return optionsFunction ; } plugin . withOptions = pluginWithOptions ; export default plugin ; module . exports = plugin ;