File tree Expand file tree Collapse file tree 5 files changed +22
-3
lines changed
Expand file tree Collapse file tree 5 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -2312,7 +2312,6 @@ pub enum ExportDefaultDeclarationKind<'a> {
23122312 FunctionDeclaration ( Box <' a, Function <' a>>) = 64 ,
23132313 ClassDeclaration ( Box <' a, Class <' a>>) = 65 ,
23142314
2315- #[ visit( ignore) ]
23162315 TSInterfaceDeclaration ( Box <' a, TSInterfaceDeclaration <' a>>) = 66 ,
23172316
23182317 // `Expression` variants added here by `inherit_variants!` macro
Original file line number Diff line number Diff line change @@ -4154,10 +4154,12 @@ pub mod walk {
41544154 visitor. visit_function ( it, flags)
41554155 }
41564156 ExportDefaultDeclarationKind :: ClassDeclaration ( it) => visitor. visit_class ( it) ,
4157+ ExportDefaultDeclarationKind :: TSInterfaceDeclaration ( it) => {
4158+ visitor. visit_ts_interface_declaration ( it)
4159+ }
41574160 match_expression ! ( ExportDefaultDeclarationKind ) => {
41584161 visitor. visit_expression ( it. to_expression ( ) )
41594162 }
4160- _ => { }
41614163 }
41624164 }
41634165
Original file line number Diff line number Diff line change @@ -4396,10 +4396,12 @@ pub mod walk_mut {
43964396 visitor. visit_function ( it, flags)
43974397 }
43984398 ExportDefaultDeclarationKind :: ClassDeclaration ( it) => visitor. visit_class ( it) ,
4399+ ExportDefaultDeclarationKind :: TSInterfaceDeclaration ( it) => {
4400+ visitor. visit_ts_interface_declaration ( it)
4401+ }
43994402 match_expression ! ( ExportDefaultDeclarationKind ) => {
44004403 visitor. visit_expression ( it. to_expression_mut ( ) )
44014404 }
4402- _ => { }
44034405 }
44044406 }
44054407
Original file line number Diff line number Diff line change @@ -120,6 +120,15 @@ source: crates/oxc_linter/src/tester.rs
120120 ╰────
121121 help : Use an ` type` instead of a ` interface`
122122
123+ ⚠ typescript - eslint (consistent - type - definitions ): Use an ` type` instead of a ` interface`
124+ ╭─[consistent_type_definitions .tsx :2 :19 ]
125+ 1 │
126+ 2 │ export default interface Test {
127+ · ─────────
128+ 3 │ bar(): string ;
129+ ╰────
130+ help: Use an `type ` instead of a `interface `
131+
123132 ⚠ typescript - eslint(consistent -type -definitions ): Use an `interface ` instead of a `type `
124133 ╭─[consistent_type_definitions.tsx:2:19]
125134 1 │
Original file line number Diff line number Diff line change @@ -15,6 +15,13 @@ source: crates/oxc_linter/src/tester.rs
1515 ╰────
1616 help : The function type form `() => string` is generally preferred when possible for being more succinct.
1717
18+ ⚠ typescript-eslint(prefer -function -type ): Enforce using function types instead of interfaces with call signatures .
19+ ╭─[prefer_function_type.tsx:1:47]
20+ 1 │ export default interface Foo { /** comment */ (): string ; }
21+ · ───────────
22+ ╰────
23+ help : The function type form `() => string` is generally preferred when possible for being more succinct.
24+
1825 ⚠ typescript-eslint(prefer -function -type ): Enforce using function types instead of interfaces with call signatures .
1926 ╭─[prefer_function_type.tsx:4:11]
2027 3 │ // comment
You can’t perform that action at this time.
0 commit comments