Browse Source
Merge pull request #3846 from abpframework/fix/linked-list-parameter-names
Fixed nextValue/previousValue mismatch in LinkedList
pull/3850/head
Mehmet Erim
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
2 deletions
-
npm/packs/utils/projects/utils/src/lib/linked-list.ts
|
|
|
@ -103,7 +103,7 @@ export class LinkedList<T = any> { |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
addAfter(value: T, nextValue: T): ListNode<T>; |
|
|
|
addAfter(value: T, previousValue: T): ListNode<T>; |
|
|
|
addAfter(value: T, previousValue: any, compareFn: ListComparisonFn<T>): ListNode<T>; |
|
|
|
addAfter(value: T, previousValue: any, compareFn: ListComparisonFn<T> = compare): ListNode<T> { |
|
|
|
const previous = this.find(node => compareFn(node.value, previousValue)); |
|
|
|
@ -173,7 +173,7 @@ export class LinkedList<T = any> { |
|
|
|
return previous ? this.attachMany(values, previous, previous.next) : this.addManyTail(values); |
|
|
|
} |
|
|
|
|
|
|
|
addManyBefore(values: T[], previousValue: T): ListNode<T>[]; |
|
|
|
addManyBefore(values: T[], nextValue: T): ListNode<T>[]; |
|
|
|
addManyBefore(values: T[], nextValue: any, compareFn: ListComparisonFn<T>): ListNode<T>[]; |
|
|
|
addManyBefore( |
|
|
|
values: T[], |
|
|
|
|