Skip to content

Commit 2d9a8e6

Browse files
authored
fix: remove tslib usage and fix Long method alias (#415)
1 parent e5f0d7c commit 2d9a8e6

File tree

3 files changed

+36
-3
lines changed

3 files changed

+36
-3
lines changed

src/bson.ts

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,40 @@ import { BSONSymbol } from './symbol';
2121
import { Timestamp } from './timestamp';
2222
export { BinaryExtended, BinaryExtendedLegacy, BinarySequence } from './binary';
2323
export { CodeExtended } from './code';
24-
export * from './constants';
24+
export {
25+
BSON_BINARY_SUBTYPE_BYTE_ARRAY,
26+
BSON_BINARY_SUBTYPE_DEFAULT,
27+
BSON_BINARY_SUBTYPE_FUNCTION,
28+
BSON_BINARY_SUBTYPE_MD5,
29+
BSON_BINARY_SUBTYPE_USER_DEFINED,
30+
BSON_BINARY_SUBTYPE_UUID,
31+
BSON_BINARY_SUBTYPE_UUID_NEW,
32+
BSON_DATA_ARRAY,
33+
BSON_DATA_BINARY,
34+
BSON_DATA_BOOLEAN,
35+
BSON_DATA_CODE,
36+
BSON_DATA_CODE_W_SCOPE,
37+
BSON_DATA_DATE,
38+
BSON_DATA_DBPOINTER,
39+
BSON_DATA_DECIMAL128,
40+
BSON_DATA_INT,
41+
BSON_DATA_LONG,
42+
BSON_DATA_MAX_KEY,
43+
BSON_DATA_MIN_KEY,
44+
BSON_DATA_NULL,
45+
BSON_DATA_NUMBER,
46+
BSON_DATA_OBJECT,
47+
BSON_DATA_OID,
48+
BSON_DATA_REGEXP,
49+
BSON_DATA_STRING,
50+
BSON_DATA_SYMBOL,
51+
BSON_DATA_TIMESTAMP,
52+
BSON_DATA_UNDEFINED,
53+
BSON_INT32_MAX,
54+
BSON_INT32_MIN,
55+
BSON_INT64_MAX,
56+
BSON_INT64_MIN
57+
} from './constants';
2558
export { DBRefLike } from './db_ref';
2659
export { Decimal128Extended } from './decimal128';
2760
export { DoubleExtended } from './double';

src/long.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ export class Long {
560560
}
561561
/** This is an alias of {@link Long.greaterThanOrEqual} */
562562
ge(other: string | number | Long | Timestamp): boolean {
563-
return this.greaterThan(other);
563+
return this.greaterThanOrEqual(other);
564564
}
565565

566566
/** Tests if this Long's value is even. */

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
],
1515
"outDir": "lib",
1616
// We don't make use of tslib helpers
17-
"importHelpers": true,
17+
"importHelpers": false,
1818
"noEmitHelpers": false,
1919
"noEmitOnError": true,
2020
// make use of import type where applicable

0 commit comments

Comments
 (0)