pub trait VariableFieldKind: PartialEq + Eq + Debug + Clone + 'static {
    type OptionalExpression: PartialEq + Eq + Debug + Clone + Sync + Send;

    // Required methods
    fn optional_expression_from_reader(
        reader: &mut impl TokenReader<TSXToken, TokenStart>,
        state: &mut ParsingState,
        options: &ParseOptions
    ) -> Result<Self::OptionalExpression, ParseError>;
    fn optional_expression_to_string_from_buffer<T: ToString>(
        optional_expression: &Self::OptionalExpression,
        buf: &mut T,
        options: &ToStringOptions,
        depth: u8
    );
    fn optional_expression_get_position(
        optional_expression: &Self::OptionalExpression
    ) -> Option<&Span>;
}
Expand description

Variable field can be used in type annotations but cannot have a value

TODO value assignment this is VariableOrFieldAccess thingy

TODO could have get_optional_expression_as_option(&Self::OptionalExpression) -> Option

Required Associated Types§

Required Methods§

Object Safety§

This trait is not object safe.

Implementors§