[LiquidDoc] Add union types
Author: andershagbardCreated May 31, 2025Updated Jan 27, 2026
LabelsFeature Request
Add the possibility to add union types for LiquidDocs.
E.g.
@param {string|number} my_variable - This can be a string or a number.Use cases:
When passing an image aspect attribute, you can manually enter the numeric value as
0.5or you can enter a string as1/2, and then have the snippet to the math for you.To be a bit more lax. When passing a width attribute and appending
%. E.g.{{ width | append: '%' }}, you wouldn't care if it's a number or a string.
@karreiro (Tagging for visibility)
Source: Shopify/liquid