Skip to content

Commit 1bf5589

Browse files
nit
1 parent 3ac6e68 commit 1bf5589

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

src/lang/js_ts.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ use crate::{BuilderConfiguration, ErrorHandlingMode, LanguageExt};
1414
impl LanguageExt for specta_typescript::Typescript {
1515
type Error = Error;
1616

17-
fn export(self, _cfg: &BuilderConfiguration, path: &Path) -> Result<(), Self::Error> {
18-
let cfg = _cfg.clone();
17+
fn export(self, cfg: &BuilderConfiguration, path: &Path) -> Result<(), Self::Error> {
18+
let cfg = cfg.clone();
19+
let types = cfg.types.clone();
1920
let format = serde_export_format(cfg.disable_serde_phases, cfg.enable_nuanced_types);
2021

2122
Exporter::from(self)
@@ -34,15 +35,16 @@ impl LanguageExt for specta_typescript::Typescript {
3435
MAKE_EVENT_IMPL_TS,
3536
)
3637
})
37-
.export_to(path, &_cfg.types, format)
38+
.export_to(path, &types, format)
3839
}
3940
}
4041

4142
impl LanguageExt for specta_typescript::JSDoc {
4243
type Error = Error;
4344

44-
fn export(self, _cfg: &BuilderConfiguration, path: &Path) -> Result<(), Self::Error> {
45-
let cfg = _cfg.clone();
45+
fn export(self, cfg: &BuilderConfiguration, path: &Path) -> Result<(), Self::Error> {
46+
let cfg = cfg.clone();
47+
let types = cfg.types.clone();
4648
let format = serde_export_format(cfg.disable_serde_phases, cfg.enable_nuanced_types);
4749

4850
Exporter::from(self)
@@ -61,7 +63,7 @@ impl LanguageExt for specta_typescript::JSDoc {
6163
MAKE_EVENT_IMPL_JS,
6264
)
6365
})
64-
.export_to(path, &_cfg.types, format)
66+
.export_to(path, &types, format)
6567
}
6668
}
6769

0 commit comments

Comments
 (0)