Skip to content

Commit 8480259

Browse files
committed
Avoid using private types in public APIs
1 parent a705445 commit 8480259

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

lib/src/callable.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import 'exception.dart';
1010
import 'value.dart';
1111

1212
export 'callable/async.dart';
13-
export 'callable/async_built_in.dart';
14-
export 'callable/built_in.dart';
13+
export 'callable/async_built_in.dart' show AsyncBuiltInCallable;
14+
export 'callable/built_in.dart' show BuiltInCallable;
1515
export 'callable/plain_css.dart';
1616
export 'callable/user_defined.dart';
1717

lib/src/callable/async_built_in.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import '../value.dart';
1111
import 'async.dart';
1212

1313
/// An [AsyncBuiltInCallable]'s callback.
14-
typedef _Callback = FutureOr<Value> Function(List<Value> arguments);
14+
typedef Callback = FutureOr<Value> Function(List<Value> arguments);
1515

1616
/// A callable defined in Dart code.
1717
///
@@ -26,7 +26,7 @@ class AsyncBuiltInCallable implements AsyncCallable {
2626
final ArgumentDeclaration _arguments;
2727

2828
/// The callback to run when executing this callable.
29-
final _Callback _callback;
29+
final Callback _callback;
3030

3131
/// Creates a function with a single [arguments] declaration and a single
3232
/// [callback].
@@ -76,7 +76,7 @@ class AsyncBuiltInCallable implements AsyncCallable {
7676
/// If no exact match is found, finds the closest approximation. Note that this
7777
/// doesn't guarantee that [positional] and [names] are valid for the returned
7878
/// [ArgumentDeclaration].
79-
Tuple2<ArgumentDeclaration, _Callback> callbackFor(
79+
Tuple2<ArgumentDeclaration, Callback> callbackFor(
8080
int positional, Set<String> names) =>
8181
Tuple2(_arguments, _callback);
8282
}

lib/src/callable/built_in.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import '../ast/sass.dart';
88
import '../callable.dart';
99
import '../value.dart';
1010

11-
typedef _Callback = Value Function(List<Value> arguments);
11+
typedef Callback = Value Function(List<Value> arguments);
1212

1313
/// A callable defined in Dart code.
1414
///
@@ -20,7 +20,7 @@ class BuiltInCallable implements Callable, AsyncBuiltInCallable {
2020
final String name;
2121

2222
/// The overloads declared for this callable.
23-
final List<Tuple2<ArgumentDeclaration, _Callback>> _overloads;
23+
final List<Tuple2<ArgumentDeclaration, Callback>> _overloads;
2424

2525
/// Creates a function with a single [arguments] declaration and a single
2626
/// [callback].
@@ -73,7 +73,7 @@ class BuiltInCallable implements Callable, AsyncBuiltInCallable {
7373
/// If passed, [url] is the URL of the module in which the function is
7474
/// defined.
7575
BuiltInCallable.overloadedFunction(
76-
this.name, Map<String, _Callback> overloads,
76+
this.name, Map<String, Callback> overloads,
7777
{Object? url})
7878
: _overloads = [
7979
for (var entry in overloads.entries)
@@ -91,9 +91,9 @@ class BuiltInCallable implements Callable, AsyncBuiltInCallable {
9191
/// If no exact match is found, finds the closest approximation. Note that this
9292
/// doesn't guarantee that [positional] and [names] are valid for the returned
9393
/// [ArgumentDeclaration].
94-
Tuple2<ArgumentDeclaration, _Callback> callbackFor(
94+
Tuple2<ArgumentDeclaration, Callback> callbackFor(
9595
int positional, Set<String> names) {
96-
Tuple2<ArgumentDeclaration, _Callback>? fuzzyMatch;
96+
Tuple2<ArgumentDeclaration, Callback>? fuzzyMatch;
9797
int? minMismatchDistance;
9898

9999
for (var overload in _overloads) {

0 commit comments

Comments
 (0)