Skip to content

Commit b271145

Browse files
authored
feat: resolve emitDecoratorMetadata in tsconfig (#439)
1 parent 69ba3ed commit b271145

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

src/tsconfig.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,14 @@ pub trait CompilerOptions {
273273
/// Sets whether to enable experimental decorators.
274274
fn set_experimental_decorators(&mut self, _experimental_decorators: bool) {}
275275

276+
/// Whether to emit decorator metadata.
277+
fn emit_decorator_metadata(&self) -> Option<&bool> {
278+
None
279+
}
280+
281+
/// Sets whether to emit decorator metadata.
282+
fn set_emit_decorator_metadata(&mut self, _emit_decorator_metadata: bool) {}
283+
276284
/// JSX.
277285
fn jsx(&self) -> Option<&str> {
278286
None

src/tsconfig_serde.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ pub struct CompilerOptionsSerde {
114114
/// <https://www.typescriptlang.org/tsconfig/#experimentalDecorators>
115115
pub experimental_decorators: Option<bool>,
116116

117+
/// <https://www.typescriptlang.org/tsconfig/#emitDecoratorMetadata>
118+
pub emit_decorator_metadata: Option<bool>,
119+
117120
/// <https://www.typescriptlang.org/tsconfig/#jsx>
118121
pub jsx: Option<String>,
119122

@@ -167,6 +170,14 @@ impl CompilerOptions for CompilerOptionsSerde {
167170
self.experimental_decorators = Some(experimental_decorators);
168171
}
169172

173+
fn emit_decorator_metadata(&self) -> Option<&bool> {
174+
self.emit_decorator_metadata.as_ref()
175+
}
176+
177+
fn set_emit_decorator_metadata(&mut self, emit_decorator_metadata: bool) {
178+
self.emit_decorator_metadata = Some(emit_decorator_metadata);
179+
}
180+
170181
fn jsx(&self) -> Option<&str> {
171182
self.jsx.as_deref()
172183
}

0 commit comments

Comments
 (0)