@proficient/ds
Advanced tools
Comparing version 0.0.1 to 0.1.0
@@ -12,15 +12,18 @@ import type { Collection } from './Collection'; | ||
* | ||
* @throws If the queue is empty. TODO | ||
* @returns The dequeued item. | ||
* | ||
* @returns The dequeued item. | ||
* @throws {@link EmptyCollectionError} | ||
* Thrown if the queue is empty. | ||
*/ | ||
dequeue(): E; | ||
/** | ||
* Retrieves, but does not remove, the head of this queue. | ||
* Retrieves, but does not remove, the head of this queue i.e. then item that will be | ||
* removed if `dequeue()` is called. | ||
* | ||
* @throws If the queue is empty. TODO | ||
* @returns The head element. | ||
* | ||
* @returns The head element of the queue. | ||
* @throws {@link EmptyCollectionError} | ||
* Thrown if the queue is empty. | ||
*/ | ||
peek(): E; | ||
} |
export * from './api'; | ||
export { isEmptyCollectionError } from './isEmptyCollectionError'; | ||
export { isImplementationError } from './isImplementationError'; | ||
export { EmptyCollectionError } from './EmptyCollectionError'; | ||
export { ImplementationError } from './ImplementationError'; | ||
export { SLLQueue } from './SLLQueue'; |
@@ -13,10 +13,10 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.SLLQueue = exports.isImplementationError = exports.isEmptyCollectionError = void 0; | ||
exports.SLLQueue = exports.ImplementationError = exports.EmptyCollectionError = void 0; | ||
__exportStar(require("./api"), exports); | ||
var isEmptyCollectionError_1 = require("./isEmptyCollectionError"); | ||
Object.defineProperty(exports, "isEmptyCollectionError", { enumerable: true, get: function () { return isEmptyCollectionError_1.isEmptyCollectionError; } }); | ||
var isImplementationError_1 = require("./isImplementationError"); | ||
Object.defineProperty(exports, "isImplementationError", { enumerable: true, get: function () { return isImplementationError_1.isImplementationError; } }); | ||
var EmptyCollectionError_1 = require("./EmptyCollectionError"); | ||
Object.defineProperty(exports, "EmptyCollectionError", { enumerable: true, get: function () { return EmptyCollectionError_1.EmptyCollectionError; } }); | ||
var ImplementationError_1 = require("./ImplementationError"); | ||
Object.defineProperty(exports, "ImplementationError", { enumerable: true, get: function () { return ImplementationError_1.ImplementationError; } }); | ||
var SLLQueue_1 = require("./SLLQueue"); | ||
Object.defineProperty(exports, "SLLQueue", { enumerable: true, get: function () { return SLLQueue_1.SLLQueue; } }); | ||
//# sourceMappingURL=index.js.map |
@@ -5,4 +5,8 @@ import type { Collection } from '../api'; | ||
/** | ||
* Converts the collection into a plain array. | ||
* | ||
* @remarks | ||
* | ||
* **Complexity**: | ||
* | ||
* - Time complexity: _O_(_N_) | ||
@@ -9,0 +13,0 @@ * - Space complexity: _O_(_N_) |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.AbstractCollection = void 0; | ||
const EmptyCollectionError_1 = require("../internal/EmptyCollectionError"); | ||
const ImplementationError_1 = require("../internal/ImplementationError"); | ||
const EmptyCollectionError_1 = require("../EmptyCollectionError"); | ||
const ImplementationError_1 = require("../ImplementationError"); | ||
class AbstractCollection { | ||
@@ -11,4 +11,8 @@ get isEmpty() { | ||
/** | ||
* Converts the collection into a plain array. | ||
* | ||
* @remarks | ||
* | ||
* **Complexity**: | ||
* | ||
* - Time complexity: _O_(_N_) | ||
@@ -15,0 +19,0 @@ * - Space complexity: _O_(_N_) |
@@ -15,2 +15,4 @@ import type { Queue } from './api'; | ||
* | ||
* **Complexity**: | ||
* | ||
* - Time complexity: _O_(1) | ||
@@ -21,4 +23,8 @@ * - Space complexity: _O_(1) | ||
/** | ||
* Pushes an item to the queue. | ||
* | ||
* @remarks | ||
* | ||
* **Complexity**: | ||
* | ||
* - Time complexity: _O_(1) | ||
@@ -29,15 +35,32 @@ * - Space complexity: _O_(1) | ||
/** | ||
* Removes an item from the queue. | ||
* | ||
* @remarks | ||
* | ||
* **Complexity**: | ||
* | ||
* - Time complexity: _O_(1) | ||
* - Space complexity: _O_(1) | ||
* | ||
* @returns The dequeued item. | ||
* | ||
* @throws {@link EmptyCollectionError} Thrown if the queue is empty. | ||
*/ | ||
dequeue(): E; | ||
/** | ||
* Retrieves, but does not remove, the head of this queue i.e. then item that will be | ||
* removed if `dequeue()` is called. | ||
* | ||
* @remarks | ||
* | ||
* **Complexity**: | ||
* | ||
* - Time complexity: _O_(1) | ||
* - Space complexity: _O_(1) | ||
* | ||
* @returns The head element. | ||
* | ||
* @throws {@link EmptyCollectionError} Thrown if the queue is empty. | ||
*/ | ||
peek(): E; | ||
} |
@@ -52,2 +52,4 @@ "use strict"; | ||
* | ||
* **Complexity**: | ||
* | ||
* - Time complexity: _O_(1) | ||
@@ -62,4 +64,8 @@ * - Space complexity: _O_(1) | ||
/** | ||
* Pushes an item to the queue. | ||
* | ||
* @remarks | ||
* | ||
* **Complexity**: | ||
* | ||
* - Time complexity: _O_(1) | ||
@@ -83,6 +89,14 @@ * - Space complexity: _O_(1) | ||
/** | ||
* Removes an item from the queue. | ||
* | ||
* @remarks | ||
* | ||
* **Complexity**: | ||
* | ||
* - Time complexity: _O_(1) | ||
* - Space complexity: _O_(1) | ||
* | ||
* @returns The dequeued item. | ||
* | ||
* @throws {@link EmptyCollectionError} Thrown if the queue is empty. | ||
*/ | ||
@@ -99,6 +113,15 @@ dequeue() { | ||
/** | ||
* Retrieves, but does not remove, the head of this queue i.e. then item that will be | ||
* removed if `dequeue()` is called. | ||
* | ||
* @remarks | ||
* | ||
* **Complexity**: | ||
* | ||
* - Time complexity: _O_(1) | ||
* - Space complexity: _O_(1) | ||
* | ||
* @returns The head element. | ||
* | ||
* @throws {@link EmptyCollectionError} Thrown if the queue is empty. | ||
*/ | ||
@@ -105,0 +128,0 @@ peek() { |
{ | ||
"name": "@proficient/ds", | ||
"version": "0.0.1", | ||
"version": "0.1.0", | ||
"description": "High-quality and essential Typescript data structures", | ||
@@ -40,3 +40,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "ed9a160a872609dbbace690f8c901fe746963fb5" | ||
"gitHead": "ff2cb30962b60bce0be86334776806df53f4e0d7" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
373
19219
27