facebook / stylex

StyleX is the styling system for ambitious user interfaces.
https://stylexjs.com
MIT License
8.34k stars 307 forks source link

Fix: Allow undefined within StyleXStyles and StaticStyles #428

Closed nmn closed 7 months ago

nmn commented 7 months ago

What changed / motivation ?

The typescript type definitions for StyleXStyles and StaticStyles did not accept undefined but they did accept null. This was an oversight, and has been fixed in this PR.

Linked PR/Issues

Fixes #417

Additional Context

A type test has been added to verify the fix.

github-actions[bot] commented 7 months ago

compressed-size: runtime library

Size change: 0.00 kB Total size: 2.52 kB

View unchanged | Filename: gzip (minify) | kB size | kB change | % change | | :--- | :--- | :--- | :--- | | `./packages/stylex/lib/stylex.js` | **1.04** (3.22) | **0.00** (0.00) | **0.0%** (0.0%) | | `./packages/stylex/lib/StyleXSheet.js` | **1.48** (3.75) | **0.00** (0.00) | **0.0%** (0.0%) |
github-actions[bot] commented 7 months ago

compressed-size: e2e bundles

Size change: 0.00 kB Total size: 1128.55 kB

View unchanged | Filename: gzip (minify) | kB size | kB change | % change | | :--- | :--- | :--- | :--- | | `./apps/rollup-example/.build/bundle.js` | **1005.20** (10185.36) | **0.00** (0.00) | **0.0%** (0.0%) | | `./apps/rollup-example/.build/stylex.css` | **123.34** (773.82) | **0.00** (0.00) | **0.0%** (0.0%) |