description

# callMethod<R extends JSAny?> method

R callMethod<R extends JSAny?>(

1. JSAny method, [
2. JSAny? arg1,
3. JSAny? arg2,
4. JSAny? arg3,
5. JSAny? arg4,

])

Calls `method` on this JSObject with up to four arguments.

Returns the result of calling `method`, which must be an `R`.

This helper doesn't allow passing nulls, as it determines whether an argument is passed based on whether it was null or not. Prefer callMethodVarArgs if you need to pass nulls.

## Implementation

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