Commit 93df614 for jssip.net
commit 93df6142bbd394e63ad8a40e78e93f56b60df439
Author: José Luis Millán <jmillan@aliax.net>
Date: Wed Dec 2 12:49:29 2026 +0100
doc: use @remarks rather than NOTE
diff --git a/src/Configuration.ts b/src/Configuration.ts
index bec5f29..a3a1d20 100644
--- a/src/Configuration.ts
+++ b/src/Configuration.ts
@@ -314,7 +314,7 @@ type MandatoryParam = 'uri' | 'sockets';
type OptionalParam = Exclude<keyof Configuration, MandatoryParam | 'via_host'>;
/**
- * NOTE: A check receives whatever the application passed, hence `unknown`.
+ * A check receives whatever the application passed, hence `unknown`.
* Its return type is tied to the configuration parameter it populates, so a
* check can neither skip validating its input nor produce a value that
* parameter would not accept.
@@ -590,7 +590,7 @@ const checks: {
};
/**
- * NOTE: `dst[key] = value` cannot be expressed when `key` is a union, as
+ * `dst[key] = value` cannot be expressed when `key` is a union, as
* TypeScript then requires the value to satisfy every member at once. The
* check that matters, that a check returns what its setting accepts, is
* already enforced by `ConfigCheck`.
diff --git a/src/Dialog.ts b/src/Dialog.ts
index 62c362e..8996db9 100644
--- a/src/Dialog.ts
+++ b/src/Dialog.ts
@@ -157,7 +157,7 @@ export class Dialog {
#outgoing_ack_seqnum: number | null = null;
/**
- * NOTE: Only set while there is a sequence number to remember.
+ * Only set while there is a sequence number to remember.
* `#local_seqnum` is lazily initialized by `#createRequest()` on dialogs
* created by an incoming request.
*/
@@ -172,7 +172,7 @@ export class Dialog {
#route_set: string[];
/**
- * NOTE: Private so that a dialog can only be built through `Create()`, which
+ * Private so that a dialog can only be built through `Create()`, which
* is the one that rejects a message that cannot establish one. That is what
* lets every field above be definitely assigned.
*/
@@ -229,7 +229,7 @@ export class Dialog {
}
/**
- * NOTE: `Dialog/RequestSender` reads it.
+ * `Dialog/RequestSender` reads it.
*/
get ua(): DialogUA {
return this.#ua;
diff --git a/src/DigestAuthentication.ts b/src/DigestAuthentication.ts
index bc062db..3ce39a9 100644
--- a/src/DigestAuthentication.ts
+++ b/src/DigestAuthentication.ts
@@ -4,7 +4,7 @@ import { calculateMD5, createRandomToken } from './Utils';
const logger = new Logger('DigestAuthentication');
/**
- * NOTE: All of them are nullable because they come straight from the UA
+ * All of them are nullable because they come straight from the UA
* configuration, whose defaults are `null`.
*/
export type DigestCredentials = {
@@ -55,7 +55,8 @@ export class DigestAuthentication {
/**
* Get the generated Digest "response" value.
*
- * NOTE: Exposed for testing purposes only.
+ * @remarks
+ * - Exposed for testing purposes only.
*/
get response(): string | undefined {
return this.#response;
diff --git a/src/Grammar.d.ts b/src/Grammar.d.ts
index a6abd86..b2064fc 100644
--- a/src/Grammar.d.ts
+++ b/src/Grammar.d.ts
@@ -98,8 +98,9 @@ export type StatusLine = {
/**
* Result of the `Request_Response` start rule when it matches a `Request_Line`.
*
- * NOTE: `uri` is only set when the Request-URI is a SIP URI. `Request_URI` also
- * accepts an `absoluteURI`, which the grammar does not turn into a `URI`.
+ * @remarks
+ * - `uri` is only set when the Request-URI is a SIP URI. `Request_URI` also
+ * accepts an `absoluteURI`, which the grammar does not turn into a `URI`.
*/
export type RequestLine = {
method: string;
diff --git a/src/IncomingMessageBuilder.ts b/src/IncomingMessageBuilder.ts
index 272be57..734b98b 100644
--- a/src/IncomingMessageBuilder.ts
+++ b/src/IncomingMessageBuilder.ts
@@ -29,14 +29,14 @@ export class IncomingMessageBuilder {
#call_id?: string;
#cseq?: number;
/**
- * NOTE: The method as given by the CSeq header field. A response takes its
+ * The method as given by the CSeq header field. A response takes its
* `method` from here, a request takes it from the request line.
*/
#cseq_method?: string;
#from?: NameAddrHeader;
#to?: NameAddrHeader;
/**
- * NOTE: `null` when the tag parameter is present but valueless (`;tag`),
+ * `null` when the tag parameter is present but valueless (`;tag`),
* `undefined` when it is absent altogether.
*/
#from_tag?: string | null;
diff --git a/src/RequestSender.ts b/src/RequestSender.ts
index 9f128b2..2a7daf6 100644
--- a/src/RequestSender.ts
+++ b/src/RequestSender.ts
@@ -58,7 +58,7 @@ const DEFAULT_EVENT_HANDLERS: RequestSenderEventHandlers = {
export class RequestSender {
/**
- * NOTE: Not set by the constructor. Set by `send()`, which every applicant
+ * Not set by the constructor. Set by `send()`, which every applicant
* calls right after construction.
*/
clientTransaction?: ClientTransaction;
diff --git a/src/SIPMessage.ts b/src/SIPMessage.ts
index cf49b92..bbd2781 100644
--- a/src/SIPMessage.ts
+++ b/src/SIPMessage.ts
@@ -68,8 +68,9 @@ export type SDP = {
/**
* A header value as stored by an `OutgoingRequest`.
*
- * NOTE: It is not just `string` because `Max-Forwards` is stored as the
- * `JsSIP_C.MAX_FORWARDS` number.
+ * @remarks
+ * - It is not just `string` because `Max-Forwards` is stored as the
+ * {@link Constants.MAX_FORWARDS} number.
*/
export type OutgoingHeaderValue = string | number;
@@ -251,7 +252,7 @@ export class OutgoingRequest {
cseq: number;
/**
- * NOTE: `declare` makes TypeScript generate no field declaration for
+ * `declare` makes TypeScript generate no field declaration for
* these, so they do not become own properties set to `undefined` on every
* instance, which is what `useDefineForClassFields` would otherwise do.
* `sdp` is created by `parseSDP()` and `transaction` is assigned by
@@ -583,7 +584,7 @@ export class OutgoingRequest {
*/
export class InitialOutgoingInviteRequest extends OutgoingRequest {
/**
- * NOTE: Unlike in `OutgoingRequest`, declared normally, so every instance
+ * Unlike in `OutgoingRequest`, declared normally, so every instance
* gets it as an own property initialized to `null`.
*/
override transaction: ClientTransactionLike | null = null;
diff --git a/src/Transactions.ts b/src/Transactions.ts
index d62b038..9ae8846 100644
--- a/src/Transactions.ts
+++ b/src/Transactions.ts
@@ -90,7 +90,7 @@ export class NonInviteClientTransaction extends EventEmitter {
eventHandlers: ClientTransactionEventHandlers;
/**
- * NOTE: Not set by the constructor. `state` is set by `stateChanged()` and
+ * Not set by the constructor. `state` is set by `stateChanged()` and
* the timer handles when their timers are armed.
*/
state?: Status;
@@ -207,7 +207,7 @@ export class InviteClientTransaction extends EventEmitter {
eventHandlers: ClientTransactionEventHandlers;
/**
- * NOTE: Not set by the constructor. `state` is set by `stateChanged()` and
+ * Not set by the constructor. `state` is set by `stateChanged()` and
* the timer handles when their timers are armed.
*/
state?: Status;
@@ -450,7 +450,7 @@ export class NonInviteServerTransaction extends EventEmitter {
state: Status;
/**
- * NOTE: Not set by the constructor. `transportError` is set by
+ * Not set by the constructor. `transportError` is set by
* `onTransportError()` and `J` when its timer is armed.
*/
transportError?: boolean;
@@ -569,7 +569,7 @@ export class InviteServerTransaction extends EventEmitter {
resendProvisionalTimer: ReturnType<typeof setInterval> | null;
/**
- * NOTE: Not set by the constructor. `transportError` is set by
+ * Not set by the constructor. `transportError` is set by
* `onTransportError()` and the timer handles when their timers are armed.
*/
transportError?: boolean;
diff --git a/src/Transport.ts b/src/Transport.ts
index dba8272..796523a 100644
--- a/src/Transport.ts
+++ b/src/Transport.ts
@@ -50,7 +50,7 @@ export type TransportConnectingEvent = {
};
/**
- * NOTE: `socket` holds the `Transport` itself, not the underlying socket.
+ * `socket` holds the `Transport` itself, not the underlying socket.
*/
export type TransportConnectedEvent = {
socket: Transport;
diff --git a/src/Utils.ts b/src/Utils.ts
index 0bcd054..cce5451 100644
--- a/src/Utils.ts
+++ b/src/Utils.ts
@@ -115,7 +115,9 @@ export const escapeUser = (user: string): string =>
/**
* Normalize SIP URI.
- * NOTE: It does not allow a SIP URI without username.
+ *
+ * @remarks
+ * - It does not allow a SIP URI without username.
* Accepts 'sip', 'sips' and 'tel' URIs and convert them into 'sip'.
* Detects the domain part (if given) and properly hex-escapes the user portion.
* If the user portion has only 'tel' number symbols the user portion is clean of 'tel' visual separators.