Methods marked as [JSInvokable]
must be public.
using Microsoft.JSInterop;
class Test
{
[JSInvokable]
public void A() {}
[JSInvokable]
internal void B() {} // non-compliant, the method is internal
[JSInvokable]
static void C() {} // non-compliant, the method is private
}";