Skip to content

Commit

Permalink
fix: remove tslib usage and fix Long method alias (#415)
Browse files Browse the repository at this point in the history
  • Loading branch information
nbbeeken authored Dec 1, 2020
1 parent e5f0d7c commit 2d9a8e6
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 3 deletions.
35 changes: 34 additions & 1 deletion src/bson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,40 @@ import { BSONSymbol } from './symbol';
import { Timestamp } from './timestamp';
export { BinaryExtended, BinaryExtendedLegacy, BinarySequence } from './binary';
export { CodeExtended } from './code';
export * from './constants';
export {
BSON_BINARY_SUBTYPE_BYTE_ARRAY,
BSON_BINARY_SUBTYPE_DEFAULT,
BSON_BINARY_SUBTYPE_FUNCTION,
BSON_BINARY_SUBTYPE_MD5,
BSON_BINARY_SUBTYPE_USER_DEFINED,
BSON_BINARY_SUBTYPE_UUID,
BSON_BINARY_SUBTYPE_UUID_NEW,
BSON_DATA_ARRAY,
BSON_DATA_BINARY,
BSON_DATA_BOOLEAN,
BSON_DATA_CODE,
BSON_DATA_CODE_W_SCOPE,
BSON_DATA_DATE,
BSON_DATA_DBPOINTER,
BSON_DATA_DECIMAL128,
BSON_DATA_INT,
BSON_DATA_LONG,
BSON_DATA_MAX_KEY,
BSON_DATA_MIN_KEY,
BSON_DATA_NULL,
BSON_DATA_NUMBER,
BSON_DATA_OBJECT,
BSON_DATA_OID,
BSON_DATA_REGEXP,
BSON_DATA_STRING,
BSON_DATA_SYMBOL,
BSON_DATA_TIMESTAMP,
BSON_DATA_UNDEFINED,
BSON_INT32_MAX,
BSON_INT32_MIN,
BSON_INT64_MAX,
BSON_INT64_MIN
} from './constants';
export { DBRefLike } from './db_ref';
export { Decimal128Extended } from './decimal128';
export { DoubleExtended } from './double';
Expand Down
2 changes: 1 addition & 1 deletion src/long.ts
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ export class Long {
}
/** This is an alias of {@link Long.greaterThanOrEqual} */
ge(other: string | number | Long | Timestamp): boolean {
return this.greaterThan(other);
return this.greaterThanOrEqual(other);
}

/** Tests if this Long's value is even. */
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
],
"outDir": "lib",
// We don't make use of tslib helpers
"importHelpers": true,
"importHelpers": false,
"noEmitHelpers": false,
"noEmitOnError": true,
// make use of import type where applicable
Expand Down

0 comments on commit 2d9a8e6

Please sign in to comment.