pub struct TypeScriptLanguage { /* private fields */ }
Expand description
Implementation of LanguageImpl for TypeScript
Implementations§
Source§impl TypeScriptLanguage
impl TypeScriptLanguage
pub fn new_typescript() -> Self
pub fn new_tsx() -> Self
Trait Implementations§
Source§impl LanguageImpl for TypeScriptLanguage
impl LanguageImpl for TypeScriptLanguage
Source§fn get_tree_sitter_language(&self) -> TSLanguage
fn get_tree_sitter_language(&self) -> TSLanguage
Get the tree-sitter language for parsing
Source§fn get_extension(&self) -> &'static str
fn get_extension(&self) -> &'static str
👎Deprecated since 0.1.0: this method is not used
Get the file extension for this language
Source§fn is_acceptable_parent(&self, node: &Node<'_>) -> bool
fn is_acceptable_parent(&self, node: &Node<'_>) -> bool
Check if a node is an acceptable container/parent entity
Auto Trait Implementations§
impl Freeze for TypeScriptLanguage
impl RefUnwindSafe for TypeScriptLanguage
impl Send for TypeScriptLanguage
impl Sync for TypeScriptLanguage
impl Unpin for TypeScriptLanguage
impl UnwindSafe for TypeScriptLanguage
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more