@@ -133,6 +133,7 @@ impl TsConfig {
133133 }
134134
135135 /// Inherits settings from the given tsconfig into `self`.
136+ #[ allow( clippy:: cognitive_complexity, clippy:: too_many_lines) ]
136137 pub ( crate ) fn extend_tsconfig ( & mut self , tsconfig : & Self ) {
137138 let compiler_options = self . compiler_options_mut ( ) ;
138139
@@ -171,6 +172,31 @@ impl TsConfig {
171172 }
172173 }
173174
175+ if compiler_options. emit_decorator_metadata . is_none ( ) {
176+ if let Some ( emit_decorator_metadata) =
177+ tsconfig. compiler_options ( ) . emit_decorator_metadata ( )
178+ {
179+ compiler_options. set_emit_decorator_metadata ( * emit_decorator_metadata) ;
180+ }
181+ }
182+
183+ if compiler_options. use_define_for_class_fields . is_none ( ) {
184+ if let Some ( use_define_for_class_fields) =
185+ tsconfig. compiler_options ( ) . use_define_for_class_fields ( )
186+ {
187+ compiler_options. set_use_define_for_class_fields ( * use_define_for_class_fields) ;
188+ }
189+ }
190+
191+ if compiler_options. rewrite_relative_import_extensions . is_none ( ) {
192+ if let Some ( rewrite_relative_import_extensions) =
193+ tsconfig. compiler_options ( ) . rewrite_relative_import_extensions ( )
194+ {
195+ compiler_options
196+ . set_rewrite_relative_import_extensions ( * rewrite_relative_import_extensions) ;
197+ }
198+ }
199+
174200 if compiler_options. jsx ( ) . is_none ( ) {
175201 if let Some ( jsx) = tsconfig. compiler_options ( ) . jsx ( ) {
176202 compiler_options. set_jsx ( jsx. to_string ( ) ) ;
@@ -475,15 +501,35 @@ impl CompilerOptions {
475501 self . experimental_decorators = Some ( experimental_decorators) ;
476502 }
477503
478- // /// Whether to emit decorator metadata.
479- // fn emit_decorator_metadata(&self) -> Option<&bool> {
480- // self.emit_decorator_metadata.as_ref()
481- // }
504+ /// Whether to emit decorator metadata.
505+ fn emit_decorator_metadata ( & self ) -> Option < & bool > {
506+ self . emit_decorator_metadata . as_ref ( )
507+ }
508+
509+ /// Sets whether to emit decorator metadata.
510+ fn set_emit_decorator_metadata ( & mut self , emit_decorator_metadata : bool ) {
511+ self . emit_decorator_metadata = Some ( emit_decorator_metadata) ;
512+ }
513+
514+ /// Whether to use define for class fields.
515+ fn use_define_for_class_fields ( & self ) -> Option < & bool > {
516+ self . use_define_for_class_fields . as_ref ( )
517+ }
482518
483- // /// Sets whether to emit decorator metadata.
484- // fn set_emit_decorator_metadata(&mut self, emit_decorator_metadata: bool) {
485- // self.emit_decorator_metadata = Some(emit_decorator_metadata);
486- // }
519+ /// Sets whether to use define for class fields.
520+ fn set_use_define_for_class_fields ( & mut self , use_define_for_class_fields : bool ) {
521+ self . use_define_for_class_fields = Some ( use_define_for_class_fields) ;
522+ }
523+
524+ /// Whether to rewrite relative import extensions.
525+ fn rewrite_relative_import_extensions ( & self ) -> Option < & bool > {
526+ self . rewrite_relative_import_extensions . as_ref ( )
527+ }
528+
529+ /// Sets whether to rewrite relative import extensions.
530+ fn set_rewrite_relative_import_extensions ( & mut self , rewrite_relative_import_extensions : bool ) {
531+ self . rewrite_relative_import_extensions = Some ( rewrite_relative_import_extensions) ;
532+ }
487533
488534 /// JSX.
489535 fn jsx ( & self ) -> Option < & str > {
0 commit comments