pub struct TypeScriptCodegen { /* private fields */ }Expand description
Code generator for TypeScript definitions from symbol tables.
This generator creates TypeScript interface and type definitions from TensorLogic schemas, enabling type-safe TypeScript development.
Implementations§
Source§impl TypeScriptCodegen
impl TypeScriptCodegen
Sourcepub fn with_exports(self, enable: bool) -> Self
pub fn with_exports(self, enable: bool) -> Self
Set whether to export types.
Sourcepub fn with_jsdoc(self, enable: bool) -> Self
pub fn with_jsdoc(self, enable: bool) -> Self
Set whether to include JSDoc comments.
Sourcepub fn with_validators(self, enable: bool) -> Self
pub fn with_validators(self, enable: bool) -> Self
Set whether to generate validator functions.
Sourcepub fn generate(&self, table: &SymbolTable) -> String
pub fn generate(&self, table: &SymbolTable) -> String
Generate complete TypeScript module from a symbol table.
Auto Trait Implementations§
impl Freeze for TypeScriptCodegen
impl RefUnwindSafe for TypeScriptCodegen
impl Send for TypeScriptCodegen
impl Sync for TypeScriptCodegen
impl Unpin for TypeScriptCodegen
impl UnwindSafe for TypeScriptCodegen
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