boardgame.io icon indicating copy to clipboard operation
boardgame.io copied to clipboard

TurnOrder issue when using a plugin

Open walkerkd opened this issue 1 year ago • 0 comments

If you use a plugin such as the bgio-effects plugin then the TurnOrder definitions are not compatible when using Typescript.

So a turn description which includes:

    turn: {
        order: TurnOrder.ONCE,
    },

will not compile.

This is similar to issue #1050

The work around I found was to use:

    turn: {
        order: TurnOrder.ONCE as unknown as TurnOrderConfig<
            State,
            EffectsCtxMixin<typeof EffectsConfig>
        >,
    },

walkerkd avatar Feb 10 '23 22:02 walkerkd