Struct stc_ts_file_analyzer::analyzer::types::NormalizeTypeOpts
source · [−]pub(crate) struct NormalizeTypeOpts {
pub preserve_mapped: bool,
pub preserve_typeof: bool,
pub normalize_keywords: bool,
pub preserve_global_this: bool,
pub preserve_intersection: bool,
pub preserve_union: bool,
pub merge_union_elements: bool,
pub process_only_key: bool,
pub expand_enum_def: bool,
pub preserve_keyof: bool,
}
Expand description
All fields defaults to false.
Fields
preserve_mapped: bool
preserve_typeof: bool
normalize_keywords: bool
Should we normalize keywords as interfaces?
preserve_global_this: bool
Should we preserve typeof globalThis
?
preserve_intersection: bool
Should we preserve Type::Intersection?
preserve_union: bool
Should we preserve Type::Union?
merge_union_elements: bool
If true
, true | false
becomes boolean
and E.**
of enum will be
merged as E
if E and all variants are selected.
process_only_key: bool
expand_enum_def: bool
If true
, Type::Enum will be expanded as a union of string
and
Type::EnumVariant.
preserve_keyof: bool
Trait Implementations
sourceimpl Clone for NormalizeTypeOpts
impl Clone for NormalizeTypeOpts
sourcefn clone(&self) -> NormalizeTypeOpts
fn clone(&self) -> NormalizeTypeOpts
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 moresourceimpl Debug for NormalizeTypeOpts
impl Debug for NormalizeTypeOpts
sourceimpl Default for NormalizeTypeOpts
impl Default for NormalizeTypeOpts
sourcefn default() -> NormalizeTypeOpts
fn default() -> NormalizeTypeOpts
Returns the “default value” for a type. Read more
impl Copy for NormalizeTypeOpts
Auto Trait Implementations
impl RefUnwindSafe for NormalizeTypeOpts
impl Send for NormalizeTypeOpts
impl Sync for NormalizeTypeOpts
impl Unpin for NormalizeTypeOpts
impl UnwindSafe for NormalizeTypeOpts
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