pub struct TranslateOptions {
pub use_node_subcommand: bool,
pub add_unstable_flags: bool,
pub add_standalone_config: bool,
pub wrap_eval_code: bool,
}Expand description
Options for controlling translation behavior
Fields§
§use_node_subcommand: boolUse “deno node” as base command (for standalone CLI) When false, uses “deno run” (for child_process spawning)
add_unstable_flags: boolAdd unstable Node.js compat flags (–unstable-node-globals, –unstable-bare-node-builtins, –unstable-detect-cjs)
add_standalone_config: boolAdd standalone config overrides (–node-modules-dir=manual, –no-config) Only appropriate for the standalone node shim CLI, not for child processes
wrap_eval_code: boolWrap eval code for Node.js compatibility (builtin modules as globals)
Implementations§
Source§impl TranslateOptions
impl TranslateOptions
Sourcepub fn for_node_cli() -> Self
pub fn for_node_cli() -> Self
Options for standalone node shim CLI
Sourcepub fn for_child_process() -> Self
pub fn for_child_process() -> Self
Options for child_process spawning within Deno
Sourcepub fn for_shell_command() -> Self
pub fn for_shell_command() -> Self
Options for transforming commands embedded in shell strings. Like child_process but without eval wrapping, since the shell handles quoting and wrapping would introduce metacharacters.
Trait Implementations§
Source§impl Clone for TranslateOptions
impl Clone for TranslateOptions
Source§fn clone(&self) -> TranslateOptions
fn clone(&self) -> TranslateOptions
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 TranslateOptions
impl Debug for TranslateOptions
Source§impl Default for TranslateOptions
impl Default for TranslateOptions
Source§fn default() -> TranslateOptions
fn default() -> TranslateOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TranslateOptions
impl RefUnwindSafe for TranslateOptions
impl Send for TranslateOptions
impl Sync for TranslateOptions
impl Unpin for TranslateOptions
impl UnsafeUnpin for TranslateOptions
impl UnwindSafe for TranslateOptions
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