Skip to content

Commit c9bc075

Browse files
Dominik Piatekdpiatek
authored andcommitted
Remove circular dependency
1 parent f69891e commit c9bc075

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

src/CursorBatching.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Types } from 'ably';
22

3-
import { CURSOR_UPDATE } from './Cursors.js';
3+
import { CURSOR_UPDATE } from './CursorConstants.js';
44
import type { CursorUpdate } from './types.js';
55
import type { CursorsOptions } from './types.js';
66

src/CursorConstants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const CURSOR_UPDATE = 'cursorUpdate';

src/Cursors.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import { it, describe, expect, vi, beforeEach, vitest, afterEach } from 'vitest'
22
import { Realtime, Types } from 'ably/promises';
33

44
import Space from './Space.js';
5-
import Cursors, { CURSOR_UPDATE } from './Cursors.js';
5+
import Cursors from './Cursors.js';
6+
import { CURSOR_UPDATE } from './CursorConstants.js';
67
import { createPresenceMessage } from './utilities/test/fakes.js';
78
import CursorBatching from './CursorBatching.js';
89
import CursorDispensing from './CursorDispensing.js';

src/Cursors.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import EventEmitter, {
1010
type EventListener,
1111
} from './utilities/EventEmitter.js';
1212
import CursorHistory from './CursorHistory.js';
13+
import { CURSOR_UPDATE } from './CursorConstants.js';
1314

1415
import type { CursorsOptions, CursorUpdate } from './types.js';
1516
import type { RealtimeMessage } from './utilities/types.js';
@@ -18,8 +19,6 @@ type CursorsEventMap = {
1819
cursorsUpdate: CursorUpdate;
1920
};
2021

21-
export const CURSOR_UPDATE = 'cursorUpdate';
22-
2322
export default class Cursors extends EventEmitter<CursorsEventMap> {
2423
private readonly cursorBatching: CursorBatching;
2524
private readonly cursorDispensing: CursorDispensing;

0 commit comments

Comments
 (0)