File tree Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @vanilla-extract/css ' : patch
3+ ---
4+
5+ Fix type errors with nested null values in theme contracts
Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ export interface Adapter {
111111}
112112
113113export type NullableTokens = {
114- [ key : string ] : string | Tokens | null ;
114+ [ key : string ] : string | NullableTokens | null ;
115115} ;
116116
117117export type Tokens = {
Original file line number Diff line number Diff line change @@ -6,15 +6,25 @@ import {
66
77const vars = createThemeContract ( {
88 shouldSupportNull : null ,
9+ shouldSupportNestedNull : {
10+ nested : null ,
11+ } ,
912 shouldSupportString : '' ,
13+ shouldSupportNestedString : {
14+ nested : '' ,
15+ } ,
1016} ) ;
1117
1218createGlobalTheme ( ':root' , vars , {
1319 shouldSupportNull : 'some-value' ,
20+ shouldSupportNestedNull : { nested : 'some-value' } ,
1421 shouldSupportString : 'some-value' ,
22+ shouldSupportNestedString : { nested : 'some-value' } ,
1523} ) ;
1624
1725createTheme ( vars , {
1826 shouldSupportNull : 'some-value' ,
27+ shouldSupportNestedNull : { nested : 'some-value' } ,
1928 shouldSupportString : 'some-value' ,
29+ shouldSupportNestedString : { nested : 'some-value' } ,
2030} ) ;
You can’t perform that action at this time.
0 commit comments