pub struct TypeScriptBuilder<'config> {
pub erase_types: bool,
/* private fields */
}Expand description
AST builder for the TypeScript language.
Fields§
§erase_types: boolWhether to erase types and generate a pure JS AST.
Implementations§
Source§impl<'config> TypeScriptBuilder<'config>
impl<'config> TypeScriptBuilder<'config>
Sourcepub fn new(config: &'config TypeScriptLanguage) -> Self
pub fn new(config: &'config TypeScriptLanguage) -> Self
Creates a new TypeScriptBuilder.
Sourcepub fn with_type_erasure(self, erase_types: bool) -> Self
pub fn with_type_erasure(self, erase_types: bool) -> Self
Sets whether to erase types.
Trait Implementations§
Source§impl<'config> Builder<TypeScriptLanguage> for TypeScriptBuilder<'config>
impl<'config> Builder<TypeScriptLanguage> for TypeScriptBuilder<'config>
Source§fn build<'a, S: Source + ?Sized>(
&self,
source: &'a S,
edits: &[TextEdit],
_cache: &'a mut impl BuilderCache<TypeScriptLanguage>,
) -> OakDiagnostics<TypeScriptRoot>
fn build<'a, S: Source + ?Sized>( &self, source: &'a S, edits: &[TextEdit], _cache: &'a mut impl BuilderCache<TypeScriptLanguage>, ) -> OakDiagnostics<TypeScriptRoot>
Builds the structure from the source text.
Source§impl<'config> Clone for TypeScriptBuilder<'config>
impl<'config> Clone for TypeScriptBuilder<'config>
Source§fn clone(&self) -> TypeScriptBuilder<'config>
fn clone(&self) -> TypeScriptBuilder<'config>
Returns a duplicate 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 moreAuto Trait Implementations§
impl<'config> Freeze for TypeScriptBuilder<'config>
impl<'config> RefUnwindSafe for TypeScriptBuilder<'config>
impl<'config> Send for TypeScriptBuilder<'config>
impl<'config> Sync for TypeScriptBuilder<'config>
impl<'config> Unpin for TypeScriptBuilder<'config>
impl<'config> UnsafeUnpin for TypeScriptBuilder<'config>
impl<'config> UnwindSafe for TypeScriptBuilder<'config>
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