77*/
88
99import { assert } from 'workbox-core/_private/assert.js' ;
10- import '../_version.js' ;
1110import {
1211 UnidentifiedQueueStoreEntry ,
1312 QueueStoreEntry ,
1413 QueueDb ,
1514} from './QueueDb.js' ;
15+ import '../_version.js' ;
1616
1717/**
1818 * A class to manage storing requests from a Queue in IndexedDB,
1919 * indexed by their queue name for easier access.
2020 *
21- * @private
21+ * Most developers will not need to access this class directly;
22+ * it is exposed for advanced use cases.
2223 */
2324export class QueueStore {
2425 private readonly _queueName : string ;
@@ -29,7 +30,6 @@ export class QueueStore {
2930 * identified by their queue name.
3031 *
3132 * @param {string } queueName
32- * @private
3333 */
3434 constructor ( queueName : string ) {
3535 this . _queueName = queueName ;
@@ -43,7 +43,6 @@ export class QueueStore {
4343 * @param {Object } entry.requestData
4444 * @param {number } [entry.timestamp]
4545 * @param {Object } [entry.metadata]
46- * @private
4746 */
4847 async pushEntry ( entry : UnidentifiedQueueStoreEntry ) : Promise < void > {
4948 if ( process . env . NODE_ENV !== 'production' ) {
@@ -75,7 +74,6 @@ export class QueueStore {
7574 * @param {Object } entry.requestData
7675 * @param {number } [entry.timestamp]
7776 * @param {Object } [entry.metadata]
78- * @private
7977 */
8078 async unshiftEntry ( entry : UnidentifiedQueueStoreEntry ) : Promise < void > {
8179 if ( process . env . NODE_ENV !== 'production' ) {
@@ -111,7 +109,6 @@ export class QueueStore {
111109 * Removes and returns the last entry in the queue matching the `queueName`.
112110 *
113111 * @return {Promise<QueueStoreEntry|undefined> }
114- * @private
115112 */
116113 async popEntry ( ) : Promise < QueueStoreEntry | undefined > {
117114 return this . _removeEntry (
@@ -123,7 +120,6 @@ export class QueueStore {
123120 * Removes and returns the first entry in the queue matching the `queueName`.
124121 *
125122 * @return {Promise<QueueStoreEntry|undefined> }
126- * @private
127123 */
128124 async shiftEntry ( ) : Promise < QueueStoreEntry | undefined > {
129125 return this . _removeEntry (
@@ -136,7 +132,6 @@ export class QueueStore {
136132 *
137133 * @param {Object } options See {@link module:workbox-background-sync.Queue~getAll}
138134 * @return {Promise<Array<Object>> }
139- * @private
140135 */
141136 async getAll ( ) : Promise < QueueStoreEntry [ ] > {
142137 return await this . _queueDb . getAllEntriesByQueueName ( this . _queueName ) ;
@@ -147,7 +142,6 @@ export class QueueStore {
147142 *
148143 * @param {Object } options See {@link module:workbox-background-sync.Queue~size}
149144 * @return {Promise<number> }
150- * @private
151145 */
152146 async size ( ) : Promise < number > {
153147 return await this . _queueDb . getEntryCountByQueueName ( this . _queueName ) ;
@@ -161,7 +155,6 @@ export class QueueStore {
161155 * as this class is not publicly exposed. An additional check would make
162156 * this method slower than it needs to be.
163157 *
164- * @private
165158 * @param {number } id
166159 */
167160 async deleteEntry ( id : number ) : Promise < void > {
0 commit comments