pub trait DeclarationExpression: PartialEq + Clone + Debug + Send + Sync + Visitable {
    // Required methods
    fn decl_from_reader(
        reader: &mut impl TokenReader<TSXToken, TokenStart>,
        state: &mut ParsingState,
        options: &ParseOptions
    ) -> ParseResult<Self>;
    fn decl_to_string_from_buffer<T: ToString>(
        &self,
        buf: &mut T,
        options: &ToStringOptions,
        depth: u8
    );
    fn get_decl_position(&self) -> Option<&Span>;
    fn as_option_expr_ref(&self) -> Option<&Expression>;
    fn as_option_expr_mut(&mut self) -> Option<&mut Expression>;
}
Expand description

This is for const declarations vs let and var declarations

Required Methods§

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl DeclarationExpression for Option<Expression>

Implementors§