This commit is contained in:
hai-x 2025-09-08 19:58:12 +08:00 committed by GitHub
parent 407de36dfb
commit 6529f8c789
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 5 deletions

View File

@ -53,10 +53,15 @@ class PackContainer {
) { ) {
/** @type {Pack | (() => Pack) } */ /** @type {Pack | (() => Pack) } */
this.data = data; this.data = data;
/** @type {string} */
this.version = version; this.version = version;
/** @type {Snapshot} */
this.buildSnapshot = buildSnapshot; this.buildSnapshot = buildSnapshot;
/** @type {BuildDependencies} */
this.buildDependencies = buildDependencies; this.buildDependencies = buildDependencies;
/** @type {ResolveResults} */
this.resolveResults = resolveResults; this.resolveResults = resolveResults;
/** @type {Snapshot} */
this.resolveBuildDependenciesSnapshot = resolveBuildDependenciesSnapshot; this.resolveBuildDependenciesSnapshot = resolveBuildDependenciesSnapshot;
} }
@ -105,10 +110,15 @@ class PackItemInfo {
* @param {Data} value fresh value of item * @param {Data} value fresh value of item
*/ */
constructor(identifier, etag, value) { constructor(identifier, etag, value) {
/** @type {string} */
this.identifier = identifier; this.identifier = identifier;
/** @type {string | null | undefined} */
this.etag = etag; this.etag = etag;
/** @type {number} */
this.location = -1; this.location = -1;
/** @type {number} */
this.lastAccess = Date.now(); this.lastAccess = Date.now();
/** @type {Data} */
this.freshValue = value; this.freshValue = value;
} }
} }

View File

@ -96,7 +96,6 @@ class SerializerMiddleware {
* @template TLazyOutputValue * @template TLazyOutputValue
* @template {LazyTarget} TLazyTarget * @template {LazyTarget} TLazyTarget
* @template {Record<string, EXPECTED_ANY>} TLazyOptions * @template {Record<string, EXPECTED_ANY>} TLazyOptions
* @template TLazySerializedValue
* @param {LazyFunction<TLazyInputValue, TLazyOutputValue, TLazyTarget, TLazyOptions>} fn lazy function * @param {LazyFunction<TLazyInputValue, TLazyOutputValue, TLazyTarget, TLazyOptions>} fn lazy function
* @returns {LazyOptions | undefined} options * @returns {LazyOptions | undefined} options
*/ */
@ -123,7 +122,7 @@ class SerializerMiddleware {
* @template TLazyOutputValue * @template TLazyOutputValue
* @template {LazyTarget} TLazyTarget * @template {LazyTarget} TLazyTarget
* @template {LazyOptions} TLazyOptions * @template {LazyOptions} TLazyOptions
* @param {LazyFunction<TLazyInputValue, TLazyOutputValue, LazyTarget, LazyOptions>} fn lazy function * @param {LazyFunction<TLazyInputValue, TLazyOutputValue, TLazyTarget, TLazyOptions>} fn lazy function
* @param {TLazyOutputValue} value serialized value * @param {TLazyOutputValue} value serialized value
* @returns {void} * @returns {void}
*/ */
@ -168,7 +167,6 @@ class SerializerMiddleware {
/** /**
* @template TLazyInputValue SerializedValue * @template TLazyInputValue SerializedValue
* @template TLazyOutputValue DeserializedValue * @template TLazyOutputValue DeserializedValue
* @template SerializedValue
* @template {LazyTarget} TLazyTarget * @template {LazyTarget} TLazyTarget
* @template {LazyOptions | undefined} TLazyOptions * @template {LazyOptions | undefined} TLazyOptions
* @param {LazyFunction<TLazyInputValue, TLazyOutputValue, TLazyTarget, TLazyOptions>} lazy lazy function * @param {LazyFunction<TLazyInputValue, TLazyOutputValue, TLazyTarget, TLazyOptions>} lazy lazy function

View File

@ -5,8 +5,6 @@
"use strict"; "use strict";
new Map().entries();
/** /**
* The StackedCacheMap is a data structure designed as an alternative to a Map * The StackedCacheMap is a data structure designed as an alternative to a Map
* in situations where you need to handle multiple item additions and * in situations where you need to handle multiple item additions and