code: function fetchSync (name, request, options) {
    if (!hasStartedInit) {
      throw new Error('initialise first with fetchSync.init()')
    }
  
    const isRequestOptionsCall = () => arguments.length === 2 &&
      (typeof arguments[0] === 'string' || arguments[0] instanceof Request) &&
      (typeof arguments[1] === 'object' && !(arguments[1] instanceof Request))
  
    if (arguments.length === 1) {
      request = name
      name = null
    } else if (isRequestOptionsCall()) {
      options = request
      request = name
      name = null
    }
  
    if (typeof request !== 'string' && !(request instanceof Request)) {
      throw new Error('expecting request to be a string or Request')
    } else if (options && typeof options !== 'object') {
      throw new Error('expecting options to be an object')
    }
  
    if (!hasBackgroundSyncSupport) {
      return fetch(request, options)
    }
  
    let sync = syncs.find((s) => s.id === name)
  
    if (sync) {
      const err = new Error(`sync operation already exists with name '${name}'`)
      return Promise.reject(err)
    }
  
    sync = syncUtil.createFromUserOptions({ name, request, options })
  
    syncs.push(sync)
  
    ready.promise
      .then(() => serialiseRequest(new Request(request, options)))
      .then((request) => { sync.request = request })
      .then(() => channel.send('REGISTER_SYNC', sync))
  
    return syncUtil.makePublicApi(sync)
  }
docs: --- Public --- 
  Create a 'sync' operation.
  @param {String|Request} [name]
  @param {Object|String|Request} request
  @param {Object} [options]
  @returns {Promise}