/// import { recipe, UI } from "commontools"; interface Problem { price: number; discount: number; tax: number; } export default recipe( "ComplexExpressions", ({ price, discount, tax }) => { return { [UI]: ( Price: {price} Discount: {price - discount} With tax: {(price - discount) * (1 + tax)} ), }; }, );
Price: {price}
Discount: {price - discount}
With tax: {(price - discount) * (1 + tax)}