bugs bashed
This commit is contained in:
@@ -145,7 +145,7 @@ export default {
|
||||
resolveQuit: () => null,
|
||||
getResult: (state) =>
|
||||
Object.entries(state.playerHands).find(
|
||||
([_, hand]) => hand.length === 52
|
||||
([_, hand]) => hand.length === config["cards to win"]
|
||||
)?.[0],
|
||||
}),
|
||||
} satisfies Game<
|
||||
|
||||
9
pkg/shared/types.ts
Normal file
9
pkg/shared/types.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export type UnionKeys<T> = T extends any ? keyof T : never;
|
||||
export type ExtractPropertyType<
|
||||
T,
|
||||
P extends string | number | symbol
|
||||
> = T extends {
|
||||
[K in P]: any;
|
||||
}
|
||||
? T[P]
|
||||
: never;
|
||||
Reference in New Issue
Block a user