@tsdotnet/linked-node-list
Advanced tools
Comparing version 1.3.0 to 1.3.1
@@ -12,2 +12,9 @@ /*! | ||
export type ProtectedLinkedNode<TNode extends LinkedNode<TNode>> = | ||
Omit<TNode, 'previous' | 'next'> | ||
& { | ||
readonly previous?: ProtectedLinkedNode<TNode>; | ||
readonly next?: ProtectedLinkedNode<TNode>; | ||
}; | ||
export interface NodeWithValue<TValue> | ||
@@ -14,0 +21,0 @@ { |
import { ArrayLikeWritable, PredicateWithIndex } from '@tsdotnet/common-interfaces'; | ||
import { LinkedNode, LinkedNodeWithValue, NodeWithValue } from './LinkedListNode'; | ||
import { LinkedNode, LinkedNodeWithValue, NodeWithValue, ProtectedLinkedNode } from './LinkedListNode'; | ||
import IterableCollectionBase from '@tsdotnet/collection-base/dist/IterableCollectionBase'; | ||
@@ -24,3 +24,3 @@ export { LinkedNode, LinkedNodeWithValue, NodeWithValue }; | ||
*/ | ||
export declare class LinkedNodeList<TNode extends LinkedNode<TNode>> extends IterableCollectionBase<TNode> { | ||
export declare class LinkedNodeList<TNode extends LinkedNode<TNode>> extends IterableCollectionBase<ProtectedLinkedNode<TNode>> { | ||
private _first; | ||
@@ -41,3 +41,3 @@ private _last; | ||
*/ | ||
get first(): TNode | undefined; | ||
get first(): ProtectedLinkedNode<TNode> | undefined; | ||
/** | ||
@@ -47,3 +47,3 @@ * Returns last node or be undefined if the collection is empty. | ||
*/ | ||
get last(): TNode | undefined; | ||
get last(): ProtectedLinkedNode<TNode> | undefined; | ||
/** | ||
@@ -83,3 +83,3 @@ * Erases the linked node's references to each other and returns the number of nodes. | ||
*/ | ||
getNodeAt(index: number): TNode | undefined; | ||
getNodeAt(index: number): ProtectedLinkedNode<TNode> | undefined; | ||
/** | ||
@@ -90,3 +90,3 @@ * Iterates the list to find the specific node that matches the predicate condition. | ||
*/ | ||
find(condition: PredicateWithIndex<TNode>): TNode | undefined; | ||
find(condition: PredicateWithIndex<ProtectedLinkedNode<TNode>>): ProtectedLinkedNode<TNode> | undefined; | ||
/** | ||
@@ -149,3 +149,3 @@ * Iterates the list to find the specified node and returns its index. | ||
replace(node: TNode, replacement: TNode): this; | ||
protected _getIterator(): Iterator<TNode>; | ||
protected _getIterator(): Iterator<ProtectedLinkedNode<TNode>>; | ||
} | ||
@@ -152,0 +152,0 @@ /** |
{ | ||
"name": "@tsdotnet/linked-node-list", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "An unprotected bi-directional linked list. Useful for implementing other collections.", | ||
@@ -5,0 +5,0 @@ "author": "electricessence", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
51371
989