-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
Design LimitationConstraints of the existing architecture prevent this from being fixedConstraints of the existing architecture prevent this from being fixed
Description
TypeScript Version: Nightly today
Code
type CSSPropertyMap = {
color?: string
}
type NestedCSSProperties = {
nested?: {
[selector:string]: CSSProperties
}
}
type CSSProperties = CSSPropertyMap & NestedCSSProperties;
let style: CSSProperties;
// ok
style = {
color: 'red'
}
// ok
style = {
nested: {
'&:hover': {
color: 'red'
}
}
}
// does error
style = {
colour: 'red'
}
// should error but doesn't
style = {
nested: {
'&:hover': {
colour: 'red'
}
}
}
Expected behavior:
Error
Actual behavior:
Does not error
Thanks 🌹
Metadata
Metadata
Assignees
Labels
Design LimitationConstraints of the existing architecture prevent this from being fixedConstraints of the existing architecture prevent this from being fixed