pub enum TsType {
String,
Number,
Boolean,
Null,
Optional(Box<TsType>),
Array(Box<TsType>),
Object(Vec<TsField>),
Named(String),
Void,
Raw(String),
}Expand description
TypeScript type representation
Variants§
String
string
Number
number
Boolean
boolean
Null
null
Optional(Box<TsType>)
T | null
Array(Box<TsType>)
T[]
Object(Vec<TsField>)
{ field: Type, ... }
Named(String)
Named interface reference (e.g., UserResponse)
Void
void
Raw(String)
Raw TS type string (escape hatch)
Implementations§
Trait Implementations§
impl StructuralPartialEq for TsType
Auto Trait Implementations§
impl Freeze for TsType
impl RefUnwindSafe for TsType
impl Send for TsType
impl Sync for TsType
impl Unpin for TsType
impl UnsafeUnpin for TsType
impl UnwindSafe for TsType
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