use super::{comments, BigIntExportBehavior, CommentFormatterFn};
pub struct ExportConfiguration {
pub(crate) bigint: BigIntExportBehavior,
pub(crate) comment_exporter: Option<CommentFormatterFn>,
#[cfg(feature = "export")]
pub(crate) export_by_default: Option<bool>,
}
impl ExportConfiguration {
pub fn new() -> Self {
Default::default()
}
pub fn bigint(mut self, bigint: BigIntExportBehavior) -> Self {
self.bigint = bigint;
self
}
pub fn comment_style(mut self, exporter: Option<CommentFormatterFn>) -> Self {
self.comment_exporter = exporter;
self
}
#[cfg(feature = "export")]
pub fn export_by_default(mut self, x: Option<bool>) -> Self {
self.export_by_default = x;
self
}
}
impl Default for ExportConfiguration {
fn default() -> Self {
Self {
bigint: Default::default(),
comment_exporter: Some(comments::js_doc),
#[cfg(feature = "export")]
export_by_default: None,
}
}
}