aboutsummaryrefslogtreecommitdiff
path: root/ext/js/templates/sandbox/template-renderer.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-11-27 14:08:39 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-11-27 14:08:39 -0500
commitc8ac0d45bfb94deabd933117ba55d365f43fb1c5 (patch)
treedb677ecc0d60f0dcc20ed1679318d8a55baa33b9 /ext/js/templates/sandbox/template-renderer.js
parent6a3dae04de68ab633da15bbc8ec6b350e38e6d2f (diff)
Updates
Diffstat (limited to 'ext/js/templates/sandbox/template-renderer.js')
-rw-r--r--ext/js/templates/sandbox/template-renderer.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/js/templates/sandbox/template-renderer.js b/ext/js/templates/sandbox/template-renderer.js
index 716e3ccc..fe240b5f 100644
--- a/ext/js/templates/sandbox/template-renderer.js
+++ b/ext/js/templates/sandbox/template-renderer.js
@@ -21,7 +21,7 @@ import {ExtensionError} from '../../core/extension-error.js';
export class TemplateRenderer {
constructor() {
- /** @type {Map<string, HandlebarsTemplateDelegate<import('anki-templates').NoteData>>} */
+ /** @type {Map<string, import('handlebars').TemplateDelegate<import('anki-templates').NoteData>>} */
this._cache = new Map();
/** @type {number} */
this._cacheMaxSize = 5;
@@ -110,14 +110,14 @@ export class TemplateRenderer {
/**
* @param {string} template
- * @returns {HandlebarsTemplateDelegate<import('anki-templates').NoteData>}
+ * @returns {import('handlebars').TemplateDelegate<import('anki-templates').NoteData>}
*/
_getTemplateInstance(template) {
const cache = this._cache;
let instance = cache.get(template);
if (typeof instance === 'undefined') {
this._updateCacheSize(this._cacheMaxSize - 1);
- instance = /** @type {HandlebarsTemplateDelegate<import('anki-templates').NoteData>} */ (Handlebars.compileAST(template));
+ instance = /** @type {import('handlebars').TemplateDelegate<import('anki-templates').NoteData>} */ (Handlebars.compileAST(template));
cache.set(template, instance);
}
@@ -125,7 +125,7 @@ export class TemplateRenderer {
}
/**
- * @param {HandlebarsTemplateDelegate<import('anki-templates').NoteData>} instance
+ * @param {import('handlebars').TemplateDelegate<import('anki-templates').NoteData>} instance
* @param {import('anki-templates').NoteData} data
* @returns {import('template-renderer').RenderResult}
*/