@@ -32,6 +32,8 @@ pub struct TsGoLintState {
3232 fix : bool ,
3333 /// If `true`, request that suggestions be returned from `tsgolint`.
3434 fix_suggestions : bool ,
35+ /// If `true`, include TypeScript compiler syntactic and semantic diagnostics.
36+ experimental_type_check : bool ,
3537}
3638
3739impl TsGoLintState {
@@ -46,6 +48,7 @@ impl TsGoLintState {
4648 silent : false ,
4749 fix : fix_kind. contains ( FixKind :: Fix ) ,
4850 fix_suggestions : fix_kind. contains ( FixKind :: Suggestion ) ,
51+ experimental_type_check : false ,
4952 }
5053 }
5154
@@ -67,6 +70,7 @@ impl TsGoLintState {
6770 silent : false ,
6871 fix : fix_kind. contains ( FixKind :: Fix ) ,
6972 fix_suggestions : fix_kind. contains ( FixKind :: Suggestion ) ,
73+ experimental_type_check : false ,
7074 } )
7175 }
7276
@@ -80,6 +84,15 @@ impl TsGoLintState {
8084 self
8185 }
8286
87+ /// Set to `true` to include TypeScript compiler syntactic and semantic diagnostics.
88+ ///
89+ /// Default is `false`.
90+ #[ must_use]
91+ pub fn with_type_check ( mut self , yes : bool ) -> Self {
92+ self . experimental_type_check = yes;
93+ self
94+ }
95+
8396 /// # Panics
8497 /// - when `stdin` of subprocess cannot be opened
8598 /// - when `stdout` of subprocess cannot be opened
@@ -548,6 +561,8 @@ impl TsGoLintState {
548561 } )
549562 . collect ( ) ,
550563 source_overrides,
564+ report_syntactic : self . experimental_type_check ,
565+ report_semantic : self . experimental_type_check ,
551566 }
552567 }
553568}
@@ -573,6 +588,8 @@ pub struct Payload {
573588 pub version : i32 ,
574589 pub configs : Vec < Config > ,
575590 pub source_overrides : Option < FxHashMap < String , String > > ,
591+ pub report_syntactic : bool ,
592+ pub report_semantic : bool ,
576593}
577594
578595#[ derive( Debug , Clone , Serialize , Deserialize ) ]
0 commit comments