UNPKG

@gamepark/rules-api

Version:

API to implement the rules of a board game

8 lines (7 loc) 305 B
import { PlayerEnumOption } from './PlayerEnumOption'; import { WithIdOption } from './WithIdOption'; export type PlayersOptionsSpec<Options> = (Options extends WithIdOption<infer Id> ? { id: PlayerEnumOption<Id>; } : {}) & { [key in keyof Omit<Options, 'id'>]: PlayerEnumOption<Options[key]>; };