Skip to content

Commit

Permalink
cosmetic
Browse files Browse the repository at this point in the history
  • Loading branch information
ibc committed Nov 8, 2024
1 parent eff296c commit 1fac13e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
13 changes: 3 additions & 10 deletions node/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,6 @@ export { workerBin };

const logger = new Logger();

/**
* Event listeners for mediasoup generated logs.
*/
export type LogEventListeners = {
ondebug?: (namespace: string, log: string) => void;
onwarn?: (namespace: string, log: string) => void;
onerror?: (namespace: string, log: string, error?: Error) => void;
};

/**
* Set event listeners for mediasoup generated logs. If called with no arguments
* then no events will be emitted.
Expand All @@ -74,7 +65,9 @@ export type LogEventListeners = {
* });
* ```
*/
export function setLogEventListeners(listeners?: LogEventListeners): void {
export function setLogEventListeners(
listeners?: types.LogEventListeners
): void {
logger.debug('setLogEventListeners()');

let debugLogEmitter: LoggerEmitter | undefined;
Expand Down
11 changes: 10 additions & 1 deletion node/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export type { Observer, ObserverEvents, LogEventListeners } from './index';
export type { Observer, ObserverEvents } from './index';
export type * from './WorkerTypes';
export type * from './WebRtcServerTypes';
export type * from './RouterTypes';
Expand Down Expand Up @@ -34,3 +34,12 @@ export type Either<T, U> = Only<T, U> | Only<U, T>;
export type AppData = {
[key: string]: unknown;
};

/**
* Event listeners for mediasoup generated logs.
*/
export type LogEventListeners = {
ondebug?: (namespace: string, log: string) => void;
onwarn?: (namespace: string, log: string) => void;
onerror?: (namespace: string, log: string, error?: Error) => void;
};

0 comments on commit 1fac13e

Please sign in to comment.