history.ts ×31

Frontier kind: Code frontier

unlabeled · c_1e773962c4f3

27 tests · 3515 LOC · 20 files · introduces 0 tests · 135 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
38 ranges135 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
519 ranges3515 lines · 20 files · Browse complete extent
All tests (intent)
27 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Introduced files, introduced tests, and structurally relevant concept specializationhistory.test|title=History Navigator add resets the navigator to last|occurrence=1 · 0 introduced LOChistory.test|title=Histo…history.test|title=History Navigator create sets the position after last|occurrence=1 · 0 introduced LOChistory.test|title=Histo…history.test|title=History Navigator next on last element returns null and remains on last|occurrence=1 · 0 introduced LOChistory.test|title=Histo…history.test|title=History Navigator previous on first element returns null and remains on first|occurrence=1 · 0 introduced LOChistory.test|title=Histo…history.test|title=History Navigator previous returns previous element|occurrence=1 · 0 introduced LOChistory.test|title=Histo…history.ts ×1 · 1 introduced LOChistory.ts ×1history.test|title=History Navigator next returns object if the current position is not the last one|occurrence=1 · 0 introduced LOChistory.test|title=Histo…history.test|title=History Navigator previous returns object if the current position is not the first one|occurrence=1 · 0 introduced LOChistory.test|title=Histo…history.ts ×1 · 3 introduced LOChistory.ts ×1history.test|title=History Navigator next returns null if the current position is the last one|occurrence=1 · 0 introduced LOChistory.test|title=Histo…history.ts ×1 · 2 introduced LOChistory.ts ×1history.ts ×1 · 2 introduced LOChistory.ts ×1history.test|title=History Navigator add reduces the input to limit|occurrence=1 · 0 introduced LOChistory.test|title=Histo…history.test|title=History Navigator first returns first element|occurrence=1 · 0 introduced LOChistory.test|title=Histo…history.test|title=History Navigator last returns last element|occurrence=1 · 0 introduced LOChistory.test|title=Histo…history.test|title=History Navigator previous returns null if the current position is the first one|occurrence=1 · 0 introduced LOChistory.test|title=Histo…history.ts ×4 · 11 introduced LOChistory.ts ×4history.test|title=History Navigator create reduces the input to limit|occurrence=1 · 0 introduced LOChistory.test|title=Histo…history.test|title=History Navigator adding an existing item changes the order|occurrence=1, history.test|title=History Navigator adding existing element changes the position|occurrence=1 · 0 introduced LOChistory.test|title=Histo…history.test|title=History Navigator next returns next element|occurrence=1 · 0 introduced LOChistory.test|title=Histo…history.test|title=History Navigator 2 add - existing value|occurrence=1 · 0 introduced LOChistory.test|title=Histo…history.ts ×1 · 5 introduced LOChistory.ts ×1history.ts ×1 · 4 introduced LOChistory.ts ×1history.ts ×1 · 2 introduced LOChistory.ts ×1history.ts ×1 · 1 introduced LOChistory.ts ×1history.ts ×1 · 1 introduced LOChistory.ts ×1history.ts ×1 · 5 introduced LOChistory.ts ×1history.ts ×1 · 6 introduced LOChistory.ts ×1history.ts ×2 · 9 introduced LOChistory.ts ×2history.ts ×1 · 2 introduced LOChistory.ts ×1history.ts ×1 · 2 introduced LOChistory.ts ×1history.ts ×1 · 2 introduced LOChistory.ts ×1history.ts ×1 · 2 introduced LOChistory.ts ×1history.ts ×2 · 23 introduced LOChistory.ts ×2history.ts ×2 · 17 introduced LOChistory.ts ×2history.ts ×2 · 2 introduced LOChistory.ts ×2history.ts ×1 · 2 introduced LOChistory.ts ×1history.ts ×1 · 6 introduced LOChistory.ts ×1history.ts ×1 · 5 introduced LOChistory.ts ×1history.ts ×1 · 6 introduced LOChistory.ts ×1history.ts ×2 · 3 introduced LOChistory.ts ×2history.ts ×2 · 6 introduced LOChistory.ts ×2history.ts ×6 · 34 introduced LOChistory.ts ×6history.ts ×1 · 2 introduced LOChistory.ts ×1navigator.ts ×1 · 2 introduced LOCnavigator.ts ×1history.ts ×6 · 27 introduced LOChistory.ts ×6history.ts ×1 · 2 introduced LOChistory.ts ×1history.ts ×2 · 2 introduced LOChistory.ts ×2uri.test|title=URI URI#file, win-speciale|occurrence=1, charCode.test|title=CharCode has good values|occurrence=1, +2 · 0 introduced LOCuri.test|title=URI URI#f…utils.ts ×3 · 9 introduced LOCutils.ts ×3lifecycle.ts ×2 · 4 introduced LOClifecycle.ts ×2lifecycle.ts ×1 · 2 introduced LOClifecycle.ts ×1lifecycle.ts ×4 · 8 introduced LOClifecycle.ts ×4lifecycle.ts ×6 · 16 introduced LOClifecycle.ts ×6lifecycle.ts ×1 · 2 introduced LOClifecycle.ts ×1lifecycle.ts ×1 · 2 introduced LOClifecycle.ts ×1lifecycle.ts ×1 · 3 introduced LOClifecycle.ts ×1map.ts ×97 · 3334 introduced LOCmap.ts ×97src/vs/base/common/arrays.ts · 949 LOCcommon/arrays.tssrc/vs/base/common/arraysFind.ts · 226 LOCcommon/arraysFind.tssrc/vs/base/common/assert.ts · 91 LOCcommon/assert.tssrc/vs/base/common/charCode.ts · 450 LOCcommon/charCode.tssrc/vs/base/common/collections.ts · 176 LOCcommon/collections.tssrc/vs/base/common/errors.ts · 357 LOCcommon/errors.tssrc/vs/base/common/functional.ts · 32 LOCcommon/functional.tssrc/vs/base/common/history.ts · 298 LOCcommon/history.tssrc/vs/base/common/iterator.ts · 194 LOCcommon/iterator.tssrc/vs/base/common/lifecycle.ts · 974 LOCcommon/lifecycle.tssrc/vs/base/common/map.ts · 1016 LOCcommon/map.tssrc/vs/base/common/marshallingIds.ts · 33 LOCcommon/marshallingIds.tssrc/vs/base/common/navigator.ts · 50 LOCcommon/navigator.tssrc/vs/base/common/path.ts · 1589 LOCcommon/path.tssrc/vs/base/common/platform.ts · 281 LOCcommon/platform.tssrc/vs/base/common/process.ts · 76 LOCcommon/process.tssrc/vs/base/common/types.ts · 410 LOCcommon/types.tssrc/vs/base/common/uri.ts · 754 LOCcommon/uri.tssrc/vs/base/test/common/utils.ts · 107 LOCcommon/utils.tssrc/vs/nls.ts · 244 LOCvs/nls.tscharCode.test|title=CharCode has good values|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/charCode.test|title=CharCode has good values|occurrence=1charCode.test|title=Char…history.test|title=History Navigator 2 add - existing value|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/history.test|title=History Navigator 2 add - existing value|occurrence=1history.test|title=Histo…history.test|title=History Navigator 2 add|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/history.test|title=History Navigator 2 add|occurrence=1history.test|title=Histo…history.test|title=History Navigator 2 constructor - capacity limit|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/history.test|title=History Navigator 2 constructor - capacity limit|occurrence=1history.test|title=Histo…history.test|title=History Navigator 2 constructor - duplicate values|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/history.test|title=History Navigator 2 constructor - duplicate values|occurrence=1history.test|title=Histo…history.test|title=History Navigator 2 constructor - initial history is not empty|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/history.test|title=History Navigator 2 constructor - initial history is not empty|occurrence=1history.test|title=Histo…history.test|title=History Navigator 2 constructor|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/history.test|title=History Navigator 2 constructor|occurrence=1history.test|title=Histo…history.test|title=History Navigator 2 navigation|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/history.test|title=History Navigator 2 navigation|occurrence=1history.test|title=Histo…history.test|title=History Navigator 2 prepend|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/history.test|title=History Navigator 2 prepend|occurrence=1history.test|title=Histo…history.test|title=History Navigator 2 replaceLast - existing value|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/history.test|title=History Navigator 2 replaceLast - existing value|occurrence=1history.test|title=Histo…history.test|title=History Navigator 2 replaceLast|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/history.test|title=History Navigator 2 replaceLast|occurrence=1history.test|title=Histo…history.test|title=History Navigator add reduces the input to limit|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/history.test|title=History Navigator add reduces the input to limit|occurrence=1history.test|title=Histo…history.test|title=History Navigator add resets the navigator to last|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/history.test|title=History Navigator add resets the navigator to last|occurrence=1history.test|title=Histo…history.test|title=History Navigator adding an existing item changes the order|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/history.test|title=History Navigator adding an existing item changes the order|occurrence=1history.test|title=Histo…history.test|title=History Navigator adding existing element changes the position|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/history.test|title=History Navigator adding existing element changes the position|occurrence=1history.test|title=Histo…history.test|title=History Navigator clear|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/history.test|title=History Navigator clear|occurrence=1history.test|title=Histo…history.test|title=History Navigator create reduces the input to limit|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/history.test|title=History Navigator create reduces the input to limit|occurrence=1history.test|title=Histo…history.test|title=History Navigator create sets the position after last|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/history.test|title=History Navigator create sets the position after last|occurrence=1history.test|title=Histo…history.test|title=History Navigator first returns first element|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/history.test|title=History Navigator first returns first element|occurrence=1history.test|title=Histo…history.test|title=History Navigator last returns last element|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/history.test|title=History Navigator last returns last element|occurrence=1history.test|title=Histo…history.test|title=History Navigator next on last element returns null and remains on last|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/history.test|title=History Navigator next on last element returns null and remains on last|occurrence=1history.test|title=Histo…history.test|title=History Navigator next returns next element|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/history.test|title=History Navigator next returns next element|occurrence=1history.test|title=Histo…history.test|title=History Navigator next returns null if the current position is the last one|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/history.test|title=History Navigator next returns null if the current position is the last one|occurrence=1history.test|title=Histo…history.test|title=History Navigator next returns object if the current position is not the last one|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/history.test|title=History Navigator next returns object if the current position is not the last one|occurrence=1history.test|title=Histo…history.test|title=History Navigator previous on first element returns null and remains on first|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/history.test|title=History Navigator previous on first element returns null and remains on first|occurrence=1history.test|title=Histo…history.test|title=History Navigator previous returns null if the current position is the first one|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/history.test|title=History Navigator previous returns null if the current position is the first one|occurrence=1history.test|title=Histo…history.test|title=History Navigator previous returns object if the current position is not the first one|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/history.test|title=History Navigator previous returns object if the current position is not the first one|occurrence=1history.test|title=Histo…history.test|title=History Navigator previous returns previous element|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/history.test|title=History Navigator previous returns previous element|occurrence=1history.test|title=Histo…path.test|title=Paths (Node Implementation) path|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/path.test|title=Paths (Node Implementation) path|occurrence=1path.test|title=Paths (N…uri.test|title=URI File paths containing apostrophes break URI parsing and cannot be opened #276075|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/uri.test|title=URI File paths containing apostrophes break URI parsing and cannot be opened #276075|occurrence=1uri.test|title=URI File …uri.test|title=URI URI#file, win-speciale|occurrence=1 · introduced test · mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/uri.test|title=URI URI#file, win-speciale|occurrence=1uri.test|title=URI URI#f…Focused concept · history.ts ×31 · 135 introduced LOChistory.ts ×31

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

