pull/16748/head
Rich Harris 5 days ago
parent 708fca660c
commit db4a1c0f83

@ -386,28 +386,21 @@ export class TreeState {
}
export class TreeHeadState {
/** @type {Set<{ hash: string; code: string }>} */
#css = new Set();
/** @readonly @type {Set<{ hash: string; code: string }>} */
css = new Set();
/** @type {() => string} */
#uid = () => '';
/** @readonly @type {() => string} */
uid = () => '';
/**
* @type {{ path: number[], value: string }}
*/
#title = { path: [], value: '' };
get css() {
return this.#css;
}
get uid() {
return this.#uid;
}
get title() {
return this.#title;
}
set title(value) {
// perform a depth-first (lexicographic) comparison using the path. Reject sets
// from earlier than or equal to the current value.
@ -437,8 +430,7 @@ export class TreeHeadState {
* @param {() => string} uid
*/
constructor(uid) {
this.#uid = uid;
this.#css = new Set();
this.uid = uid;
this.#title = { path: [], value: '' };
}
}

Loading…
Cancel
Save