Skip to content

Commit 4c0c3e7

Browse files
committed
rm: plus operand ignores
1 parent 5d2b054 commit 4c0c3e7

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/parser/serializer.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -841,8 +841,7 @@ export function serializeInto(
841841
} else if (value['_bsontype'] === 'MinKey' || value['_bsontype'] === 'MaxKey') {
842842
index = serializeMinMax(buffer, key, value, index, true);
843843
} else if (typeof value['_bsontype'] !== 'undefined') {
844-
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
845-
throw new BSONTypeError('Unrecognized or invalid _bsontype: ' + value['_bsontype']);
844+
throw new BSONTypeError(`Unrecognized or invalid _bsontype: ${String(value['_bsontype'])}`);
846845
}
847846
}
848847
} else if (object instanceof Map || isMap(object)) {
@@ -943,8 +942,7 @@ export function serializeInto(
943942
} else if (value['_bsontype'] === 'MinKey' || value['_bsontype'] === 'MaxKey') {
944943
index = serializeMinMax(buffer, key, value, index);
945944
} else if (typeof value['_bsontype'] !== 'undefined') {
946-
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
947-
throw new BSONTypeError('Unrecognized or invalid _bsontype: ' + value['_bsontype']);
945+
throw new BSONTypeError(`Unrecognized or invalid _bsontype: ${String(value['_bsontype'])}`);
948946
}
949947
}
950948
} else {
@@ -1049,8 +1047,7 @@ export function serializeInto(
10491047
} else if (value['_bsontype'] === 'MinKey' || value['_bsontype'] === 'MaxKey') {
10501048
index = serializeMinMax(buffer, key, value, index);
10511049
} else if (typeof value['_bsontype'] !== 'undefined') {
1052-
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
1053-
throw new BSONTypeError('Unrecognized or invalid _bsontype: ' + value['_bsontype']);
1050+
throw new BSONTypeError(`Unrecognized or invalid _bsontype: ${String(value['_bsontype'])}`);
10541051
}
10551052
}
10561053
}

0 commit comments

Comments
 (0)