2 files ranked by introduced lines: 135 introduced LOC across 38 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/base/common/history.ts 108 introduced LOC · 31 ranges

Open complete file

1 > /*--------------------------------------------------------------------------------------------- history.ts
2 > * Copyright (c) Microsoft Corporation. All rights reserved.
3 > * Licensed under the MIT License. See License.txt in the project root for license information.
4 > *--------------------------------------------------------------------------------------------*/
5 >
6 > import { SetWithKey } from './collections.js';
7 > import { Event } from './event.js';
8 > import { IDisposable } from './lifecycle.js';
9 > import { ArrayNavigator, INavigator } from './navigator.js';
10 >
11 > export interface IHistory<T> {
12 > delete(t: T): boolean;
13 > add(t: T): this;
14 > has(t: T): boolean;
15 > clear(): void;
16 > forEach(callbackfn: (value: T, value2: T, set: Set<T>) => void, thisArg?: unknown): void;
17 > replace?(t: T[]): void;
18 > readonly onDidChange?: Event<string[]>;
19 > }
20 >
21 > export class HistoryNavigator<T> implements INavigator<T> {
22 > private _limit: number;
23 > private _navigator!: ArrayNavigator<T>;
24 > private _disposable: IDisposable | undefined;
25 >
26 > constructor(
27 private _history: IHistory<T> = new Set(),
28 limit: number = 10,
34 }
35 }
36 > history.ts
37 > public getHistory(): T[] {
38 return this._elements;
39 }
40 > history.ts
41 > public add(t: T) {
42 this._history.delete(t);
43 this._history.add(t);
44 this._onChange();
45 }
46 > history.ts
47 > public next(): T | null {
48 // This will navigate past the end of the last element, and in that case the input should be cleared
49 return this._navigator.next();
50 }
51 > history.ts
52 > public previous(): T | null {
53 if (this._currentPosition() !== 0) {
54 return this._navigator.previous();
56 return null;
57 }
58 > history.ts
59 > public current(): T | null {
60 return this._navigator.current();
61 }
62 > history.ts
63 > public first(): T | null {
64 return this._navigator.first();
65 }
66 > history.ts
67 > public last(): T | null {
68 return this._navigator.last();
69 }
70 > history.ts
71 > public isFirst(): boolean {
72 return this._currentPosition() === 0;
73 }
74 > history.ts
75 > public isLast(): boolean {
76 return this._currentPosition() >= this._elements.length - 1;
77 }
78 > history.ts
79 > public isNowhere(): boolean {
80 return this._navigator.current() === null;
81 }
82 > history.ts
83 > public has(t: T): boolean {
84 return this._history.has(t);
85 }
86 > history.ts
87 > public clear(): void {
88 this._history.clear();
89 this._onChange();
90 }
91 > history.ts
92 > private _onChange() {
93 this._reduceToLimit();
94 const elements = this._elements;
95 this._navigator = new ArrayNavigator(elements, 0, elements.length, elements.length);
96 }
97 > history.ts
98 > private _reduceToLimit() {
99 const data = this._elements;
100 if (data.length > this._limit) {
107 }
108 }
109 > history.ts
110 > private _currentPosition(): number {
111 const currentElement = this._navigator.current();
112 if (!currentElement) {
116 return this._elements.indexOf(currentElement);
117 }
118 > history.ts
119 > private get _elements(): T[] {
120 const elements: T[] = [];
121 this._history.forEach(e => elements.push(e));
122 return elements;
123 }
124 > history.ts
125 > public dispose(): void {
126 if (this._disposable) {
127 this._disposable.dispose();
129 }
130 }
131 > } history.ts
132 >
133 > interface HistoryNode<T> {
134 > value: T;
135 > previous: HistoryNode<T> | undefined;
136 > next: HistoryNode<T> | undefined;
137 > }
138 >
139 > /**
140 > * The right way to use HistoryNavigator2 is for the last item in the list to be the user's uncommitted current text. eg empty string, or whatever has been typed. Then
141 > * the user can navigate away from the last item through the list, and back to it. When updating the last item, call replaceLast.
142 > */
143 > export class HistoryNavigator2<T> {
144 >
145 > private valueSet: Set<T>;
146 > private head: HistoryNode<T>;
147 > private tail: HistoryNode<T>;
148 > private cursor: HistoryNode<T>;
149 > private _size: number;
150 > get size(): number { return this._size; }
151 >
152 > constructor(history: readonly T[], private capacity: number = 10, private identityFn: (t: T) => unknown = t => t) {
153 if (history.length < 1) {
154 throw new Error('not supported');
167 }
168 }
169 > history.ts
170 > add(value: T): void {
171 const node: HistoryNode<T> = {
172 value,
194 }
195 }
196 > history.ts
197 > /**
198 > * @returns old last value
199 > */
200 > replaceLast(value: T): T {
201 if (this.identityFn(this.tail.value) === this.identityFn(value)) {
202 return value;
215 return oldValue;
216 }
217 > history.ts
218 > prepend(value: T): void {
219 if (this._size === this.capacity || this.valueSet.has(value)) {
220 return;
233 this.valueSet.add(value);
234 }
235 > history.ts
236 > isAtEnd(): boolean {
237 return this.cursor === this.tail;
238 }
239 > history.ts
240 > current(): T {
241 return this.cursor.value;
242 }
243 > history.ts
244 > previous(): T {
245 if (this.cursor.previous) {
246 this.cursor = this.cursor.previous;
249 return this.cursor.value;
250 }
251 > history.ts
252 > next(): T {
253 if (this.cursor.next) {
254 this.cursor = this.cursor.next;
257 return this.cursor.value;
258 }
259 > history.ts
260 > has(t: T): boolean {
261 return this.valueSet.has(t);
262 }
263 > history.ts
264 > resetCursor(): T {
265 this.cursor = this.tail;
266 return this.cursor.value;
267 }
268 > history.ts
269 > *[Symbol.iterator](): Iterator<T> {
270 let node: HistoryNode<T> | undefined = this.head;
271
275 }
276 }
277 > history.ts
278 > private _deleteFromList(value: T): void {
279 let temp = this.head;
280
src/vs/base/common/navigator.ts 27 introduced LOC · 7 ranges

Open complete file

1 > /*--------------------------------------------------------------------------------------------- navigator.ts
2 > * Copyright (c) Microsoft Corporation. All rights reserved.
3 > * Licensed under the MIT License. See License.txt in the project root for license information.
4 > *--------------------------------------------------------------------------------------------*/
5 >
6 > export interface INavigator<T> {
7 > current(): T | null;
8 > previous(): T | null;
9 > first(): T | null;
10 > last(): T | null;
11 > next(): T | null;
12 > }
13 >
14 > export class ArrayNavigator<T> implements INavigator<T> {
15 >
16 > constructor(
17 private readonly items: readonly T[],
18 protected start: number = 0,
20 protected index = start - 1
21 ) { }
23 > current(): T | null {
24 if (this.index === this.start - 1 || this.index === this.end) {
25 return null;
28 return this.items[this.index];
29 }
31 > next(): T | null {
32 this.index = Math.min(this.index + 1, this.end);
33 return this.current();
34 }
36 > previous(): T | null {
37 this.index = Math.max(this.index - 1, this.start - 1);
38 return this.current();
39 }
41 > first(): T | null {
42 this.index = this.start;
43 return this.current();
44 }
46 > last(): T | null {
47 this.index = this.end - 1;
48 return this.current();
49 }
50 > } navigator.ts