@@ -6,23 +6,22 @@ import { empty } from './utils.js';
66/** @typedef {unknown } Value */
77/** @typedef {Node | Element | PersistentFragment } Target */
88/** @typedef {null | undefined | string | number | boolean | Node | Element | PersistentFragment } DOMValue */
9+ /** @typedef {Hole | Node } ArrayValue */
910
1011export const abc = ( a , b , c ) => ( { a, b, c } ) ;
1112
13+ export const bc = ( b , c ) => ( { b, c } ) ;
14+
1215/**
1316 * @typedef {Object } Detail
1417 * @property {any } v the current value of the interpolation / hole
1518 * @property {function } u the callback to update the value
1619 * @property {Node } t the target comment node or element
17- * @property {string | null } n the attribute name, if any, or `null`
18- * @param {Cache | Hole[] | Node [] | null } c the cache value for this detail
20+ * @property {string | null | Node } n the attribute name, if any, or `null`
21+ * @property {Cache | ArrayValue [] | null } c the cache value for this detail
1922 */
2023
2124/**
22- * @param {function } u the callback to update the value
23- * @param {Node } t the target comment node or element
24- * @param {string | null } n the attribute name, if any, or `null`
25- * @param {Cache | null } c the cache value for this detail
2625 * @returns {Detail }
2726 */
2827export const detail = ( u , t , n , c ) => ( { v : empty , u, t, n, c } ) ;
@@ -36,19 +35,12 @@ export const detail = (u, t, n, c) => ({ v: empty, u, t, n, c });
3635
3736/**
3837 * @typedef {Object } Cache
39- * @property {null | TemplateStringsArray } t the cached template
40- * @property {null | Node | PersistentFragment } n the node returned when parsing the template
41- * @property {Detail[] } d the list of updates to perform
42- * @property {Cache[] } s the stack of caches per each interpolation / hole
38+ * @property {null | TemplateStringsArray } a the cached template
39+ * @property {null | Node | PersistentFragment } b the node returned when parsing the template
40+ * @property {Detail[] } c the list of updates to perform
4341 */
4442
4543/**
4644 * @returns {Cache }
4745 */
4846export const cache = ( ) => abc ( null , null , empty ) ;
49-
50- /**
51- * @typedef {Object } Parsed
52- * @property {Node | PersistentFragment } n the returned node after parsing the template
53- * @property {Detail[] } d the list of details to update the node
54- */
0 commit comments