Fix types

This commit is contained in:
Adria Navarro 2023-09-22 18:24:00 +02:00
parent 02ab0a134e
commit 124ff40159
1 changed files with 2 additions and 2 deletions

View File

@ -49,8 +49,8 @@ async function askAboutTopLevel(name: string) {
}
}
async function init(opts: PluginOpts) {
const type = opts["init"] || (opts as PluginType)
async function init(opts: PluginOpts | PluginType) {
const type = (opts as PluginOpts).init || (opts as PluginType)
if (!type || !PLUGIN_TYPE_ARR.includes(type)) {
console.log(
error(