Improve plugin typings

This commit is contained in:
Vendicated 2022-10-09 01:59:21 +02:00
parent e0bbdd89bd
commit 151f2eef8a
No known key found for this signature in database
GPG key ID: EC781ADFB93EFFA3

View file

@ -1,7 +1,7 @@
import { Command } from "../api/Commands";
// exists to export default definePlugin({...})
export default function definePlugin(p: PluginDef & Record<string, any>) {
export default function definePlugin<P extends PluginDef>(p: P & Record<string, any>) {
return p;
}