Skip to content

Commit

Permalink
Merge dfd8aef into 065202e
Browse files Browse the repository at this point in the history
  • Loading branch information
brebory committed Mar 16, 2021
2 parents 065202e + dfd8aef commit 32b0b5c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ Satana Charuwichitratana
Pete Nykänen
Philihp Busby
Jason Harrison
Brendon Roberto
3 changes: 2 additions & 1 deletion packages/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
*/

import PluginPlayer from '../src/plugins/plugin-player';
import { PlayerPlugin } from '../src/plugins/plugin-player';

export { PluginPlayer };
export { PluginPlayer, PlayerPlugin };
11 changes: 7 additions & 4 deletions src/client/react.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import { Client as RawClient } from './client';
import type { ClientOpts, ClientState, _ClientImpl } from './client';
import type { Ctx } from '../types';

type WrappedBoardDelegates = 'matchID' | 'playerID' | 'credentials';

Expand Down Expand Up @@ -40,8 +41,9 @@ export type BoardProps<G extends any = any> = ClientState<G> &

type ReactClientOpts<
G extends any = any,
P extends BoardProps<G> = BoardProps<G>
> = Omit<ClientOpts<G>, WrappedBoardDelegates> & {
P extends BoardProps<G> = BoardProps<G>,
CtxWithPlugins extends Ctx = Ctx
> = Omit<ClientOpts<G, CtxWithPlugins>, WrappedBoardDelegates> & {
board?: React.ComponentType<P>;
loading?: React.ComponentType;
};
Expand All @@ -67,8 +69,9 @@ type ReactClientOpts<
*/
export function Client<
G extends any = any,
P extends BoardProps<G> = BoardProps<G>
>(opts: ReactClientOpts<G, P>) {
P extends BoardProps<G> = BoardProps<G>,
ContextWithPlugins extends Ctx = Ctx
>(opts: ReactClientOpts<G, P, ContextWithPlugins>) {
let { game, numPlayers, loading, board, multiplayer, enhancer, debug } = opts;

// Component that is displayed before the client has synced
Expand Down

0 comments on commit 32b0b5c

Please sign in to comment.