execute<T> function

T execute<T>(
  1. Function base,
  2. List<Object> args,
  3. Memory memory
)

General Library Documentation Undocument By General Corporation & Global Corporation & General Developer

Implementation

T execute<T>(Function base, List<Object> args, Memory memory) {
  if (T == DartVoidType) {
    Function.apply(base, args.map(_toJsType).toList());
    return null as T;
  } else {
    final Object? result = Function.apply(base, args.map(_toJsType).toList());
    if (result == null) {
      return null as T;
    }
    return _toDartType<T>(result, memory);
  }
}