Skip to content

Commit 15b7270

Browse files
committed
Add since JSDoc descriptors
1 parent fa6c2e9 commit 15b7270

File tree

6 files changed

+228
-0
lines changed

6 files changed

+228
-0
lines changed

src/BinaryData.ts

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const SIGNED_INTEGER_OFFSET = 2147483648;
2626
* Deals with data types as understood by _A Township Tale_ game servers.
2727
*
2828
* @see [Class: `BinaryData`](https://github.com/mdingena/att-string-transcoder/tree/main/docs/BinaryData.md)
29+
* @since v3.0.0
2930
*
3031
* @example
3132
* import { BinaryData } from 'att-string-transcoder';
@@ -59,6 +60,7 @@ export class BinaryData {
5960
* types. You may optionally provide additional options in the second argument.
6061
*
6162
* @see [Class: `BinaryData`](https://github.com/mdingena/att-string-transcoder/tree/main/docs/BinaryData.md)
63+
* @since v3.0.0
6264
*
6365
* @example
6466
* import { BinaryData } from 'att-string-transcoder';
@@ -79,6 +81,8 @@ export class BinaryData {
7981
/**
8082
* Creates a BinaryData instance from the given boolean.
8183
*
84+
* @since v3.0.0
85+
*
8286
* @example
8387
* import { BinaryData } from 'att-string-transcoder';
8488
*
@@ -93,6 +97,8 @@ export class BinaryData {
9397
/**
9498
* Creates a BinaryData instance from the given character.
9599
*
100+
* @since v3.0.0
101+
*
96102
* @example
97103
* import { BinaryData } from 'att-string-transcoder';
98104
*
@@ -108,6 +114,8 @@ export class BinaryData {
108114
/**
109115
* Creates a BinaryData instance from the given floating point number.
110116
*
117+
* @since v3.0.0
118+
*
111119
* @example
112120
* import { BinaryData } from 'att-string-transcoder';
113121
*
@@ -122,6 +130,8 @@ export class BinaryData {
122130
/**
123131
* Creates a BinaryData instance from the given number.
124132
*
133+
* @since v3.0.0
134+
*
125135
* @example
126136
* import { BinaryData } from 'att-string-transcoder';
127137
*
@@ -136,6 +146,8 @@ export class BinaryData {
136146
/**
137147
* Creates a BinaryData instance from the given signed integer.
138148
*
149+
* @since v3.0.0
150+
*
139151
* @example
140152
* import { BinaryData } from 'att-string-transcoder';
141153
*
@@ -158,6 +170,8 @@ export class BinaryData {
158170
/**
159171
* Creates a BinaryData instance from the given unsigned integer.
160172
*
173+
* @since v3.0.0
174+
*
161175
* @example
162176
* import { BinaryData } from 'att-string-transcoder';
163177
*
@@ -172,6 +186,8 @@ export class BinaryData {
172186
/**
173187
* Creates a BinaryData instance from the given comma-separated array of unsigned integers.
174188
*
189+
* @since v3.0.0
190+
*
175191
* @example
176192
* import { BinaryData } from 'att-string-transcoder';
177193
*
@@ -188,6 +204,8 @@ export class BinaryData {
188204
/**
189205
* Creates a BinaryData instance from the given unsigned long integer.
190206
*
207+
* @since v3.0.0
208+
*
191209
* @example
192210
* import { BinaryData } from 'att-string-transcoder';
193211
*
@@ -203,6 +221,8 @@ export class BinaryData {
203221
/**
204222
* Creates a BinaryData instance from the given unsigned short integer.
205223
*
224+
* @since v3.0.0
225+
*
206226
* @example
207227
* import { BinaryData } from 'att-string-transcoder';
208228
*
@@ -217,6 +237,8 @@ export class BinaryData {
217237
/**
218238
* Confirms whether `data` is a string of binary data, i.e. a string of zeroes and ones.
219239
*
240+
* @since v3.0.0
241+
*
220242
* @example
221243
* import { BinaryData } from 'att-string-transcoder';
222244
*
@@ -239,6 +261,8 @@ export class BinaryData {
239261
* This is also a type assertion function, so if the passed `string` is asserted as a
240262
* `BinaryString`, it will be considered as such after calling this function.
241263
*
264+
* @since v3.0.0
265+
*
242266
* @example
243267
* import { BinaryData } from 'att-string-transcoder';
244268
*
@@ -261,6 +285,8 @@ export class BinaryData {
261285
/**
262286
* Converts a JavaScript floating point number into an IEEE754 integer.
263287
*
288+
* @since v3.0.0
289+
*
264290
* @example
265291
* import { BinaryData } from 'att-string-transcoder';
266292
*
@@ -287,6 +313,8 @@ export class BinaryData {
287313
/**
288314
* Returns the binary data as a `BinaryString`.
289315
*
316+
* @since v3.0.0
317+
*
290318
* @example
291319
* import { BinaryData } from 'att-string-transcoder';
292320
*
@@ -302,6 +330,8 @@ export class BinaryData {
302330
/**
303331
* Returns the boolean represenation of the binary data.
304332
*
333+
* @since v3.0.0
334+
*
305335
* @example
306336
* import { BinaryData } from 'att-string-transcoder';
307337
*
@@ -319,6 +349,8 @@ export class BinaryData {
319349
/**
320350
* Returns the character represenation of the binary data.
321351
*
352+
* @since v3.0.0
353+
*
322354
* @example
323355
* import { BinaryData } from 'att-string-transcoder';
324356
*
@@ -336,6 +368,8 @@ export class BinaryData {
336368
/**
337369
* Returns the floating point number represenation of the binary data.
338370
*
371+
* @since v3.0.0
372+
*
339373
* @example
340374
* import { BinaryData } from 'att-string-transcoder';
341375
*
@@ -355,6 +389,8 @@ export class BinaryData {
355389
/**
356390
* Returns the numeric represenation of the binary data.
357391
*
392+
* @since v3.0.0
393+
*
358394
* @example
359395
* import { BinaryData } from 'att-string-transcoder';
360396
*
@@ -370,6 +406,8 @@ export class BinaryData {
370406
/**
371407
* Returns the signed integer representation of the binary data.
372408
*
409+
* @since v3.0.0
410+
*
373411
* @example
374412
* import { BinaryData } from 'att-string-transcoder';
375413
*
@@ -390,6 +428,8 @@ export class BinaryData {
390428
/**
391429
* Returns the unsigned integer representation of the binary data.
392430
*
431+
* @since v3.0.0
432+
*
393433
* @example
394434
* import { BinaryData } from 'att-string-transcoder';
395435
*
@@ -407,6 +447,8 @@ export class BinaryData {
407447
/**
408448
* Returns the binary data as a comma-separated array of unsigned integers.
409449
*
450+
* @since v3.0.0
451+
*
410452
* @example
411453
* import { BinaryData } from 'att-string-transcoder';
412454
*
@@ -426,6 +468,8 @@ export class BinaryData {
426468
/**
427469
* Returns the unsigned long integer representation of the binary data.
428470
*
471+
* @since v3.0.0
472+
*
429473
* @example
430474
* import { BinaryData } from 'att-string-transcoder';
431475
*
@@ -443,6 +487,8 @@ export class BinaryData {
443487
/**
444488
* Returns the unsigned short integer representation of the binary data.
445489
*
490+
* @since v3.0.0
491+
*
446492
* @example
447493
* import { BinaryData } from 'att-string-transcoder';
448494
*
@@ -460,6 +506,8 @@ export class BinaryData {
460506
/**
461507
* Converts an IEEE754 integer into a JavaScript floating point number.
462508
*
509+
* @since v3.0.0
510+
*
463511
* @example
464512
* import { BinaryData } from 'att-string-transcoder';
465513
*

src/BinaryReader.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { BinaryData, type BinaryDataOptions } from './BinaryData.js';
66
* Handles the controlled consumption of binary data from ATT save strings.
77
*
88
* @see [Class: `BinaryReader`](https://github.com/mdingena/att-string-transcoder/tree/main/docs/BinaryReader.md)
9+
* @since v3.0.0
910
*
1011
* @example
1112
* import { BinaryReader } from 'att-string-transcoder';
@@ -24,6 +25,7 @@ export class BinaryReader {
2425
* Creates a reader to extract information from `data` using various read methods.
2526
*
2627
* @see [Class: `BinaryReader`](https://github.com/mdingena/att-string-transcoder/tree/main/docs/BinaryReader.md)
28+
* @since v3.0.0
2729
*
2830
* @example
2931
* import { BinaryReader } from 'att-string-transcoder';
@@ -42,6 +44,8 @@ export class BinaryReader {
4244
/**
4345
* Reads the next `bitCount` bits from the binary string.
4446
*
47+
* @since v3.0.0
48+
*
4549
* @example
4650
* import { BinaryReader } from 'att-string-transcoder';
4751
*
@@ -63,6 +67,8 @@ export class BinaryReader {
6367
/**
6468
* Reads the next bit from the binary string and returns `true` for `"1"` and `false` for `"0"`.
6569
*
70+
* @since v3.0.0
71+
*
6672
* @example
6773
* import { BinaryReader } from 'att-string-transcoder';
6874
*
@@ -82,6 +88,8 @@ export class BinaryReader {
8288
/**
8389
* Reads the next 8 bits from the binary string and returns the reconstructed string character.
8490
*
91+
* @since v3.0.0
92+
*
8593
* @example
8694
* import { BinaryReader } from 'att-string-transcoder';
8795
*
@@ -105,6 +113,8 @@ export class BinaryReader {
105113
/**
106114
* Reads the next 32 bits from the binary string and returns the reconstructed floating point number.
107115
*
116+
* @since v3.0.0
117+
*
108118
* @example
109119
* import { BinaryReader } from 'att-string-transcoder';
110120
*
@@ -122,6 +132,8 @@ export class BinaryReader {
122132
/**
123133
* Reads the next 32 bits from the binary string and returns the reconstructed signed integer.
124134
*
135+
* @since v3.0.0
136+
*
125137
* @example
126138
* import { BinaryReader } from 'att-string-transcoder';
127139
*
@@ -140,6 +152,8 @@ export class BinaryReader {
140152
* Reads the next 16 bits from the binary string, then reads the number of bits as instructed and
141153
* returns the reconstructed string text.
142154
*
155+
* @since v3.0.0
156+
*
143157
* @example
144158
* import { BinaryReader } from 'att-string-transcoder';
145159
*
@@ -193,6 +207,8 @@ export class BinaryReader {
193207
/**
194208
* Reads the next 32 bits from the binary string and returns the reconstructed unsigned integer.
195209
*
210+
* @since v3.0.0
211+
*
196212
* @example
197213
* import { BinaryReader } from 'att-string-transcoder';
198214
*
@@ -210,6 +226,8 @@ export class BinaryReader {
210226
/**
211227
* Reads the next 64 bits from the binary string and returns the reconstructed unsigned long integer.
212228
*
229+
* @since v3.0.0
230+
*
213231
* @example
214232
* import { BinaryReader } from 'att-string-transcoder';
215233
*
@@ -227,6 +245,8 @@ export class BinaryReader {
227245
/**
228246
* Reads the next 16 bits from the binary string and returns the reconstructed unsigned short integer.
229247
*
248+
* @since v3.0.0
249+
*
230250
* @example
231251
* import { BinaryReader } from 'att-string-transcoder';
232252
*

0 commit comments

Comments
 (0)