constructor()

in workbox-v4.3.1/workbox-cacheable-response.dev.js [40:71]


    constructor(config = {}) {
      {
        if (!(config.statuses || config.headers)) {
          throw new WorkboxError_mjs.WorkboxError('statuses-or-headers-required', {
            moduleName: 'workbox-cacheable-response',
            className: 'CacheableResponse',
            funcName: 'constructor'
          });
        }

        if (config.statuses) {
          assert_mjs.assert.isArray(config.statuses, {
            moduleName: 'workbox-cacheable-response',
            className: 'CacheableResponse',
            funcName: 'constructor',
            paramName: 'config.statuses'
          });
        }

        if (config.headers) {
          assert_mjs.assert.isType(config.headers, 'object', {
            moduleName: 'workbox-cacheable-response',
            className: 'CacheableResponse',
            funcName: 'constructor',
            paramName: 'config.headers'
          });
        }
      }

      this._statuses = config.statuses;
      this._headers = config.headers;
    }