File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -2203,6 +2203,10 @@ The following patterns are not considered problems:
22032203` ` ` js
22042204type foo = { foo: string, ... };
22052205
2206+ interface Foo { foo: string }
2207+
2208+ declare class Foo { foo: string }
2209+
22062210type foo = {| | };
22072211
22082212type foo = {| bar: string | };
Original file line number Diff line number Diff line change @@ -12,6 +12,10 @@ const create = (context) => {
1212 ObjectTypeAnnotation ( node ) {
1313 const { inexact, exact} = node ;
1414
15+ if ( ! node . hasOwnProperty ( 'inexact' ) ) {
16+ return ;
17+ }
18+
1519 if ( always && ! inexact && ! exact ) {
1620 context . report ( {
1721 message : 'Type must be explicit inexact.' ,
Original file line number Diff line number Diff line change @@ -65,6 +65,12 @@ export default {
6565 {
6666 code : 'type foo = { foo: string, ... };'
6767 } ,
68+ {
69+ code : 'interface Foo { foo: string }'
70+ } ,
71+ {
72+ code : 'declare class Foo { foo: string }'
73+ } ,
6874 {
6975 code : 'type foo = {| |};'
7076 } ,
You can’t perform that action at this time.
0 commit comments