Skip to content

Commit c214d50

Browse files
committed
fix: change default export to named export to avoid double default export issue
1 parent bd26362 commit c214d50

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

src/ic-websocket.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { CallRequest, Cbor } from "@dfinity/agent";
55
import { IDL } from "@dfinity/candid";
66
import { Principal } from "@dfinity/principal";
77

8-
import IcWebSocket, { COMMUNICATION_LATENCY_BOUND_MS, createWsConfig } from "./ic-websocket";
8+
import { IcWebSocket, COMMUNICATION_LATENCY_BOUND_MS, createWsConfig } from "./ic-websocket";
99
import { generateRandomIdentity } from "./identity";
1010
import {
1111
CanisterWsMessageArguments,

src/ic-websocket.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export const createWsConfig = <S extends _WS_CANISTER_SERVICE>(c: IcWebSocketCon
9090

9191
type WsParameters = ConstructorParameters<typeof WebSocket>;
9292

93-
export default class IcWebSocket<
93+
export class IcWebSocket<
9494
S extends _WS_CANISTER_SERVICE,
9595
ApplicationMessageType = GetApplicationMessageType<S>
9696
> {

src/index.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
// import default member
2-
import IcWebSocket from './ic-websocket';
3-
// re-export non-default members
1+
// Export all named exports from ic-websocket
42
export * from './ic-websocket';
53
export * from './identity';
6-
7-
// re-export default member
8-
export default IcWebSocket;

0 commit comments

Comments
 (0)