18 lines
493 B
TypeScript
18 lines
493 B
TypeScript
type PartBlueprint = string
|
|
type UserBlueprint = string
|
|
|
|
export type GraphBuilder=
|
|
<
|
|
Users extends Record<string, UserBlueprint>,
|
|
Roles extends Record<string, [ name:string, ...users:Array<keyof Users>]>,
|
|
Parts extends Record<string, PartBlueprint>,
|
|
Desk extends [ name:string, roles:Array<keyof Roles>, mode:"all"|"one", need:Partial<Record<keyof Parts, number>>, ...make:Array<keyof Parts>]
|
|
>
|
|
(
|
|
users:Users,
|
|
roles:Roles,
|
|
parts:Parts,
|
|
...desks:Desk[]
|
|
)
|
|
=>void
|