@@ -4,11 +4,7 @@ import { BaseLogger } from "../common/logging";
44
55interface Notifier {
66 missingMethod ( signature : string ) : void ;
7- inconsistentSupported (
8- signature : string ,
9- expectedSupported : boolean ,
10- actualSupported : boolean ,
11- ) : void ;
7+ inconsistentSupported ( signature : string , expectedSupported : boolean ) : void ;
128}
139
1410export function checkConsistency (
@@ -48,11 +44,7 @@ function checkMethodConsistency(
4844 ) ;
4945
5046 if ( method . supported !== expectSupported ) {
51- notifier . inconsistentSupported (
52- method . signature ,
53- expectSupported ,
54- method . supported ,
55- ) ;
47+ notifier . inconsistentSupported ( method . signature , expectSupported ) ;
5648 }
5749}
5850
@@ -65,13 +57,13 @@ export class DefaultNotifier implements Notifier {
6557 ) ;
6658 }
6759
68- inconsistentSupported (
69- signature : string ,
70- expectedSupported : boolean ,
71- actualSupported : boolean ,
72- ) {
60+ inconsistentSupported ( signature : string , expectedSupported : boolean ) {
61+ const expectedMessage = expectedSupported
62+ ? `Expected method to be supported, but it is not.`
63+ : `Expected method to not be supported, but it is.` ;
64+
7365 void this . logger . log (
74- `Model editor query consistency check: Inconsistent supported flag for method ${ signature } . Expected supported: ${ expectedSupported } , actual supported: ${ actualSupported } . ` ,
66+ `Model editor query consistency check: Inconsistent supported flag for method ${ signature } . ${ expectedMessage } ` ,
7567 ) ;
7668 }
7769}
0 commit comments