Skip to content

Commit a70fe88

Browse files
Make extra filterNode args optional
1 parent c33a96d commit a70fe88

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/src/dom/pretty_dom.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ String prettyDOM(
6666
if (min != null) options.min = min;
6767
if (filterNode != null) {
6868
// Convert from one arg to three args to work around typing issue in https://github.com/testing-library/dom-testing-library/issues/1360
69-
final jsFilterNode = (Node n, _, __) => filterNode(n);
69+
final jsFilterNode = (Node n, [_, __]) => filterNode(n);
7070

7171
options.filterNode = allowInterop(jsFilterNode);
7272
}
@@ -113,6 +113,6 @@ class PrettyDomOptions {
113113
/// You can configure this behavior by passing a custom `filterNode` function that should return true for every
114114
/// node that you wish to include in the output.
115115
/// {@endtemplate}
116-
external bool Function(Node, dynamic, dynamic)? get filterNode;
117-
external set filterNode(bool Function(Node, dynamic, dynamic)? value);
116+
external bool Function(Node, [dynamic, dynamic])? get filterNode;
117+
external set filterNode(bool Function(Node, [dynamic, dynamic])? value);
118118
}

0 commit comments

Comments
 (0)