see : #1922
I agree with the change and I think it is needed to change the types so that nodes can be undefined for at rule statements (e.g. @import, @layer, ...)
But I wonder if a more refined change is possible.
This change is very breaking for us, but not for our users.
Only our own dev flow is affected.
Consider this code :
const parent = node.parent;
if (!parent) {
return false;
}
const siblings = parent.nodes;
const firstSibling = siblings[0]; // errors after `3.4.34`
Here I would assume that nodes is known to be not undefined given that I did node -> parent -> parent.nodes.