File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,20 +28,23 @@ class PubLicenseException implements Exception {
2828 final String message;
2929}
3030
31+ /// The function signature for parsing HTML documents.
32+ @visibleForTesting
33+ typedef HtmlDocumentParse = html_dom.Document Function (
34+ dynamic input, {
35+ String ? encoding,
36+ bool generateSpans,
37+ String ? sourceUrl,
38+ });
39+
3140/// {@template pub_license}
3241/// Enables checking pub.dev's hosted packages license.
3342/// {@endtemplate}
3443class PubLicense {
3544 /// {@macro pub_license}
3645 PubLicense ({
3746 @visibleForTesting http.Client ? client,
38- @visibleForTesting
39- html_dom.Document Function (
40- dynamic input, {
41- String ? encoding,
42- bool generateSpans,
43- String ? sourceUrl,
44- })? parse,
47+ @visibleForTesting HtmlDocumentParse ? parse,
4548 }) : _client = client ?? http.Client (),
4649 _parse = parse ?? html_parser.parse;
4750
You can’t perform that action at this time.
0 commit comments