callMethod<T extends JSAny?> method

T callMethod<T extends JSAny?>(
  1. JSAny method,
  2. [JSAny? arg1,
  3. JSAny? arg2,
  4. JSAny? arg3,
  5. JSAny? arg4]
)

Calls a method on this JSObject with up to four arguments and returns the result.

TODO(srujzs): This helper doesn't allow passing nulls, as we use null as our sentinel to determine if an argument is passed.

Implementation

T callMethod<T extends JSAny?>(JSAny method,
        [JSAny? arg1, JSAny? arg2, JSAny? arg3, JSAny? arg4]) =>
    _callMethod(method, arg1, arg2, arg3, arg4) as T;