Struct swc_ecma_codegen::Config
source · [−]pub struct Config {
pub target: EsVersion,
pub ascii_only: bool,
pub minify: bool,
pub omit_last_semi: bool,
}
Fields
target: EsVersion
The target runtime environment.
This defaults to EsVersion::latest because it preserves input as much as possible.
Note: This does not verifies if output is valid for the target runtime.
e.g. const foo = 1;
with EsVersion::Es3 will emitted as const foo = 1
without verification.
This is because it’s not a concern of the code generator.
ascii_only: bool
Forces the code generator to use only ascii characters.
This is useful for environments that do not support unicode.
minify: bool
omit_last_semi: bool
If true, the code generator will emit the lastest semicolon.
Defaults to false
.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
sourcefn 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
impl Copy for Config
Auto Trait Implementations
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more