@@ -7,46 +7,32 @@ import { empty } from './utils.js';
77/** @typedef {Node | Element | PersistentFragment } Target */
88/** @typedef {null | undefined | string | number | boolean | Node | Element | PersistentFragment } DOMValue */
99
10- /**
11- * @param {DocumentFragment } f content retrieved from the template
12- * @param {Entry[] } e entries per each hole in the template
13- * @param {boolean } d direct node to handle
14- * @returns
15- */
16- export const cel = ( f , e , d ) => ( { f, e, d } ) ;
10+ export const abc = ( a , b , c ) => ( { a, b, c } ) ;
1711
1812/**
1913 * @typedef {Object } Detail
2014 * @property {any } v the current value of the interpolation / hole
2115 * @property {function } u the callback to update the value
2216 * @property {Node } t the target comment node or element
2317 * @property {string | null } n the attribute name, if any, or `null`
18+ * @param {Cache | Hole[] | Node[] | null } c the cache value for this detail
2419 */
2520
2621/**
27- * @param {any } v the current value of the interpolation / hole
2822 * @param {function } u the callback to update the value
2923 * @param {Node } t the target comment node or element
3024 * @param {string | null } n the attribute name, if any, or `null`
3125 * @param {Cache | null } c the cache value for this detail
3226 * @returns {Detail }
3327 */
34- export const detail = ( v , u , t , n , c ) => ( { v, u, t, n, c } ) ;
28+ export const detail = ( u , t , n , c ) => ( { v : empty , u, t, n, c } ) ;
3529
3630/**
3731 * @typedef {Object } Entry
38- * @property {number[] } p the path to retrieve the node
39- * @property {function } u the update function
40- * @property {string | null } n the attribute name, if any, or `null`
41- */
42-
43- /**
44- * @param {number[] } p the path to retrieve the node
45- * @param {function } u the update function
46- * @param {string | null } n the attribute name, if any, or `null`
47- * @returns {Entry }
32+ * @property {number[] } a the path to retrieve the node
33+ * @property {function } b the update function
34+ * @property {string | null } c the attribute name, if any, or `null`
4835 */
49- export const entry = ( p , u , n ) => ( { p, u, n } ) ;
5036
5137/**
5238 * @typedef {Object } Cache
@@ -59,16 +45,7 @@ export const entry = (p, u, n) => ({ p, u, n });
5945/**
6046 * @returns {Cache }
6147 */
62- export const cache = ( ) => resolved ( null , null , empty , empty ) ;
63-
64- /**
65- * @property {null | TemplateStringsArray } t the cached template
66- * @property {null | Node | PersistentFragment } n the node returned when parsing the template
67- * @property {Detail[] } d the list of updates to perform
68- * @property {Cache[] } s the stack of caches per each interpolation / hole
69- * @returns {Cache }
70- */
71- export const resolved = ( t , n , d , s ) => ( { t, n, d, s } ) ;
48+ export const cache = ( ) => abc ( null , null , empty ) ;
7249
7350/**
7451 * @typedef {Object } Parsed
0 commit comments