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

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

Loading…
Cancel
Save