AsyncCallable.fromSignature constructor

AsyncCallable.fromSignature(
  1. String signature,
  2. FutureOr<Value> callback(
    1. List<Value> arguments
    ), {
  3. bool requireParens = true,
})

Creates a callable with a single signature and a single callback.

Throws a SassFormatException if parsing fails.

Implementation

factory AsyncCallable.fromSignature(
    String signature, FutureOr<Value> callback(List<Value> arguments),
    {bool requireParens = true}) {
  var (name, declaration) =
      parseSignature(signature, requireParens: requireParens);
  return AsyncBuiltInCallable.parsed(name, declaration, callback);
}