Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 3 additions & 14 deletions src/SIPMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type { EventEmitter } from 'events';
import * as JsSIP_C from './Constants';
import { Logger } from './Logger';
import * as Grammar from './Grammar';
import type { Transport } from './Transport';
import {
cloneArray,
createRandomToken,
Expand Down Expand Up @@ -84,18 +85,6 @@ export type OutgoingRequestParams = {
* runtime require cycle, since type imports are erased.
*/

/**
* The transport surface SIP messages depend on.
*
* TODO: Replace with `import type { Transport } from './Transport'` once
* `Transport` is ported to TypeScript.
*/
export interface TransportLike {
readonly sip_uri: string;

send(data: string): boolean;
}

/**
* The client transaction an outgoing INVITE is bound to.
*
Expand Down Expand Up @@ -149,7 +138,7 @@ export interface UALike {
pub_gruu?: string | null;
temp_gruu?: string | null;
};
readonly transport: TransportLike;
readonly transport: Transport;
}

/**
Expand Down Expand Up @@ -829,7 +818,7 @@ export class IncomingMessage {
export class IncomingRequest extends IncomingMessage {
ua: UALike;
ruri: URI;
transport: TransportLike | null;
transport: Transport | null;
server_transaction: ServerTransactionLike | null;

constructor({ ua, ruri, ...params }: IncomingRequestParams) {
Expand Down
4 changes: 2 additions & 2 deletions src/Socket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ export interface Socket {

ondisconnect(error: boolean, code?: number, reason?: string): void;

ondata<T>(event: T): void;
ondata(data: string | ArrayBuffer): void;
}

export interface WeightedSocket {
socket: Socket;
weight: number;
weight?: number;
}

export const isSocket = (socket: unknown): socket is Socket => {
Expand Down
34 changes: 0 additions & 34 deletions src/Transport.d.ts

This file was deleted.

Loading
Loading