MCPcopy Create free account
hub / github.com/ampproject/amphtml / constructor

Method constructor

third_party/subscriptions-project/swg.js:2395–2409  ·  view source on GitHub ↗

* @param {!Array<*>=} data * @param {boolean=} includesLabel

(data = [], includesLabel = true)

Source from the content-addressed store, hash-verified

2393 * @param {boolean=} includesLabel
2394 */
2395 constructor(data = [], includesLabel = true) {
2396 const base = includesLabel ? 1 : 0;
2397
2398 /** @private {?number} */
2399 this.questionId_ = data[base] == null ? null : data[base];
2400
2401 /** @private {?string} */
2402 this.questionText_ = data[1 + base] == null ? null : data[1 + base];
2403
2404 /** @private {?string} */
2405 this.questionCategory_ = data[2 + base] == null ? null : data[2 + base];
2406
2407 /** @private {!Array<!SurveyAnswer>} */
2408 this.surveyAnswers_ = (data[3 + base] || []).map(item => new SurveyAnswer(item, includesLabel));
2409 }
2410
2411 /**
2412 * @return {?number}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected