bson 5.0.0-alpha.2 → 5.0.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/symbol.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { BSON_MAJOR_VERSION } from './constants';
1
+ import { BSONValue } from './bson_value';
2
2
 
3
3
  /** @public */
4
4
  export interface BSONSymbolExtended {
@@ -10,20 +10,17 @@ export interface BSONSymbolExtended {
10
10
  * @public
11
11
  * @category BSONType
12
12
  */
13
- export class BSONSymbol {
13
+ export class BSONSymbol extends BSONValue {
14
14
  get _bsontype(): 'BSONSymbol' {
15
15
  return 'BSONSymbol';
16
16
  }
17
- /** @internal */
18
- get [Symbol.for('@@mdb.bson.version')](): BSON_MAJOR_VERSION {
19
- return BSON_MAJOR_VERSION;
20
- }
21
17
 
22
18
  value!: string;
23
19
  /**
24
20
  * @param value - the string representing the symbol.
25
21
  */
26
22
  constructor(value: string) {
23
+ super();
27
24
  this.value = value;
28
25
  }
29
26
 
@@ -36,7 +33,6 @@ export class BSONSymbol {
36
33
  return this.value;
37
34
  }
38
35
 
39
- /** @internal */
40
36
  inspect(): string {
41
37
  return `new BSONSymbol("${this.value}")`;
42
38
  }
package/src/timestamp.ts CHANGED
@@ -1,4 +1,3 @@
1
- import { BSON_MAJOR_VERSION } from './constants';
2
1
  import { BSONError } from './error';
3
2
  import type { Int32 } from './int_32';
4
3
  import { Long } from './long';
@@ -33,10 +32,6 @@ export class Timestamp extends LongWithoutOverridesClass {
33
32
  get _bsontype(): 'Timestamp' {
34
33
  return 'Timestamp';
35
34
  }
36
- /** @internal */
37
- get [Symbol.for('@@mdb.bson.version')](): BSON_MAJOR_VERSION {
38
- return BSON_MAJOR_VERSION;
39
- }
40
35
 
41
36
  static readonly MAX_VALUE = Long.MAX_UNSIGNED_VALUE;
42
37