mirror of
https://github.com/danog/dart-sass.git
synced 2025-01-22 13:51:31 +01:00
Avoid using private types in public APIs
This commit is contained in:
parent
a705445f0d
commit
8480259d6c
@ -10,8 +10,8 @@ import 'exception.dart';
|
||||
import 'value.dart';
|
||||
|
||||
export 'callable/async.dart';
|
||||
export 'callable/async_built_in.dart';
|
||||
export 'callable/built_in.dart';
|
||||
export 'callable/async_built_in.dart' show AsyncBuiltInCallable;
|
||||
export 'callable/built_in.dart' show BuiltInCallable;
|
||||
export 'callable/plain_css.dart';
|
||||
export 'callable/user_defined.dart';
|
||||
|
||||
|
@ -11,7 +11,7 @@ import '../value.dart';
|
||||
import 'async.dart';
|
||||
|
||||
/// An [AsyncBuiltInCallable]'s callback.
|
||||
typedef _Callback = FutureOr<Value> Function(List<Value> arguments);
|
||||
typedef Callback = FutureOr<Value> Function(List<Value> arguments);
|
||||
|
||||
/// A callable defined in Dart code.
|
||||
///
|
||||
@ -26,7 +26,7 @@ class AsyncBuiltInCallable implements AsyncCallable {
|
||||
final ArgumentDeclaration _arguments;
|
||||
|
||||
/// The callback to run when executing this callable.
|
||||
final _Callback _callback;
|
||||
final Callback _callback;
|
||||
|
||||
/// Creates a function with a single [arguments] declaration and a single
|
||||
/// [callback].
|
||||
@ -76,7 +76,7 @@ class AsyncBuiltInCallable implements AsyncCallable {
|
||||
/// If no exact match is found, finds the closest approximation. Note that this
|
||||
/// doesn't guarantee that [positional] and [names] are valid for the returned
|
||||
/// [ArgumentDeclaration].
|
||||
Tuple2<ArgumentDeclaration, _Callback> callbackFor(
|
||||
Tuple2<ArgumentDeclaration, Callback> callbackFor(
|
||||
int positional, Set<String> names) =>
|
||||
Tuple2(_arguments, _callback);
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ import '../ast/sass.dart';
|
||||
import '../callable.dart';
|
||||
import '../value.dart';
|
||||
|
||||
typedef _Callback = Value Function(List<Value> arguments);
|
||||
typedef Callback = Value Function(List<Value> arguments);
|
||||
|
||||
/// A callable defined in Dart code.
|
||||
///
|
||||
@ -20,7 +20,7 @@ class BuiltInCallable implements Callable, AsyncBuiltInCallable {
|
||||
final String name;
|
||||
|
||||
/// The overloads declared for this callable.
|
||||
final List<Tuple2<ArgumentDeclaration, _Callback>> _overloads;
|
||||
final List<Tuple2<ArgumentDeclaration, Callback>> _overloads;
|
||||
|
||||
/// Creates a function with a single [arguments] declaration and a single
|
||||
/// [callback].
|
||||
@ -73,7 +73,7 @@ class BuiltInCallable implements Callable, AsyncBuiltInCallable {
|
||||
/// If passed, [url] is the URL of the module in which the function is
|
||||
/// defined.
|
||||
BuiltInCallable.overloadedFunction(
|
||||
this.name, Map<String, _Callback> overloads,
|
||||
this.name, Map<String, Callback> overloads,
|
||||
{Object? url})
|
||||
: _overloads = [
|
||||
for (var entry in overloads.entries)
|
||||
@ -91,9 +91,9 @@ class BuiltInCallable implements Callable, AsyncBuiltInCallable {
|
||||
/// If no exact match is found, finds the closest approximation. Note that this
|
||||
/// doesn't guarantee that [positional] and [names] are valid for the returned
|
||||
/// [ArgumentDeclaration].
|
||||
Tuple2<ArgumentDeclaration, _Callback> callbackFor(
|
||||
Tuple2<ArgumentDeclaration, Callback> callbackFor(
|
||||
int positional, Set<String> names) {
|
||||
Tuple2<ArgumentDeclaration, _Callback>? fuzzyMatch;
|
||||
Tuple2<ArgumentDeclaration, Callback>? fuzzyMatch;
|
||||
int? minMismatchDistance;
|
||||
|
||||
for (var overload in _overloads) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user