Struct typescript_type_def::type_expr::TypeIntersection
source · pub struct TypeIntersection {
pub docs: Option<Docs>,
pub members: List<TypeExpr>,
}
Expand description
A TypeScript intersection type.
Note that not all valid TypeScript intersection types are possible to represent using JSON. In general, only object types with disjoint fields can be intersected and still be accurately encoded as JSON (the resulting type being an object with the combined fields of all the intersection members).
Fields§
§docs: Option<Docs>
The documentation for this intersection.
members: List<TypeExpr>
The types that comprise this intersection.
If the members are empty, this type describes the vacuous intersection
type which is equivalent to any
. If the members contain only one
type, this type is equivalent to that type.
Trait Implementations§
source§impl Clone for TypeIntersection
impl Clone for TypeIntersection
source§fn clone(&self) -> TypeIntersection
fn clone(&self) -> TypeIntersection
Returns a copy 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 TypeIntersection
impl Debug for TypeIntersection
impl Copy for TypeIntersection
Auto Trait Implementations§
impl RefUnwindSafe for TypeIntersection
impl Send for TypeIntersection
impl Sync for TypeIntersection
impl Unpin for TypeIntersection
impl UnwindSafe for TypeIntersection
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