Skip to content

Commit

Permalink
fix closure typing with Polymer.html function
Browse files Browse the repository at this point in the history
  • Loading branch information
dfreedm committed Dec 8, 2017
1 parent da46204 commit c519796
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/utils/html-tag.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,13 @@
* static get partialTemplate() { return Polymer.html`<span>Partial!</span>`; }
*
* @memberof Polymer
* @param {!Array<string>} strings Constant parts of tagged template literal
* @param {ITemplateArray} strings Constant parts of tagged template literal
* @param {...*} values Variable parts of tagged template literal
* @return {!HTMLTemplateElement} Constructed HTMLTemplateElement
*/
Polymer.html = function html(strings, ...values) {
// use raw strings to preserve literal escapes in strings
/** @type {!Array<string>} */
const rawStrings = strings.raw;
const template = /** @type {!HTMLTemplateElement} */(document.createElement('template'));
template.innerHTML = values.reduce((acc, v, idx) =>
Expand Down
2 changes: 1 addition & 1 deletion polymer.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<!-- bc behaviors -->
<link rel="import" href="lib/legacy/mutable-data-behavior.html">
<!-- import html-tag to export html -->
<link rel="import" href="lib/util/html-tag.html">
<link rel="import" href="lib/utils/html-tag.html">
<script>
// bc
Polymer.Base = Polymer.LegacyElementMixin(HTMLElement).prototype;
Expand Down

0 comments on commit c519796

Please sign in to comment.