Skip to content

Commit

Permalink
Use indexOf() instead of includes()
Browse files Browse the repository at this point in the history
  • Loading branch information
lowr committed Nov 19, 2021
1 parent 54e34ca commit fcc38fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43560,7 +43560,7 @@ namespace ts {
function checkNumericLiteralValueSize(node: NumericLiteral) {
// We should test against `getTextOfNode(node)` rather than `node.text`, because `node.text` for large numeric literals can contain "."
// e.g. `node.text` for numeric literal `1100000000000000000000` is `1.1e21`.
const isFractional = getTextOfNode(node).includes(".");
const isFractional = getTextOfNode(node).indexOf(".") !== -1;
const isScientific = node.numericLiteralFlags & TokenFlags.Scientific;

// Scientific notation (e.g. 2e54 and 1e00000000010) can't be converted to bigint
Expand Down

0 comments on commit fcc38fc

Please sign in to comment.