Open nclsndr opened 1 week ago
The tokens parser is capable of catching type mismatches for scalar types but ignore the composites.
parse([{ src: JSON.stringify({ color: { $type: 'color', blue: { $value: '#10109A', }, }, dimension: { base: { $type: 'dimension', $value: '{color.blue}', // should be dimension: caught by parser ✅ }, }, border: { base: { $type: 'border', $value: '{dimension.base}', // should be border: caught by parser ✅ }, nested: { $type: 'border', $value: { color: '{color.blue}', width: '{color.blue}', // should be dimension: silently failing ❌ style: 'solid', }, }, }, }) }])
I think that's not much of a deal, yet I preferred to report it while looking into it.
— The only solution I found on my end was to manually declare the mapping.
Ah that’s a great catch, thank you! Worth fixing for sure. I like your mapping approach; great suggestion.
The tokens parser is capable of catching type mismatches for scalar types but ignore the composites.
I think that's not much of a deal, yet I preferred to report it while looking into it.
— The only solution I found on my end was to manually declare the mapping.