feat(d.ts)
This commit is contained in:
9
types/iterators/Bidirectional.d.ts
vendored
Normal file
9
types/iterators/Bidirectional.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
import { ForwardIterator } from "./Forward";
|
||||
|
||||
export class BidirectionalIterator<T> extends ForwardIterator<T> {
|
||||
/**
|
||||
* decrements iterator, it doesn't make copy
|
||||
* @returns {this}
|
||||
*/
|
||||
dec(): this;
|
||||
}
|
||||
24
types/iterators/Forward.d.ts
vendored
Normal file
24
types/iterators/Forward.d.ts
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
export class Item<T> {
|
||||
value: T
|
||||
}
|
||||
|
||||
export class ForwardIterator<T> {
|
||||
clone(): ForwardIterator<T>;
|
||||
copy(rhs: ForwardIterator<T>): this;
|
||||
deref(): Item<T>;
|
||||
eq(rhs: ForwardIterator<T>): boolean;
|
||||
/**
|
||||
* increments iterator, it doesn't make copy
|
||||
* @returns {this}
|
||||
*/
|
||||
inc(): this;
|
||||
|
||||
/**
|
||||
* move-semantics, here it just copies rhs into this
|
||||
* @returns {this}
|
||||
*/
|
||||
move(rhs: ForwardIterator<T>): this;
|
||||
get value(): T;
|
||||
set value(value: T);
|
||||
neq(rhs: ForwardIterator<T>): boolean;
|
||||
}
|
||||
Reference in New Issue
Block a user