oxc_ecmascript/
is_global_reference.rs

1use oxc_ast::ast::IdentifierReference;
2
3pub trait IsGlobalReference: Sized {
4    /// Whether the reference is a global reference.
5    ///
6    /// - None means it is unknown.
7    /// - Some(true) means it is a global reference.
8    /// - Some(false) means it is not a global reference.
9    fn is_global_reference(&self, reference: &IdentifierReference<'_>) -> Option<bool>;
10}
11
12pub struct WithoutGlobalReferenceInformation;
13
14impl IsGlobalReference for WithoutGlobalReferenceInformation {
15    fn is_global_reference(&self, _reference: &IdentifierReference<'_>) -> Option<bool> {
16        None
17    }
18}