Handle is invoke method of Middleware. Result is the data to be processed. GatherCallback is a callback for processing. GatherCallback accepts Result | undefined.
handle是Middleware类被调用时使用的方法, result为待处理Result类型, 如果传入值为string类型, 会自动转为["undefined", string] GatherCallback为处理完毕时的回调
The next method accepts a Middleware class or Finisher class type to specify the next step after data processing.
next方法接受一个Middleware类或Finisher类类型以指定数据处理后下一步操作
Reverse(extends Filter) exchanges index and value.
Reverse是一个会交换index与value的Filter
new Reverse().next(Gather).handle( ["a", "b"], (result) => console.log(result), ); // ["b", "a"]