Skip to content

Typings change in 3.4.34 breaks our dev flow for almost all our plugins #1923

@romainmenke

Description

@romainmenke

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions