Struct deno_ast::EmitOptions
source · [−]pub struct EmitOptions {
pub emit_metadata: bool,
pub imports_not_used_as_values: ImportsNotUsedAsValues,
pub inline_source_map: bool,
pub inline_sources: bool,
pub jsx_automatic: bool,
pub jsx_development: bool,
pub jsx_factory: String,
pub jsx_fragment_factory: String,
pub jsx_import_source: Option<String>,
pub source_map: bool,
pub transform_jsx: bool,
pub var_decl_imports: bool,
}
Expand description
Options which can be adjusted when transpiling a module.
Fields
emit_metadata: bool
When emitting a legacy decorator, also emit experimental decorator meta
data. Defaults to false
.
imports_not_used_as_values: ImportsNotUsedAsValues
What to do with import statements that only import types i.e. whether to
remove them (Remove
), keep them as side-effect imports (Preserve
)
or error (Error
). Defaults to Remove
.
inline_source_map: bool
Should the source map be inlined in the emitted code file, or provided
as a separate file. Defaults to true
.
inline_sources: bool
Should the sources be inlined in the source map. Defaults to true
.
jsx_automatic: bool
true
if the program should use an implicit JSX import source/the “new”
JSX transforms.
jsx_development: bool
If JSX is automatic, if it is in development mode, meaning that it should
import jsx-dev-runtime
and transform JSX using jsxDEV
import from the
JSX import source as well as provide additional debug information to the
JSX factory.
jsx_factory: String
When transforming JSX, what value should be used for the JSX factory.
Defaults to React.createElement
.
jsx_fragment_factory: String
When transforming JSX, what value should be used for the JSX fragment
factory. Defaults to React.Fragment
.
jsx_import_source: Option<String>
The string module specifier to implicitly import JSX factories from when transpiling JSX.
source_map: bool
Should a corresponding .map file be created for the output. This should be
false if inline_source_map is true. Defaults to false
.
transform_jsx: bool
Should JSX be transformed or preserved. Defaults to true
.
var_decl_imports: bool
Should import declarations be transformed to variable declarations using
a dynamic import. This is useful for import & export declaration support
in script contexts such as the Deno REPL. Defaults to false
.
Trait Implementations
sourceimpl Clone for EmitOptions
impl Clone for EmitOptions
sourcefn clone(&self) -> EmitOptions
fn clone(&self) -> EmitOptions
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for EmitOptions
impl Debug for EmitOptions
Auto Trait Implementations
impl RefUnwindSafe for EmitOptions
impl Send for EmitOptions
impl Sync for EmitOptions
impl Unpin for EmitOptions
impl UnwindSafe for EmitOptions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more