Skip to content

Commit

Permalink
feat(ast): add ArrowFunctionExpression::has_use_strict_directive me…
Browse files Browse the repository at this point in the history
…thod
  • Loading branch information
overlookmotel committed Dec 10, 2024
1 parent b09ef48 commit f7b9a2f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/oxc_ast/src/ast_impl/js.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1094,6 +1094,11 @@ impl<'a> ArrowFunctionExpression<'a> {
}
None
}

/// Returns `true` if this arrow function's body has a `"use strict"` directive.
pub fn has_use_strict_directive(&self) -> bool {
self.body.has_use_strict_directive()
}
}

impl Class<'_> {
Expand Down

0 comments on commit f7b9a2f

Please sign in to comment.