Skip to content

Commit 5c0be0e

Browse files
committed
fix: cyclic imports
1 parent 3083303 commit 5c0be0e

File tree

7 files changed

+11
-15
lines changed

7 files changed

+11
-15
lines changed

src/Constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { NodeOption, ShoukakuOptions } from './Shoukaku';
21
import Info from '../package.json';
2+
import type { NodeOption, ShoukakuOptions } from './Shoukaku';
33

44
export enum State {
55
CONNECTING,

src/Shoukaku.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type { Connector } from './connectors/Connector';
2-
import type { Rest } from './node/Rest';
32
import { ShoukakuDefaults, VoiceState } from './Constants';
43
import { Connection } from './guild/Connection';
54
import { Player } from './guild/Player';
65
import { Node, NodeEvents } from './node/Node';
6+
import type { Rest } from './node/Rest';
77
import { Constructor, mergeDefault, TypedEventEmitter } from './Utils';
88

99
export interface Structures {

src/connectors/Connector.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */
2+
import { NodeDefaults } from '../Constants';
23
import type { ServerUpdate, StateUpdatePartial } from '../guild/Connection';
34
import type { NodeOption, Shoukaku } from '../Shoukaku';
4-
import { NodeDefaults } from '../Constants';
55
import { mergeDefault } from '../Utils';
66

77
export interface ConnectorMethods {

src/guild/Connection.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import type { Shoukaku, VoiceChannelOptions } from '../Shoukaku';
21
import { EventEmitter, once } from 'node:events';
3-
import { State, VoiceState } from '../Constants'
2+
import { State, VoiceState } from '../Constants';
3+
import type { Shoukaku, VoiceChannelOptions } from '../Shoukaku';
44

55
/**
66
* Represents the partial payload from a stateUpdate event

src/guild/Player.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import { OpCodes, State } from '../Constants';
12
import type { Node } from '../node/Node';
23
import type { Exception, Track, UpdatePlayerInfo, UpdatePlayerOptions } from '../node/Rest';
3-
import { OpCodes, State } from '../Constants';
44
import { TypedEventEmitter } from '../Utils';
55
import { Connection } from './Connection';
66

src/node/Node.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
import { IncomingMessage } from 'http';
22
import Websocket from 'ws';
3-
// eslint-disable-next-line import-x/no-cycle
43
import { OpCodes, ShoukakuClientInfo, State, Versions } from '../Constants';
5-
// eslint-disable-next-line import-x/no-cycle
6-
import {
4+
import type {
75
PlayerUpdate,
86
TrackEndEvent,
97
TrackExceptionEvent,
108
TrackStartEvent,
119
TrackStuckEvent,
1210
WebSocketClosedEvent
1311
} from '../guild/Player';
14-
import { NodeOption, Shoukaku, ShoukakuEvents } from '../Shoukaku';
12+
import type { NodeOption, Shoukaku, ShoukakuEvents } from '../Shoukaku';
1513
import { TypedEventEmitter, wait } from '../Utils';
16-
// eslint-disable-next-line import-x/no-cycle
1714
import { Rest } from './Rest';
1815

1916
export interface Ready {

src/node/Rest.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
/* eslint-disable import-x/no-cycle */
21
import { Versions } from '../Constants';
3-
import { FilterOptions } from '../guild/Player';
4-
import { NodeOption } from '../Shoukaku';
5-
import { Node, NodeInfo, Stats } from './Node';
2+
import type { FilterOptions } from '../guild/Player';
3+
import type { NodeOption } from '../Shoukaku';
4+
import type { Node, NodeInfo, Stats } from './Node';
65

76
export type Severity = 'common' | 'suspicious' | 'fault';
87

0 commit comments

Comments
 (0)