From ffaf6bd5c81a521d76ee0507c524bfa9e3c20c17 Mon Sep 17 00:00:00 2001 From: otomad <56647156+otomad@users.noreply.github.com> Date: Mon, 10 Aug 2026 03:56:08 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#75368=20[postcss-m?= =?UTF-8?q?edia-query-parser]=20change=20walk=20method=20return=20type=20t?= =?UTF-8?q?o=20boolean=20by=20@otomad?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/postcss-media-query-parser/index.d.ts | 4 ++-- .../postcss-media-query-parser-tests.ts | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/types/postcss-media-query-parser/index.d.ts b/types/postcss-media-query-parser/index.d.ts index 92a5495561a32f..4f2459355ae7e6 100644 --- a/types/postcss-media-query-parser/index.d.ts +++ b/types/postcss-media-query-parser/index.d.ts @@ -9,8 +9,8 @@ export interface Node { sourceIndex: number; nodes?: Child[] | undefined; - walk(filter: string | RegExp, callback: WalkerCallback): void; - walk(callback: WalkerCallback): void; + walk(filter: string | RegExp, callback: WalkerCallback): boolean; + walk(callback: WalkerCallback): boolean; } export interface Child extends Node { diff --git a/types/postcss-media-query-parser/postcss-media-query-parser-tests.ts b/types/postcss-media-query-parser/postcss-media-query-parser-tests.ts index 71e52e311cf581..33151750b39484 100644 --- a/types/postcss-media-query-parser/postcss-media-query-parser-tests.ts +++ b/types/postcss-media-query-parser/postcss-media-query-parser-tests.ts @@ -24,9 +24,11 @@ if (result.nodes) { } } +// $ExpectType boolean result.walk("", child => { child.parent.type; }); +// $ExpectType boolean result.walk(child => { child.parent.type; });