Skip to content

Commit 6787372

Browse files
authored
chore(jsapi): jsdoc fixes, missing types (#326)
- Updated all JSDoc references from `{@link}` to inline code formatting for consistency. - Corrected a typo in the `Lister<T>` type description. - Exported additional types: `PubHeaders`, `PrioritizedOptions`, `KvPurgeOptions`, and `KvKeyCodec`. Signed-off-by: Alberto Ricart <[email protected]>
1 parent 597d5e7 commit 6787372

File tree

6 files changed

+15
-8
lines changed

6 files changed

+15
-8
lines changed

jetstream/src/internal_mod.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ export type {
147147
OverflowOptions,
148148
PeerInfo,
149149
Placement,
150+
PrioritizedOptions,
150151
PriorityGroups,
151152
PriorityPolicy,
152153
PullOptions,

jetstream/src/jsapi_types.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ export type StreamState = {
608608
"num_deleted": number;
609609
/**
610610
* IDs of messages that were deleted using the Message Delete API or Interest-based streams removing messages out of order
611-
* {@link StreamInfoRequestOptions.deleted_details} is specified on
611+
* when `StreamInfoRequestOptions.deleted_details` is specified on
612612
* the request.
613613
*/
614614
deleted: number[];
@@ -1006,7 +1006,7 @@ export type ConsumerConfig = ConsumerUpdateConfig & {
10061006
*/
10071007
"deliver_group"?: string;
10081008
/**
1009-
* A unique name for a durable consumer. Set {@link name} for ephemeral consumers
1009+
* A unique name for a durable consumer. Set `name` for ephemeral consumers
10101010
*/
10111011
"durable_name"?: string;
10121012
/**
@@ -1120,12 +1120,12 @@ export type ConsumerUpdateConfig = PriorityGroups & {
11201120
"mem_storage"?: boolean;
11211121
/**
11221122
* Deliver only messages that match the subject filter
1123-
* This is exclusive of {@link filter_subjects}
1123+
* This is exclusive of `filter_subjects`
11241124
*/
11251125
"filter_subject"?: string;
11261126
/**
11271127
* Deliver only messages that match the specified filters.
1128-
* This is exclusive of {@link filter_subject}.
1128+
* This is exclusive of `filter_subject`.
11291129
*/
11301130
"filter_subjects"?: string[];
11311131
/**
@@ -1238,7 +1238,7 @@ export type PullOptions =
12381238
"no_wait": boolean;
12391239
/**
12401240
* If set, the number of milliseconds to wait for the number of messages
1241-
* specified in {@link batch}
1241+
* specified in `batch`
12421242
*/
12431243
expires: number;
12441244
/**
@@ -1307,7 +1307,7 @@ export const PubHeaders = {
13071307
"Nats-Expected-Last-Subject-Sequence-Subject",
13081308
/**
13091309
* Sets the TTL for a message (Nanos value). Only have effect on streams that
1310-
* enable {@link StreamConfig#allow_msg_ttl}.
1310+
* enable `StreamConfig.allow_msg_ttl`.
13111311
*/
13121312
MessageTTL: "Nats-TTL",
13131313
Schedule: "Nats-Schedule",

jetstream/src/mod.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export {
2626
JetStreamApiError,
2727
JetStreamError,
2828
JsHeaders,
29+
PubHeaders,
2930
ReplayPolicy,
3031
RepublishHeaders,
3132
RetentionPolicy,
@@ -124,6 +125,7 @@ export type {
124125
OverflowOptions,
125126
PeerInfo,
126127
Placement,
128+
PrioritizedOptions,
127129
PriorityGroups,
128130
PriorityPolicy,
129131
PubAck,

jetstream/src/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ export type JetStreamPublishOptions = {
213213

214214
/**
215215
* Sets {@link PubHeaders.MessageTTL} this only applies to streams that enable
216-
* {@link StreamConfig#allow_msg_ttl}. The format of this value is "1s" or "1h",
216+
* `StreamConfig.allow_msg_ttl`. The format of this value is "1s" or "1h",
217217
* etc, or a plain number interpreted as the number of seconds.
218218
*/
219219
ttl?: string;
@@ -250,7 +250,7 @@ export type Destroyable = {
250250
};
251251

252252
/**
253-
* An type for listing. Returns a promise with typed list.
253+
* A generic type for listing. Returns a promise with typed list.
254254
*/
255255
export type Lister<T> = {
256256
[Symbol.asyncIterator](): AsyncIterator<T>;

kv/src/internal_mod.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export type {
88
KvLimits,
99
KvOptions,
1010
KvPayloadCodec,
11+
KvPurgeOptions,
1112
KvPutOptions,
1213
KvStatus,
1314
KvWatchEntry,

kv/src/mod.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ export type {
44
KvCodecs,
55
KvDeleteOptions,
66
KvEntry,
7+
KvKeyCodec,
78
KvLimits,
89
KvOptions,
10+
KvPayloadCodec,
11+
KvPurgeOptions,
912
KvPutOptions,
1013
KvStatus,
1114
KvWatchEntry,

0 commit comments

Comments
 (0)