File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -451,10 +451,10 @@ function createInterface(msg: p.RequestMessage): m.Message {
451451
452452 return response ;
453453 } else
454- if ( isReactComponent ) {
454+ if ( extension !== c . resExt ) {
455455 let params : p . ShowMessageParams = {
456456 type : p . MessageType . Error ,
457- message : `Cannot create an interface for a file containing @react.component .` ,
457+ message : `Not a ${ c . resExt } file. Cannot create an interface for it .` ,
458458 } ;
459459
460460 let response : m . NotificationMessage = {
@@ -465,10 +465,10 @@ function createInterface(msg: p.RequestMessage): m.Message {
465465
466466 return response ;
467467 } else
468- if ( extension !== c . resExt ) {
468+ if ( isReactComponent ) {
469469 let params : p . ShowMessageParams = {
470470 type : p . MessageType . Error ,
471- message : `Not a ${ c . resExt } file. Cannot create an interface for it .` ,
471+ message : `Cannot create an interface for a file containing @react.component .` ,
472472 } ;
473473
474474 let response : m . NotificationMessage = {
You can’t perform that action at this time.
0 commit comments