--- interface Props { stars: number; size: "big" | "small"; } function roundToCustomHalf(value: number) { const whole = Math.floor(value); const decimal = value - whole; if (decimal < 0.25) return whole; if (decimal < 0.75) return whole + 0.5; return whole + 1; } const stars = roundToCustomHalf(Astro.props.stars); const totalStars = 5; ---