diff --git a/src/data/common.tsx b/src/data/common.tsx index 9ab32f5..81f0e94 100644 --- a/src/data/common.tsx +++ b/src/data/common.tsx @@ -35,7 +35,7 @@ export interface ResetButtonOptions extends ClickableOptions { canClick?: Computable; } -type ResetButton = Replace< +export type ResetButton = Replace< Clickable, { resetDescription: GetComputableTypeWithDefault>; diff --git a/src/data/themes.ts b/src/data/themes.ts index cf7e4c5..37b563f 100644 --- a/src/data/themes.ts +++ b/src/data/themes.ts @@ -1,4 +1,4 @@ -interface ThemeVars { +export interface ThemeVars { "--foreground": string; "--background": string; "--feature-foreground": string; diff --git a/src/features/achievements/achievement.tsx b/src/features/achievements/achievement.tsx index cdfb855..c79d1ad 100644 --- a/src/features/achievements/achievement.tsx +++ b/src/features/achievements/achievement.tsx @@ -39,7 +39,7 @@ export interface AchievementOptions { onComplete?: VoidFunction; } -interface BaseAchievement extends Persistent { +export interface BaseAchievement extends Persistent { id: string; earned: Ref; complete: VoidFunction; diff --git a/src/features/bars/bar.ts b/src/features/bars/bar.ts index 27a208e..36c3084 100644 --- a/src/features/bars/bar.ts +++ b/src/features/bars/bar.ts @@ -45,7 +45,7 @@ export interface BarOptions { mark?: Computable; } -interface BaseBar { +export interface BaseBar { id: string; type: typeof BarType; [Component]: typeof BarComponent; diff --git a/src/features/boards/board.ts b/src/features/boards/board.ts index 60c53ea..3afcc87 100644 --- a/src/features/boards/board.ts +++ b/src/features/boards/board.ts @@ -167,7 +167,7 @@ export interface BoardOptions { types: Record; } -interface BaseBoard extends Persistent { +export interface BaseBoard extends Persistent { id: string; links: Ref; nodes: Ref; diff --git a/src/features/buyable.tsx b/src/features/buyable.tsx index 8f05e05..1ab8a83 100644 --- a/src/features/buyable.tsx +++ b/src/features/buyable.tsx @@ -26,7 +26,7 @@ import { export const BuyableType = Symbol("Buyable"); -type BuyableDisplay = +export type BuyableDisplay = | CoercableComponent | { title?: CoercableComponent; @@ -48,7 +48,7 @@ export interface BuyableOptions { onPurchase?: (cost: DecimalSource) => void; } -interface BaseBuyable extends Persistent { +export interface BaseBuyable extends Persistent { id: string; amount: Ref; maxed: Ref; diff --git a/src/features/challenges/challenge.tsx b/src/features/challenges/challenge.tsx index 50350f0..6f760ee 100644 --- a/src/features/challenges/challenge.tsx +++ b/src/features/challenges/challenge.tsx @@ -55,7 +55,7 @@ export interface ChallengeOptions { onEnter?: VoidFunction; } -interface BaseChallenge { +export interface BaseChallenge { id: string; completions: PersistentRef; completed: Ref; diff --git a/src/features/clickables/clickable.ts b/src/features/clickables/clickable.ts index 4106847..7747150 100644 --- a/src/features/clickables/clickable.ts +++ b/src/features/clickables/clickable.ts @@ -39,7 +39,7 @@ export interface ClickableOptions { onHold?: VoidFunction; } -interface BaseClickable { +export interface BaseClickable { id: string; type: typeof ClickableType; [Component]: typeof ClickableComponent; diff --git a/src/features/conversion.ts b/src/features/conversion.ts index cfa7ee5..ef0d0e7 100644 --- a/src/features/conversion.ts +++ b/src/features/conversion.ts @@ -23,7 +23,7 @@ export interface ConversionOptions { modifyGainAmount?: (gain: DecimalSource) => DecimalSource; } -interface BaseConversion { +export interface BaseConversion { convert: VoidFunction; } diff --git a/src/features/hotkey.ts b/src/features/hotkey.ts index 3206400..99b074f 100644 --- a/src/features/hotkey.ts +++ b/src/features/hotkey.ts @@ -22,7 +22,7 @@ export interface HotkeyOptions { onPress: VoidFunction; } -interface BaseHotkey { +export interface BaseHotkey { type: typeof HotkeyType; } diff --git a/src/features/infoboxes/infobox.ts b/src/features/infoboxes/infobox.ts index 6037e66..2d6b97c 100644 --- a/src/features/infoboxes/infobox.ts +++ b/src/features/infoboxes/infobox.ts @@ -33,7 +33,7 @@ export interface InfoboxOptions { display: Computable; } -interface BaseInfobox extends Persistent { +export interface BaseInfobox extends Persistent { id: string; collapsed: Ref; type: typeof InfoboxType; diff --git a/src/features/milestones/milestone.tsx b/src/features/milestones/milestone.tsx index a6c78c1..359b192 100644 --- a/src/features/milestones/milestone.tsx +++ b/src/features/milestones/milestone.tsx @@ -56,7 +56,7 @@ export interface MilestoneOptions { onComplete?: VoidFunction; } -interface BaseMilestone extends Persistent { +export interface BaseMilestone extends Persistent { id: string; earned: Ref; type: typeof MilestoneType; diff --git a/src/features/reset.ts b/src/features/reset.ts index 08b19b3..bdf86cb 100644 --- a/src/features/reset.ts +++ b/src/features/reset.ts @@ -21,7 +21,7 @@ export interface ResetOptions { onReset?: VoidFunction; } -interface BaseReset { +export interface BaseReset { id: string; reset: VoidFunction; type: typeof ResetType; diff --git a/src/features/tabs/tab.ts b/src/features/tabs/tab.ts index b46063d..a5ffe38 100644 --- a/src/features/tabs/tab.ts +++ b/src/features/tabs/tab.ts @@ -18,7 +18,7 @@ export interface TabOptions { display: Computable; } -interface BaseTab { +export interface BaseTab { id: string; type: typeof TabType; [Component]: typeof TabComponent; diff --git a/src/features/tabs/tabFamily.ts b/src/features/tabs/tabFamily.ts index 73390d7..321396c 100644 --- a/src/features/tabs/tabFamily.ts +++ b/src/features/tabs/tabFamily.ts @@ -34,7 +34,7 @@ export interface TabButtonOptions { glowColor?: Computable; } -interface BaseTabButton { +export interface BaseTabButton { type: typeof TabButtonType; [Component]: typeof TabButtonComponent; } @@ -65,7 +65,7 @@ export interface TabFamilyOptions { style?: Computable; } -interface BaseTabFamily extends Persistent { +export interface BaseTabFamily extends Persistent { id: string; activeTab: Ref; selected: Ref; diff --git a/src/features/trees/tree.ts b/src/features/trees/tree.ts index 748673e..1a3743b 100644 --- a/src/features/trees/tree.ts +++ b/src/features/trees/tree.ts @@ -137,7 +137,7 @@ export interface TreeOptions { onReset?: (node: GenericTreeNode) => void; } -interface BaseTree { +export interface BaseTree { id: string; links: Ref; reset: (node: GenericTreeNode) => void; diff --git a/src/features/upgrades/upgrade.ts b/src/features/upgrades/upgrade.ts index e406c3c..096ca2c 100644 --- a/src/features/upgrades/upgrade.ts +++ b/src/features/upgrades/upgrade.ts @@ -46,7 +46,7 @@ export interface UpgradeOptions { onPurchase?: VoidFunction; } -interface BaseUpgrade extends Persistent { +export interface BaseUpgrade extends Persistent { id: string; bought: Ref; canPurchase: Ref; diff --git a/src/util/computed.ts b/src/util/computed.ts index 3643d8f..3becd66 100644 --- a/src/util/computed.ts +++ b/src/util/computed.ts @@ -15,9 +15,9 @@ export type GetComputableType = T extends { [DoNotCache]: true } export type GetComputableTypeWithDefault = undefined extends T ? S : GetComputableType>; -type UnwrapComputableType = T extends Ref ? S : T extends () => infer S ? S : T; +export type UnwrapComputableType = T extends Ref ? S : T extends () => infer S ? S : T; -type ComputableKeysOf = Pick< +export type ComputableKeysOf = Pick< T, { [K in keyof T]: T[K] extends Computable ? K : never; diff --git a/src/util/vue.tsx b/src/util/vue.tsx index 5fdd1c1..6bd8866 100644 --- a/src/util/vue.tsx +++ b/src/util/vue.tsx @@ -154,7 +154,7 @@ export function setRefValue(ref: Ref>, value: T) { } } -type PropTypes = +export type PropTypes = | typeof Boolean | typeof String | typeof Number