26 lines
526 B
TypeScript
26 lines
526 B
TypeScript
type PartBlueprint = string
|
|
|
|
export type DeskBuilder=
|
|
<
|
|
Parts extends Record<string, PartBlueprint>,
|
|
IDs extends keyof Parts,
|
|
Desks extends [ name:string, mode:"all"|"one", Record<IDs, number>, ...make:Array<IDs>][]
|
|
>
|
|
(
|
|
parts:Parts,
|
|
...desks:Desks
|
|
)
|
|
=>void
|
|
|
|
type UserBlueprint = string
|
|
export type UserBuilder=
|
|
<
|
|
Users extends Record<string, UserBlueprint>,
|
|
IDs extends keyof Users,
|
|
Roles extends Record<string, [ name:string, ...users:Array<IDs>]>
|
|
>
|
|
(
|
|
users:Users,
|
|
roles:Roles
|
|
)
|
|
=>void |