pub enum ModuleDetection {
Auto,
Legacy,
Force,
}Expand description
Specify how TypeScript determine a file as module. See more: https://www.typescriptlang.org/tsconfig/#moduleDetection
Variants§
Auto
TypeScript will not only look for import and export statements, but it will also check whether the “type” field in a package.json is set to “module” when running with module: nodenext or node16, and check whether the current file is a JSX file when running under jsx: react-jsx
Legacy
The same behavior as 4.6 and prior, usings import and export statements to determine whether a file is a module.
Force
Ensures that every non-declaration file is treated as a module.
Trait Implementations§
Source§impl Clone for ModuleDetection
impl Clone for ModuleDetection
Source§fn clone(&self) -> ModuleDetection
fn clone(&self) -> ModuleDetection
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModuleDetection
impl Debug for ModuleDetection
Source§impl Default for ModuleDetection
impl Default for ModuleDetection
Source§fn default() -> ModuleDetection
fn default() -> ModuleDetection
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ModuleDetection
impl<'de> Deserialize<'de> for ModuleDetection
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ModuleDetection
impl Display for ModuleDetection
Source§impl PartialEq for ModuleDetection
impl PartialEq for ModuleDetection
Source§impl Serialize for ModuleDetection
impl Serialize for ModuleDetection
impl Copy for ModuleDetection
impl Eq for ModuleDetection
impl StructuralPartialEq for ModuleDetection
Auto Trait Implementations§
impl Freeze for ModuleDetection
impl RefUnwindSafe for ModuleDetection
impl Send for ModuleDetection
impl Sync for ModuleDetection
impl Unpin for ModuleDetection
impl UnsafeUnpin for ModuleDetection
impl UnwindSafe for ModuleDetection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.