Skip to content

Commit

Permalink
fix(isolated-declarations): infer BigInt number as bigint type (#3806)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dunqing committed Jun 21, 2024
1 parent 4e241fc commit d8ecce5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions crates/oxc_isolated_declarations/src/inferrer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ impl<'a> IsolatedDeclarations<'a> {
match expr {
Expression::BooleanLiteral(_) => Some(self.ast.ts_boolean_keyword(SPAN)),
Expression::NullLiteral(_) => Some(self.ast.ts_null_keyword(SPAN)),
Expression::NumericLiteral(_) | Expression::BigintLiteral(_) => {
Some(self.ast.ts_number_keyword(SPAN))
}
Expression::NumericLiteral(_) => Some(self.ast.ts_number_keyword(SPAN)),
Expression::BigintLiteral(_) => Some(self.ast.ts_bigint_keyword(SPAN)),
Expression::StringLiteral(_) => Some(self.ast.ts_string_keyword(SPAN)),
Expression::TemplateLiteral(lit) => {
if lit.expressions.is_empty() {
Expand Down

0 comments on commit d8ecce5

Please sign in to comment.