Skip to content

AnySetChoice beta ​

TypeAlias of @v12-engine/engine

ts
export type AnySetChoice = 'all' | 'none' | {
    only?: readonly string[];
    except?: readonly string[];
    with?: readonly {
        id: string;
    }[];
    change?: Readonly<Record<string, object | ((def: never) => {
        id: string;
    })>>;
};

What a game takes of a set, as useDefaults is given it for sets of any kind (SetChoice): a function of change says the kind of definition it is given ((def: ItemDef) => ({ ...def, cost: { gold: 900 } }))