diff --git a/packages/svelte/src/internal/server/payload.js b/packages/svelte/src/internal/server/payload.js index 1df83e0114..cf96ebda3c 100644 --- a/packages/svelte/src/internal/server/payload.js +++ b/packages/svelte/src/internal/server/payload.js @@ -362,43 +362,26 @@ export class Payload { } export class TreeState { - /** @type {() => string} */ - #uid; - - /** @type {Set<{ hash: string; code: string }>} */ - #css; + /** @readonly @type {'sync' | 'async'} */ + mode; - /** @type {TreeHeadState} */ - #head; + /** @readonly @type {() => string} */ + uid; - /** @type {'sync' | 'async'} */ - #mode; + /** @readonly @type {TreeHeadState} */ + head; - get css() { - return this.#css; - } - - get uid() { - return this.#uid; - } - - get head() { - return this.#head; - } - - get mode() { - return this.#mode; - } + /** @readonly @type {Set<{ hash: string; code: string }>} */ + css = new Set(); /** * @param {'sync' | 'async'} mode * @param {string} [id_prefix] */ constructor(mode, id_prefix = '') { - this.#uid = props_id_generator(id_prefix); - this.#css = new Set(); - this.#head = new TreeHeadState(this.#uid); - this.#mode = mode; + this.mode = mode; + this.uid = props_id_generator(id_prefix); + this.head = new TreeHeadState(this.uid); } }