Report: add stub for NodeDetails renderer (#2226)

This commit is contained in:
Paul Irish 2017-05-11 10:02:10 -07:00 коммит произвёл GitHub
Родитель b880393534
Коммит 26ea16f8d0
1 изменённых файлов: 22 добавлений и 0 удалений

Просмотреть файл

@ -44,6 +44,8 @@ class DetailsRenderer {
return this._renderTable(/** @type {!DetailsRenderer.TableDetailsJSON} */ (details));
case 'code':
return this._renderCode(details);
case 'node':
return this.renderNode(/** @type {!DetailsRenderer.NodeDetailsJSON} */(details));
case 'list':
return this._renderList(/** @type {!DetailsRenderer.ListDetailsJSON} */ (details));
default:
@ -143,6 +145,15 @@ class DetailsRenderer {
return element;
}
/**
* @param {!DetailsRenderer.NodeDetailsJSON} item
* @return {!Element}
* @protected
*/
renderNode(item) {
throw new Error('Not yet implemented', item);
}
/**
* @param {!DetailsRenderer.CardsDetailsJSON} details
* @return {!Element}
@ -224,6 +235,17 @@ DetailsRenderer.CardsDetailsJSON; // eslint-disable-line no-unused-expressions
*/
DetailsRenderer.TableHeaderJSON; // eslint-disable-line no-unused-expressions
/**
* @typedef {{
* type: string,
* text: (string|undefined),
* path: (string|undefined),
* selector: (string|undefined),
* snippet:(string|undefined)
* }}
*/
DetailsRenderer.NodeDetailsJSON; // eslint-disable-line no-unused-expressions
/** @typedef {{
* type: string,
* header: ({text: string}|undefined),