pub struct Config {
pub output: Option<PathBuf>,
pub export_style: ExportStyle,
pub declaration_only: bool,
pub header: Option<String>,
pub esm_extensions: bool,
pub include_utilities: bool,
}Expand description
Configuration for TypeScript generation
Fields§
§output: Option<PathBuf>Output file path (required for file-based generation)
export_style: ExportStyleExport style for generated types
declaration_only: boolWhether to generate .d.ts (declarations only) vs .ts
header: Option<String>Custom header comment to prepend
esm_extensions: boolWhether to add ESM-style .js extensions to imports (for future multi-file mode)
include_utilities: boolInclude common utility types (Prettify, etc.) in the output
Implementations§
Source§impl Config
impl Config
Sourcepub fn export_style(self, style: ExportStyle) -> Self
pub fn export_style(self, style: ExportStyle) -> Self
Set the export style
Sourcepub fn declaration_only(self) -> Self
pub fn declaration_only(self) -> Self
Generate .d.ts declaration file instead of .ts
Sourcepub fn esm_extensions(self) -> Self
pub fn esm_extensions(self) -> Self
Enable ESM-style .js extensions in imports (for future multi-file mode)
Sourcepub fn include_utilities(self) -> Self
pub fn include_utilities(self) -> Self
Include common utility types (Prettify, etc.) in the generated output
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for 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