onCall method

JSFunction onCall(
  1. JSObject optsOrHandler, [
  2. JSFunction handler
])

Declares a callable method for clients to call using a Firebase SDK. @param opts - Options to set on this function. @param handler - A function that takes a {@link https.CallableRequest}. @returns A function that you can export and deploy.

Implementation

external JSFunction onCall(
  JSObject optsOrHandler, [
  // (CallableRequest request) => FutureOr<dynamic>
  JSFunction handler,
]);