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:
@@ -4,9 +4,8 @@
|
||||
*/
|
||||
|
||||
import { Disposable } from '../Lifecycle';
|
||||
import { IAttributeData, IBufferLine } from '../Types';
|
||||
import { IAttributeData, IBuffer, IBufferLine, IBufferSet } from '../buffer/Types';
|
||||
import { BufferSet } from '../buffer/BufferSet';
|
||||
import { IBuffer, IBufferSet } from '../buffer/Types';
|
||||
import { IBufferService, ILogService, IOptionsService, type IBufferResizeEvent } from './Services';
|
||||
import { Emitter } from '../Event';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user