You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rename Icon path property to svgPath to fix type collision (#1347)
The Icon component's name property accepted either a string (for standard icons) or an object with a path property (for custom SVG paths)
However, the Angular renderer uses a utility type to resolve properties that strips away shapes matching DataBindingType (which is defined as { path: string }). Because of this structural match, the { path: string } branch was being incorrectly excluded from the resolved type, leaving only the string enum and forcing developers to use as any casts when dealing with custom SVG paths.
This PR renames the property inside the object from path to svgPath. This breaks the structural match with DataBindingType and preserves the type in the union, allowing for proper type inference without forced casts.
Copy file name to clipboardExpand all lines: renderers/web_core/CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
1
## Unreleased
2
2
3
+
-**BREAKING CHANGE**: Rename Icon `path` property to `svgPath` to fix type collision with `DataBindingType`.
3
4
- (v0_9) Add `computeColorVariant` helper function for basic catalog components to generate CSS formulas for color variants (light, dark, hover), allowing reuse across renderers.
0 commit comments