refactor: hide api
This commit is contained in:
@@ -10,11 +10,18 @@ import {
|
||||
import { createGameHost, GameHost } from '@/core/game-host';
|
||||
import type { PromptEvent } from '@/utils/command';
|
||||
import { MutableSignal } from '@/utils/mutable-signal';
|
||||
import {IGameContext} from "../../src";
|
||||
|
||||
type TestGameHost = GameHost<TicTacToeState> & {
|
||||
_context: IGameContext<TicTacToeState>;
|
||||
context: IGameContext<TicTacToeState>;
|
||||
}
|
||||
|
||||
function createTestHost() {
|
||||
const host = createGameHost(
|
||||
const host: TestGameHost = createGameHost(
|
||||
{ registry, createInitialState, start }
|
||||
);
|
||||
host.context = host._context;
|
||||
return { host };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user