pub struct PrinterOptions {Show 14 fields
pub remove_comments: bool,
pub target: ScriptTarget,
pub single_quote: bool,
pub omit_trailing_semicolon: bool,
pub no_emit_helpers: bool,
pub module: ModuleKind,
pub new_line: NewLineKind,
pub downlevel_iteration: bool,
pub type_only_nodes: Arc<HashSet<NodeIndex, FxBuildHasher>>,
pub always_strict: bool,
pub use_define_for_class_fields: bool,
pub legacy_decorators: bool,
pub es_module_interop: bool,
pub module_detection_force: bool,
}Expand description
Printer configuration options.
Fields§
§remove_comments: boolRemove comments from output
target: ScriptTargetTarget ECMAScript version
single_quote: boolUse single quotes for strings
omit_trailing_semicolon: boolOmit trailing semicolons
no_emit_helpers: boolDon’t emit helpers
module: ModuleKindModule kind
new_line: NewLineKindNew line character
downlevel_iteration: boolDownlevel iteration (for-of with full iterator protocol)
type_only_nodes: Arc<HashSet<NodeIndex, FxBuildHasher>>Set of import specifier nodes that should be elided (type-only imports)
always_strict: boolEmit “use strict” for every source file
use_define_for_class_fields: boolEmit class fields using Object.defineProperty semantics when downleveling
legacy_decorators: boolEnable legacy (experimental) decorator lowering (__decorate style)
es_module_interop: boolEmit interop helpers (__importStar, __importDefault) for CJS/ESM interop
module_detection_force: boolWhen true, treat all non-declaration files as modules (moduleDetection=force)
Trait Implementations§
Source§impl Clone for PrinterOptions
impl Clone for PrinterOptions
Source§fn clone(&self) -> PrinterOptions
fn clone(&self) -> PrinterOptions
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 PrinterOptions
impl Debug for PrinterOptions
Source§impl Default for PrinterOptions
impl Default for PrinterOptions
Source§fn default() -> PrinterOptions
fn default() -> PrinterOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PrinterOptions
impl RefUnwindSafe for PrinterOptions
impl Send for PrinterOptions
impl Sync for PrinterOptions
impl Unpin for PrinterOptions
impl UnsafeUnpin for PrinterOptions
impl UnwindSafe for PrinterOptions
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more