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
If we have a stencil like the following:
const stencil = createStencil({
vars: {
var1: ''
},
base: ({var1}) => ({
// base styles here including usage of var1
}),
modifiers: {
modifier1: {
true: ({var1}) => ({
// any other applicable constant options for the modifier would be present here
backgroundColor: var1
})
},
modifier2: {
true: {
// modifier2 styles here
}
}
},
compound: [
{
modifiers: {modifier1: 'true', modifier2: 'true'},
styles: {
// compound modifier styles
}
}
]
});
We get type errors in the compound section: TS2322: Type string is not assignable to type boolean | undefined. The expected type comes from property modifier1 which is declared here on type...
Additionally, when using the stencil, we see TS2322: Type boolean is not assignable to type string.
It is functionally working fine, it's just a typing issue.
To Reproduce
An example stencil can be set up like the above
Expected Behavior
There should not be type errors in this scenario
Actual Results
TS gives errors in the stencil definition as well as when trying to use it
Browser (if applicable)
N/A
The text was updated successfully, but these errors were encountered:
🐛 Bug Report
If we have a stencil like the following:
const stencil = createStencil({
vars: {
var1: ''
},
base: ({var1}) => ({
// base styles here including usage of var1
}),
modifiers: {
modifier1: {
true: ({var1}) => ({
// any other applicable constant options for the modifier would be present here
backgroundColor: var1
})
},
modifier2: {
true: {
// modifier2 styles here
}
}
},
compound: [
{
modifiers: {modifier1: 'true', modifier2: 'true'},
styles: {
// compound modifier styles
}
}
]
});
We get type errors in the compound section: TS2322: Type string is not assignable to type boolean | undefined. The expected type comes from property modifier1 which is declared here on type...
Additionally, when using the stencil, we see TS2322: Type boolean is not assignable to type string.
It is functionally working fine, it's just a typing issue.
To Reproduce
An example stencil can be set up like the above
Expected Behavior
There should not be type errors in this scenario
Actual Results
TS gives errors in the stencil definition as well as when trying to use it
Browser (if applicable)
N/A
The text was updated successfully, but these errors were encountered: