message: ref(core): Extract _ensureBeforeSendRv into func
  Extract out protected method `_ensureBeforeSendRv` from `baseclient` as it doesn't use any class props - this helps save a small amount of bundle size.
diff: @@ -562,7 +562,7 @@ export abstract class BaseClient<B extends Backend, O extends Options> implement
  }
  const beforeSendResult = beforeSend(prepared, hint);
  - return this._ensureBeforeSendRv(beforeSendResult);
  + return _ensureBeforeSendRv(beforeSendResult);
  })
  .then(processedEvent => {
  if (processedEvent === null) {
  @@ -611,16 +611,15 @@ export abstract class BaseClient<B extends Backend, O extends Options> implement
  },
  );
  }
  +}
  /**
  * Verifies that return value of configured `beforeSend` is of expected type.
  */
  - protected _ensureBeforeSendRv(
  - rv: PromiseLike<Event | null> | Event | null,
  - ): PromiseLike<Event | null> | Event | null {
  +function _ensureBeforeSendRv(rv: PromiseLike<Event | null> | Event | null): PromiseLike<Event | null> | Event | null {
  const nullErr = '`beforeSend` method has to return `null` or a valid event.';
  if (isThenable(rv)) {
  - return (rv as PromiseLike<Event | null>).then(
  + return rv.then(
  event => {
  if (!(isPlainObject(event) || event === null)) {
  throw new SentryError(nullErr);
  @@ -636,4 +635,3 @@ export abstract class BaseClient<B extends Backend, O extends Options> implement
  }
  return rv;
  }
  -}
  