Skip to content

Commit

Permalink
docs(NODE-4158): Annotate BSON classes with a category (#496)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kwabena Ampofo authored Apr 20, 2022
1 parent 7faeb17 commit cadd628
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/binary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export interface BinaryExtended {
/**
* A class representation of the BSON Binary type.
* @public
* @category BSONType
*/
export class Binary {
_bsontype!: 'Binary';
Expand Down
1 change: 1 addition & 0 deletions src/code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export interface CodeExtended {
/**
* A class representation of the BSON Code type.
* @public
* @category BSONType
*/
export class Code {
_bsontype!: 'Code';
Expand Down
1 change: 1 addition & 0 deletions src/db_ref.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export function isDBRefLike(value: unknown): value is DBRefLike {
/**
* A class representation of the BSON DBRef type.
* @public
* @category BSONType
*/
export class DBRef {
_bsontype!: 'DBRef';
Expand Down
1 change: 1 addition & 0 deletions src/decimal128.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ export interface Decimal128Extended {
/**
* A class representation of the BSON Decimal128 type.
* @public
* @category BSONType
*/
export class Decimal128 {
_bsontype!: 'Decimal128';
Expand Down
1 change: 1 addition & 0 deletions src/double.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export interface DoubleExtended {
/**
* A class representation of the BSON Double type.
* @public
* @category BSONType
*/
export class Double {
_bsontype!: 'Double';
Expand Down
1 change: 1 addition & 0 deletions src/int_32.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export interface Int32Extended {
/**
* A class representation of a BSON Int32 type.
* @public
* @category BSONType
*/
export class Int32 {
_bsontype!: 'Int32';
Expand Down
1 change: 1 addition & 0 deletions src/long.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export interface LongExtended {
/**
* A class representing a 64-bit integer
* @public
* @category BSONType
* @remarks
* The internal representation of a long is the two given signed, 32-bit values.
* We use 32-bit pieces because these are the size of integers on which
Expand Down
1 change: 1 addition & 0 deletions src/max_key.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export interface MaxKeyExtended {
/**
* A class representation of the BSON MaxKey type.
* @public
* @category BSONType
*/
export class MaxKey {
_bsontype!: 'MaxKey';
Expand Down
1 change: 1 addition & 0 deletions src/min_key.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export interface MinKeyExtended {
/**
* A class representation of the BSON MinKey type.
* @public
* @category BSONType
*/
export class MinKey {
_bsontype!: 'MinKey';
Expand Down
1 change: 1 addition & 0 deletions src/objectid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const kId = Symbol('id');
/**
* A class representation of the BSON ObjectId type.
* @public
* @category BSONType
*/
export class ObjectId {
_bsontype!: 'ObjectID';
Expand Down
1 change: 1 addition & 0 deletions src/regexp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export interface BSONRegExpExtended {
/**
* A class representation of the BSON RegExp type.
* @public
* @category BSONType
*/
export class BSONRegExp {
_bsontype!: 'BSONRegExp';
Expand Down
1 change: 1 addition & 0 deletions src/symbol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export interface BSONSymbolExtended {
/**
* A class representation of the BSON Symbol type.
* @public
* @category BSONType
*/
export class BSONSymbol {
_bsontype!: 'Symbol';
Expand Down
5 changes: 4 additions & 1 deletion src/timestamp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ export interface TimestampExtended {
};
}

/** @public */
/**
* @public
* @category BSONType
* */
export class Timestamp extends LongWithoutOverridesClass {
_bsontype!: 'Timestamp';

Expand Down
9 changes: 9 additions & 0 deletions tsdoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json",
"tagDefinitions": [
{
"syntaxKind": "block",
"tagName": "@category"
}
]
}

0 comments on commit cadd628

Please sign in to comment.