Colocate buffer types in buffer/Types.ts
The import/no-cycle refactor had moved IBuffer, IBufferSet, and related cell/line types into src/common/Types.ts, with buffer/Types.ts only re-exporting them. That inverted the natural module boundary and made buffer code depend on the top-level types hub. Define buffer-owned types in buffer/Types.ts instead: - CharData, IExtendedAttrs, IAttributeData, ICellData, IBufferLine - IMarker, IBuffer, IBufferSet, BufferIndex Restore UnderlineStyle to buffer/Constants.ts (used by IExtendedAttrs) and remove those definitions from Types.ts. buffer/Types.ts imports only what it needs from outside the buffer layer: ICircularList and ICharset from Types, IDisposable from Lifecycle, IEvent from Event, and UnderlineStyle from Constants. Types.ts does not import buffer/Types.ts, so the previous Types <-> buffer cycle stays broken. Update imports across common, browser, headless, addons, and tests to use common/buffer/Types for buffer types rather than common/Types. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -6,7 +6,8 @@
|
||||
import { CircularList, IInsertEvent } from '../CircularList';
|
||||
import { Disposable, toDisposable } from '../Lifecycle';
|
||||
import { IdleTaskQueue } from '../TaskQueue';
|
||||
import { IAttributeData, IBufferLine, ICellData, ICharset } from '../Types';
|
||||
import { ICharset } from '../Types';
|
||||
import { IAttributeData, IBuffer, IBufferLine, ICellData } from './Types';
|
||||
import { ExtendedAttrs } from './AttributeData';
|
||||
import { BufferLine, DEFAULT_ATTR_DATA } from './BufferLine';
|
||||
import { BufferLineStringCache } from './BufferLineStringCache';
|
||||
@@ -14,7 +15,6 @@ import { getWrappedLineTrimmedLength, reflowLargerApplyNewLayout, reflowLargerCr
|
||||
import { CellData } from './CellData';
|
||||
import { NULL_CELL_CHAR, NULL_CELL_CODE, NULL_CELL_WIDTH, WHITESPACE_CELL_CHAR, WHITESPACE_CELL_CODE, WHITESPACE_CELL_WIDTH } from './Constants';
|
||||
import { Marker } from './Marker';
|
||||
import { IBuffer } from './Types';
|
||||
import { DEFAULT_CHARSET } from '../data/Charsets';
|
||||
import { IBufferService, ILogService, IOptionsService } from '../services/Services';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user