Skip to content

Commit 8e585df

Browse files
authored
chore: fix so that TSDiff doesnt return non-existant layout changes (#10059)
differ was claiming that the layouts lost getVisibleLayoutInfos, virtualizer but that turned out to be that it wasnt processing the Layout extends properly anymore via DocsTransformer
1 parent 21fa814 commit 8e585df

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

packages/dev/parcel-transformer-docs/DocsTransformer.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,11 @@ module.exports = new Transformer({
548548
);
549549
}
550550

551-
if (path.isTSExpressionWithTypeArguments()) {
551+
// due to oxlint formatting, WaterfallLayout/other classes now are multiline declarations
552+
// the "extends Layout<Node<T>, 0>" part then ends up becoming isTSInstantiationExpressions superclass rather than just Identifier.
553+
// as a result, should be handled similar to isTSExpressionWithTypeArguments (aka Blah<T>)
554+
// see https://astexplorer.net/#/gist/451958d4b4a31868f0896664e2291a92/15ffdc9fe4097cfdb9f997f12d550fdff4761205 for verification
555+
if (path.isTSExpressionWithTypeArguments() || path.isTSInstantiationExpression()) {
552556
if (path.node.typeParameters) {
553557
return Object.assign(node, {
554558
type: 'application',

0 commit comments

Comments
 (0)