@@ -57,7 +57,7 @@ export class ListItem<DataClass> {
5757 public prev : ListItem < DataClass > = null ;
5858
5959 /**
60- * @param {any } data The data to be stored in the list item
60+ * @param {any } data The data to be stored in the list item
6161 * @constructor
6262 */
6363 constructor ( data : any = null ) {
@@ -88,7 +88,7 @@ export class LinkedList<DataClass> {
8888 * item in the list, without having to handle special
8989 * cases.
9090 *
91- * @param {DataClass[] } args The data items that form the initial list
91+ * @param {DataClass[] } args The data items that form the initial list
9292 * @constructor
9393 */
9494 constructor ( ...args : DataClass [ ] ) {
@@ -104,7 +104,7 @@ export class LinkedList<DataClass> {
104104 *
105105 * so use toArray() to convert to array, when needed
106106 *
107- * @return {DataClass[] } The list converted to an array
107+ * @return {DataClass[] } The list converted to an array
108108 */
109109 public toArray ( ) {
110110 return Array . from ( this ) as DataClass [ ] ;
@@ -113,9 +113,9 @@ export class LinkedList<DataClass> {
113113 /**
114114 * Used for sorting and merging lists (Overridden by subclasses)
115115 *
116- * @param {DataClass } a The first item to compare
117- * @param {DataClass } b The second item to compare
118- * @return {boolean } True if a is before b, false otherwise
116+ * @param {DataClass } a The first item to compare
117+ * @param {DataClass } b The second item to compare
118+ * @return {boolean } True if a is before b, false otherwise
119119 */
120120 public isBefore ( a : DataClass , b : DataClass ) {
121121 return ( a < b ) ;
@@ -124,8 +124,8 @@ export class LinkedList<DataClass> {
124124 /**
125125 * Push items on the end of the list
126126 *
127- * @param {DataClass[] } args The list of data items to be pushed
128- * @return {LinkedList } The LinkedList object (for chaining)
127+ * @param {DataClass[] } args The list of data items to be pushed
128+ * @return {LinkedList } The LinkedList object (for chaining)
129129 */
130130 public push ( ...args : DataClass [ ] ) {
131131 for ( const data of args ) {
@@ -141,7 +141,7 @@ export class LinkedList<DataClass> {
141141 /**
142142 * Pop the end item off the list and return its data
143143 *
144- * @return {DataClass } The data from the last item in the list
144+ * @return {DataClass } The data from the last item in the list
145145 */
146146 public pop ( ) : DataClass {
147147 let item = this . list . prev ;
@@ -157,8 +157,8 @@ export class LinkedList<DataClass> {
157157 /**
158158 * Push items at the head of the list
159159 *
160- * @param {DataClass[] } args The list of data items to inserted
161- * @return {LinkedList } The LinkedList object (for chaining)
160+ * @param {DataClass[] } args The list of data items to inserted
161+ * @return {LinkedList } The LinkedList object (for chaining)
162162 */
163163 public unshift ( ...args : DataClass [ ] ) {
164164 for ( const data of args . slice ( 0 ) . reverse ( ) ) {
@@ -174,7 +174,7 @@ export class LinkedList<DataClass> {
174174 /**
175175 * Remove an item from the head of the list and return its data
176176 *
177- * @return {DataClass } The data from the first item in the list
177+ * @return {DataClass } The data from the first item in the list
178178 */
179179 public shift ( ) : DataClass {
180180 let item = this . list . next ;
@@ -190,7 +190,7 @@ export class LinkedList<DataClass> {
190190 /**
191191 * Empty the list
192192 *
193- * @return {LinkedList } The LinkedList object (for chaining)
193+ * @return {LinkedList } The LinkedList object (for chaining)
194194 */
195195 public clear ( ) {
196196 this . list . next . prev = this . list . prev . next = null ;
@@ -201,7 +201,7 @@ export class LinkedList<DataClass> {
201201 /**
202202 * Make the list iterable and return the data from the items in the list
203203 *
204- * @return {{next: Function} } The object containing the iterator's next() function
204+ * @return {{next: Function} } The object containing the iterator's next() function
205205 */
206206 public [ Symbol . iterator ] ( ) : Iterator < DataClass > {
207207 let current = this . list ;
@@ -218,7 +218,7 @@ export class LinkedList<DataClass> {
218218 /**
219219 * An iterator for the list in reverse order
220220 *
221- * @return {Object } The iterator for walking the list in reverse
221+ * @return {Object } The iterator for walking the list in reverse
222222 */
223223 public reversed ( ) {
224224 let current = this . list ;
@@ -241,9 +241,9 @@ export class LinkedList<DataClass> {
241241 /**
242242 * Insert a new item into a sorted list in the correct locations
243243 *
244- * @param {DataClass } data The data item to add
245- * @param {SortFn } isBefore The function used to order the data
246- * @param {LinkedList } The LinkedList object (for chaining)
244+ * @param {DataClass } data The data item to add
245+ * @param {SortFn } isBefore The function used to order the data
246+ * @param {LinkedList } The LinkedList object (for chaining)
247247 */
248248 public insert ( data : DataClass , isBefore : SortFn < DataClass > = null ) {
249249 if ( isBefore === null ) {
@@ -263,8 +263,8 @@ export class LinkedList<DataClass> {
263263 /**
264264 * Sort the list using an optional sort function
265265 *
266- * @param {SortFn } isBefore The function used to order the data
267- * @return {LinkedList } The LinkedList object (for chaining)
266+ * @param {SortFn } isBefore The function used to order the data
267+ * @return {LinkedList } The LinkedList object (for chaining)
268268 */
269269 public sort ( isBefore : SortFn < DataClass > = null ) {
270270 if ( isBefore === null ) {
@@ -302,9 +302,9 @@ export class LinkedList<DataClass> {
302302 /**
303303 * Merge a sorted list with another sorted list
304304 *
305- * @param {LinkedList } list The list to merge into this instance's list
306- * @param {SortFn } isBefore The function used to order the data
307- * @return {LinkedList } The LinkedList instance (for chaining)
305+ * @param {LinkedList } list The list to merge into this instance's list
306+ * @param {SortFn } isBefore The function used to order the data
307+ * @return {LinkedList } The LinkedList instance (for chaining)
308308 */
309309 public merge ( list : LinkedList < DataClass > , isBefore : SortFn < DataClass > = null ) {
310310 if ( isBefore === null ) {
0 commit comments