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; });