plugin factory should support creating class instances
Closed this issue · 1 comments
sgratzl commented
a common case is that the factory method is simply a class instantiation with the given arguments. This case should be simplified.
e.g. use a magic prefix for the factory
like new <typename|default>
sgratzl commented
/**
* name of the method, which is the entry point of this plugin
* options:
* * `<factorymethod>` the name of the factory method to use
* * `new <classname>` will create a new instance of the given class
* * `new` will create an instance of the default exported class of this module, same as `new default`
* @default create
*/
readonly factory: string;