mirror of
https://github.com/randyjc/Rahoot.git
synced 2026-03-14 04:25:35 +01:00
feat(reconnect): add reconnect for player & manager
This commit is contained in:
8
packages/web/src/utils/createStatus.ts
Normal file
8
packages/web/src/utils/createStatus.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
export type Status<T> = {
|
||||
[K in keyof T]: { name: K; data: T[K] }
|
||||
}[keyof T]
|
||||
|
||||
export const createStatus = <T, K extends keyof T>(
|
||||
name: K,
|
||||
data: T[K],
|
||||
): Status<T> => ({ name, data })
|
||||
Reference in New Issue
Block a user