37 lines
881 B
TypeScript
37 lines
881 B
TypeScript
// SPDX-FileCopyrightText: 2021 Johannes Loher
|
|
//
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
export interface ModifiableData<T> {
|
|
mod: T;
|
|
}
|
|
|
|
export interface HasBase<T> {
|
|
base: T;
|
|
}
|
|
export interface ModifiableDataBase<T> extends ModifiableData<T>, HasBase<T> {}
|
|
|
|
export interface HasTotal<T> {
|
|
total: T;
|
|
}
|
|
|
|
export interface ModifiableDataBaseTotal<T> extends ModifiableDataBase<T>, HasTotal<T> {}
|
|
|
|
export interface ResourceData<T> extends ModifiableData<T> {
|
|
value: T;
|
|
}
|
|
|
|
export interface HasMax<T> {
|
|
max: T;
|
|
}
|
|
|
|
export interface ModifiableDataBaseMax<T> extends ModifiableDataBase<T>, HasMax<T> {}
|
|
|
|
export interface ModifiableDataBaseTotalMax<T> extends ModifiableDataBaseMax<T>, HasTotal<T> {}
|
|
|
|
export interface ResourceDataBaseTotalMax<T> extends ResourceData<T>, HasBase<T>, HasTotal<T>, HasMax<T> {}
|
|
|
|
export interface UsableResource<T> {
|
|
total: T;
|
|
used: T;
|
|
}
|