Add feature decorator system #13

Merged
murapix merged 18 commits from main into main 2023-04-20 01:28:11 +00:00
3 changed files with 140 additions and 5 deletions
Showing only changes of commit dafbcd5a6c - Show all commits

View file

@ -23,6 +23,7 @@ import { createLazyProxy } from "util/proxies";
import { coerceComponent, isCoercableComponent } from "util/vue"; import { coerceComponent, isCoercableComponent } from "util/vue";
import type { Ref } from "vue"; import type { Ref } from "vue";
import { computed, unref } from "vue"; import { computed, unref } from "vue";
import { Decorator } from "./decorators";
export const BuyableType = Symbol("Buyable"); export const BuyableType = Symbol("Buyable");
@ -89,9 +90,13 @@ export type GenericBuyable = Replace<
>; >;
export function createBuyable<T extends BuyableOptions>( export function createBuyable<T extends BuyableOptions>(
optionsFunc: OptionsFunc<T, BaseBuyable, GenericBuyable> optionsFunc: OptionsFunc<T, BaseBuyable, GenericBuyable>,
...decorators: Decorator<T, BaseBuyable, GenericBuyable>[]
): Buyable<T> { ): Buyable<T> {
const amount = persistent<DecimalSource>(0); const amount = persistent<DecimalSource>(0);
const persistents = decorators.reduce((current, next) => Object.assign(current, next.getPersistents?.()), {});
return createLazyProxy(() => { return createLazyProxy(() => {
const buyable = optionsFunc(); const buyable = optionsFunc();
@ -107,8 +112,15 @@ export function createBuyable<T extends BuyableOptions>(
buyable.type = BuyableType; buyable.type = BuyableType;
buyable[Component] = ClickableComponent; buyable[Component] = ClickableComponent;
for (const decorator of decorators) {
decorator.preConstruct?.(buyable);
}
buyable.amount = amount; buyable.amount = amount;
buyable.amount[DefaultValue] = buyable.initialValue ?? 0; buyable.amount[DefaultValue] = buyable.initialValue ?? 0;
Object.assign(buyable, persistents);
buyable.canAfford = computed(() => { buyable.canAfford = computed(() => {
const genericBuyable = buyable as GenericBuyable; const genericBuyable = buyable as GenericBuyable;
const cost = unref(genericBuyable.cost); const cost = unref(genericBuyable.cost);
@ -230,6 +242,7 @@ export function createBuyable<T extends BuyableOptions>(
processComputable(buyable as T, "mark"); processComputable(buyable as T, "mark");
processComputable(buyable as T, "small"); processComputable(buyable as T, "small");
const gatheredProps = decorators.reduce((current, next) => Object.assign(current, next.getGatheredProps?.(buyable)), {});
buyable[GatherProps] = function (this: GenericBuyable) { buyable[GatherProps] = function (this: GenericBuyable) {
const { display, visibility, style, classes, onClick, canClick, small, mark, id } = const { display, visibility, style, classes, onClick, canClick, small, mark, id } =
this; this;
@ -242,10 +255,15 @@ export function createBuyable<T extends BuyableOptions>(
canClick, canClick,
small, small,
mark, mark,
id id,
...gatheredProps
}; };
}; };
for (const decorator of decorators) {
decorator.postConstruct?.(buyable);
}
return buyable as unknown as Buyable<T>; return buyable as unknown as Buyable<T>;
}); });
} }

117
src/features/decorators.ts Normal file
View file

@ -0,0 +1,117 @@
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
import { Replace, OptionsObject } from "./feature";
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
import Decimal, { DecimalSource } from "util/bignum";
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
import { Computable, GetComputableType, processComputable, ProcessedComputable } from "util/computed";
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
import { AchievementOptions, BaseAchievement, GenericAchievement } from "./achievements/achievement";
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
import { BarOptions, BaseBar, GenericBar } from "./bars/bar";
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
import { BaseBuyable, BuyableOptions, GenericBuyable } from "./buyable";
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
import { BaseChallenge, ChallengeOptions, GenericChallenge } from "./challenges/challenge";
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
import { BaseClickable, ClickableOptions, GenericClickable } from "./clickables/clickable";
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
import { BaseMilestone, GenericMilestone, MilestoneOptions } from "./milestones/milestone";
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
import { BaseUpgrade, GenericUpgrade, UpgradeOptions } from "./upgrades/upgrade";
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
import { Persistent, State } from "game/persistence";
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
import { computed, Ref, unref } from "vue";
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
type FeatureOptions = AchievementOptions | BarOptions | BuyableOptions | ChallengeOptions | ClickableOptions | MilestoneOptions | UpgradeOptions;
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
type BaseFeature = BaseAchievement | BaseBar | BaseBuyable | BaseChallenge | BaseClickable | BaseMilestone | BaseUpgrade;
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
type GenericFeature = GenericAchievement | GenericBar | GenericBuyable | GenericChallenge | GenericClickable | GenericMilestone | GenericUpgrade;
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
/*----====----*/
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
export type Decorator<Options extends FeatureOptions, Base extends BaseFeature, Generic extends GenericFeature, S extends State = State> = {
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
getPersistents?(): Record<string, Persistent<S>>;
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
preConstruct?(feature: OptionsObject<Options,Base,Generic>): void;
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
postConstruct?(feature: OptionsObject<Options,Base,Generic>): void;
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
getGatheredProps?(feature: OptionsObject<Options,Base,Generic>): Partial<OptionsObject<Options,Base,Generic>>
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
}
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
/*----====----*/
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
// #region Effect Decorator
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
export type EffectFeatureOptions = {
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
effect: Computable<any>;
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
}
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
export type EffectFeature<T extends EffectFeatureOptions, U extends BaseFeature> = Replace<
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
T & U,
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
{ effect: GetComputableType<T["effect"]>; }
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
>;
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
export type GenericEffectFeature<T extends GenericFeature> = T & Replace<
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
EffectFeature<EffectFeatureOptions, BaseFeature>,
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
{ effect: ProcessedComputable<any>; }
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
>;
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
export const effectDecorator: Decorator<FeatureOptions & EffectFeatureOptions, BaseFeature, GenericFeature & BaseFeature> = {
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
postConstruct(feature) {
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
processComputable(feature, "effect");
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
}
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
}
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
// #endregion
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
/*----====----*/
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
// #region Bonus Amount Decorator
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
export interface BonusFeatureOptions {
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
bonusAmount: Computable<DecimalSource>;
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
}
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
export type BaseBonusFeature = BaseFeature & {
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
totalAmount: Ref<DecimalSource>;
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
}
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
export type BonusAmountFeature<T extends BonusFeatureOptions, U extends BaseBonusFeature> = Replace<
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
T & U,
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
{
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
bonusAmount: GetComputableType<T["bonusAmount"]>;
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
}
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
>;
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
export type GenericBonusFeature<T extends GenericFeature> = Replace<
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
T & BonusAmountFeature<BonusFeatureOptions, BaseBonusFeature>,
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
{
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
bonusAmount: ProcessedComputable<DecimalSource>;
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
totalAmount: ProcessedComputable<DecimalSource>;
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
}
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
>;
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
export const bonusAmountDecorator: Decorator<FeatureOptions & BonusFeatureOptions, BaseBonusFeature & {amount: ProcessedComputable<DecimalSource>}, GenericFeature & BaseBonusFeature & {amount: ProcessedComputable<DecimalSource>}> = {
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
postConstruct(feature) {
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
processComputable(feature, "bonusAmount");
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
if (feature.totalAmount === undefined) {
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
feature.totalAmount = computed(() => Decimal.add(
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
unref(feature.amount ?? 0),
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
unref(feature.bonusAmount as ProcessedComputable<DecimalSource>)
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
));
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
}
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
}
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
}
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
export const bonusCompletionsDecorator: Decorator<FeatureOptions & BonusFeatureOptions, BaseBonusFeature & {completions: ProcessedComputable<DecimalSource>}, GenericFeature & BaseBonusFeature & {completions: ProcessedComputable<DecimalSource>}> = {
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
postConstruct(feature) {
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
processComputable(feature, "bonusAmount");
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
if (feature.totalAmount === undefined) {
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
feature.totalAmount = computed(() => Decimal.add(
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
unref(feature.completions ?? 0),
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
unref(feature.bonusAmount as ProcessedComputable<DecimalSource>)
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
));
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
}
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
}
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
}
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
export const bonusEarnedDecorator: Decorator<FeatureOptions & BonusFeatureOptions, BaseBonusFeature & {earned: ProcessedComputable<boolean>}, GenericFeature & BaseBonusFeature & {earned: ProcessedComputable<boolean>}> = {
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
postConstruct(feature) {
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
processComputable(feature, "bonusAmount");
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
if (feature.totalAmount === undefined) {
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
feature.totalAmount = computed(() => unref(feature.earned ?? false)
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
? Decimal.add(unref(feature.bonusAmount as ProcessedComputable<DecimalSource>), 1)
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
: unref(feature.bonusAmount as ProcessedComputable<DecimalSource>)
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
);
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
}
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
}
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
}
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
// #endregion
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
/*----====----*/
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).
thepaperpilot commented 2023-02-26 16:40:13 +00:00 (Migrated from github.com)
Review

I think the specific decorators probably belong in their own files, or in common.tsx if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

I think the specific decorators probably belong in their own files, or in `common.tsx` if they're particularly small and useful enough to be included as part of the "base" project (as effects would be, but maybe not the bonusAmounts/completions).

View file

@ -42,9 +42,9 @@ export type Replace<T, S> = S & Omit<T, keyof S>;
* with "this" bound to what the type will eventually be processed into. * with "this" bound to what the type will eventually be processed into.
* Intended for making lazily evaluated objects. * Intended for making lazily evaluated objects.
*/ */
export type OptionsFunc<T, R = Record<string, unknown>, S = R> = () => T & export type OptionsFunc<T, R = Record<string, unknown>, S = R> = () => OptionsObject<T,R,S>;
Partial<R> &
ThisType<T & S>; export type OptionsObject<T, R = Record<string, unknown>, S = R> = T & Partial<R> & ThisType<T & S>;
let id = 0; let id = 0;
/** /**