1
0
Fork 0
mirror of synced 2024-10-01 09:38:55 +13:00

Fix types

This commit is contained in:
Adria Navarro 2023-09-22 18:24:00 +02:00
parent 02ab0a134e
commit 124ff40159

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(