Skip to content

Commit

Permalink
fix(parser): fix span start for return type in function type (#2660)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudBarre committed Mar 10, 2024
1 parent c3477de commit 8226031
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/oxc_parser/src/ts/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -834,8 +834,8 @@ impl<'a> ParserImpl<'a> {
let span = self.start_span();
let type_parameters = self.parse_ts_type_parameters()?;
let (this_param, params) = self.parse_formal_parameters(FormalParameterKind::Signature)?;
self.expect(Kind::Arrow)?;
let return_type_span = self.start_span();
self.expect(Kind::Arrow)?;
let return_type = self.parse_ts_return_type()?;
let return_type = self.ast.ts_type_annotation(self.end_span(return_type_span), return_type);
Ok(self.ast.ts_function_type(
Expand Down

0 comments on commit 8226031

Please sign in to comment.