diff --git a/src/features/particles/particles.tsx b/src/features/particles/particles.tsx index 549ccee..8edaab1 100644 --- a/src/features/particles/particles.tsx +++ b/src/features/particles/particles.tsx @@ -73,7 +73,7 @@ export function createParticles( const particles = optionsFunc?.() ?? ({} as ReturnType>); particles.id = getUniqueID("particles-"); particles.type = ParticlesType; - particles[Component] = ParticlesComponent; + particles[Component] = ParticlesComponent as GenericComponent; particles.app = shallowRef(null); particles.addEmitter = (config: EmitterConfigV3): Promise => { diff --git a/src/features/tooltips/tooltip.ts b/src/features/tooltips/tooltip.ts index 55985f4..129bd16 100644 --- a/src/features/tooltips/tooltip.ts +++ b/src/features/tooltips/tooltip.ts @@ -1,4 +1,4 @@ -import type { CoercableComponent, Replace, StyleValue } from "features/feature"; +import type { CoercableComponent, GenericComponent, Replace, StyleValue } from "features/feature"; import { Component, GatherProps, setDefault } from "features/feature"; import { deletePersistent, Persistent, persistent } from "game/persistence"; import { Direction } from "util/common"; @@ -76,7 +76,7 @@ export type GenericTooltip = Replace< /** * Creates a tooltip on the given element with the given options. * @param element The renderable feature to display the tooltip on. - * @param optionsFunc Clickable options. + * @param options Tooltip options. */ export function addTooltip( element: VueFeature, @@ -108,7 +108,7 @@ export function addTooltip( } } const elementComponent = element[Component]; - element[Component] = TooltipComponent; + element[Component] = TooltipComponent as GenericComponent; const elementGatherProps = element[GatherProps].bind(element); element[GatherProps] = function gatherTooltipProps(this: GenericTooltip) { const { display, classes, style, direction, xoffset, yoffset, pinned } = this;