sassdoc
sassdoc copied to clipboard
How to document @function that takes parameter a map key.
For example I'd like to document the following function:
/// Generates a font size
///
/// @param {String} $sizeName
/// The name of the font size
/// @return {number} The value of the font size
@function get-font-size($sizeName) {
@if map.has-key($scale-exponent-map, $sizeName) {
$multiplier: math.pow($scale, map.get($scale-exponent-map, $sizeName));
@return calc(var(--ItgApp-baseFontSize) * #{$multiplier});
} @else {
@error "Size #{$sizeName} must one of the following #{map.keys($scale-exponent-map)}";
}
}
I'd like $sizeName type to be something like a key of $scale-exponent-map