Colocate circular list types in CircularList.ts

The import/no-cycle refactor had moved IInsertEvent, IDeleteEvent, and
ICircularList into Types.ts, with CircularList.ts re-exporting the event
types from there. That split the list abstraction from its implementation
and pulled Types into the circular-list dependency graph.

Define IInsertEvent, IDeleteEvent, and ICircularList in CircularList.ts
alongside the CircularList class. CircularList.ts now depends only on
Lifecycle and Event, not Types.ts.

Remove those definitions from Types.ts (and the unused Emitter import).

Update callers to import list types from CircularList:
- buffer/Types.ts (IBuffer.lines)
- DecorationService.ts (buffer line insert/delete handlers)
- browser TestUtils.test.ts (mock buffer lines)

Types.ts no longer imports or re-exports circular-list types, preserving
the acyclic Types -> buffer/CircularList boundary.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Daniel Imms
2026-05-31 14:37:01 -07:00
co-authored by Cursor
parent cd3dcc52b2
commit 5684f95c8e
5 changed files with 39 additions and 40 deletions
+2 -1
View File
@@ -4,7 +4,8 @@
*/
import type { IEvent } from '../Event';
import type { ICircularList, ICharset } from '../Types';
import type { ICircularList } from '../CircularList';
import type { ICharset } from '../Types';
import type { IDisposable } from '../Lifecycle';
import type { UnderlineStyle } from './Constants';