Commit 90221ab
committed
feat: add ExpressibleByLiteral conformances to Length
Add ExpressibleByIntegerLiteral and ExpressibleByFloatLiteral to Length type
for cleaner API when constructing lengths from numeric literals.
Example usage:
let width: W3C_SVG2.Types.Length = 100 // .number(100)
let height: W3C_SVG2.Types.Length = 50.5 // .number(50.5)
This provides better ergonomics while maintaining type safety.1 parent 82ea743 commit 90221ab
1 file changed
+12
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
0 commit comments