diff --git a/src/plugins/main.ts b/src/plugins/main.ts index 59756123b..2a5ddfac2 100644 --- a/src/plugins/main.ts +++ b/src/plugins/main.ts @@ -261,7 +261,6 @@ const IsInvalid = ( G: state.G, ctx: state.ctx, game: opts.game, - api: pluginState && pluginState.api, data: pluginState && pluginState.data, }); diff --git a/src/types.ts b/src/types.ts index cc0a15459..2b7db8ef3 100644 --- a/src/types.ts +++ b/src/types.ts @@ -144,7 +144,9 @@ export interface Plugin< > { name: string; noClient?: (context: PluginContext) => boolean; - isInvalid?: (context: PluginContext) => false | string; + isInvalid?: ( + context: Omit, 'api'> + ) => false | string; setup?: (setupCtx: { G: G; ctx: Ctx; game: Game }) => Data; action?: (data: Data, payload: ActionShape.Plugin['payload']) => Data; api?: (context: {