Repository: dotnet/runtime
File: src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.UnitTests/System/Runtime/InteropServices/JavaScript/JavaScriptTestHelper.cs (C#)

Code before:
        [JSImport("storeAt", "JavaScriptTestHelper")]
        [return: JSMarshalAs<JSType.Number>]
        internal static partial byte? store_ByteArray([JSMarshalAs<JSType.Array<JSType.Number>>] byte[]? value, [JSMarshalAs<JSType.Number>] int index);

        [JSImport("echo1", "JavaScriptTestHelper")]
        [return: JSMarshalAs<JSType.Array<JSType.Number>>]
        internal static partial int[]? echo1_Int32Array([JSMarshalAs<JSType.Array<JSType.Number>>] int[]? value);

        [JSImport("storeAt", "JavaScriptTestHelper")]
        [return: JSMarshalAs<JSType.Number>]
        internal static partial int? store_Int32Array([JSMarshalAs<JSType.Array<JSType.Number>>] int[]? value, [JSMarshalAs<JSType.Number>] int index);

        [JSImport("echo1", "JavaScriptTestHelper")]
        [return: JSMarshalAs<JSType.Array<JSType.Number>>]
        internal static partial double[]? echo1_DoubleArray([JSMarshalAs<JSType.Array<JSType.Number>>] double[]? value);

        [JSImport("storeAt", "JavaScriptTestHelper")]
        [return: JSMarshalAs<JSType.Number>]
        internal static partial double? store_DoubleArray([JSMarshalAs<JSType.Array<JSType.Number>>] double[]? value, [JSMarshalAs<JSType.Number>] int index);

        [JSImport("echo1", "JavaScriptTestHelper")]
        [return: JSMarshalAs<JSType.Array<JSType.Number>>]
        internal static partial float[]? echo1_SingleArray([JSMarshalAs<JSType.Array<JSType.Number>>] float[]? value);

        [JSImport("storeAt", "JavaScriptTestHelper")]
        [return: JSMarshalAs<JSType.Number>]
        internal static partial float? store_SingleArray([JSMarshalAs<JSType.Array<JSType.Number>>] float[]? value, [JSMarshalAs<JSType.Number>] int index);

        [JSImport("echo1", "JavaScriptTestHelper")]
        [return: JSMarshalAs<JSType.Array<JSType.String>>]
        internal static partial string[]? echo1_StringArray([JSMarshalAs<JSType.Array<JSType.String>>] string[]? value);

        [JSImport("storeAt", "JavaScriptTestHelper")]
        [return: JSMarshalAs<JSType.String>]
        internal static partial string? store_StringArray([JSMarshalAs<JSType.Array<JSType.String>>] string[]? value, [JSMarshalAs<JSType.Number>] int index);

        [JSImport("echo1", "JavaScriptTestHelper")]
        [return: JSMarshalAs<JSType.Array<JSType.Any>>]
        internal static partial object[]? echo1_ObjectArray([JSMarshalAs<JSType.Array<JSType.Any>>] object[]? value);

        [JSImport("storeAt", "JavaScriptTestHelper")]
        [return: JSMarshalAs<JSType.Any>]
        internal static partial object? store_ObjectArray([JSMarshalAs<JSType.Array<JSType.Any>>] object[]? value, [JSMarshalAs<JSType.Number>] int index);

        [JSImport("echo1", "JavaScriptTestHelper")]
        [return: JSMarshalAs<JSType.Array<JSType.Object>>]
        internal static partial JSObject[]? echo1_JSObjectArray([JSMarshalAs<JSType.Array<JSType.Object>>] JSObject[]? value);

        [JSImport("storeAt", "JavaScriptTestHelper")]
        [return: JSMarshalAs<JSType.Object>]
        internal static partial JSObject? store_JSObjectArray([JSMarshalAs<JSType.Array<JSType.Object>>] JSObject[]? value, [JSMarshalAs<JSType.Number>] int index);

Review comment (suggestion):
Could you please add few signatures without `JSMarshalAs` annotations. They should work fine too.

Code after:
        [JSImport("storeAt", "JavaScriptTestHelper")]
        [return: JSMarshalAs<JSType.Number>]
        internal static partial byte? store_ByteArray([JSMarshalAs<JSType.Array<JSType.Number>>] byte[]? value, [JSMarshalAs<JSType.Number>] int index);

        [JSImport("echo1", "JavaScriptTestHelper")]
        [return: JSMarshalAs<JSType.Array<JSType.Number>>]
        internal static partial int[]? echo1_Int32Array([JSMarshalAs<JSType.Array<JSType.Number>>] int[]? value);

        [JSImport("storeAt", "JavaScriptTestHelper")]
        [return: JSMarshalAs<JSType.Number>]
        internal static partial int? store_Int32Array([JSMarshalAs<JSType.Array<JSType.Number>>] int[]? value, [JSMarshalAs<JSType.Number>] int index);

        [JSImport("echo1", "JavaScriptTestHelper")]
        [return: JSMarshalAs<JSType.Array<JSType.Number>>]
        internal static partial double[]? echo1_DoubleArray([JSMarshalAs<JSType.Array<JSType.Number>>] double[]? value);
        [JSImport("echo1", "JavaScriptTestHelper")]
        internal static partial double[]? echo1_DoubleArray_NoAttributes(double[]? value);

        [JSImport("storeAt", "JavaScriptTestHelper")]
        [return: JSMarshalAs<JSType.Number>]
        internal static partial double? store_DoubleArray([JSMarshalAs<JSType.Array<JSType.Number>>] double[]? value, [JSMarshalAs<JSType.Number>] int index);

        [JSImport("storeAt", "JavaScriptTestHelper")]
        internal static partial double? store_DoubleArray_NoAttributes(double[]? value, int index);

        [JSImport("echo1", "JavaScriptTestHelper")]
        [return: JSMarshalAs<JSType.Array<JSType.Number>>]
        internal static partial float[]? echo1_SingleArray([JSMarshalAs<JSType.Array<JSType.Number>>] float[]? value);

        [JSImport("echo1", "JavaScriptTestHelper")]
        internal static partial float[]? echo1_SingleArray_NoAttributes(float[]? value);

        [JSImport("storeAt", "JavaScriptTestHelper")]
        [return: JSMarshalAs<JSType.Number>]
        internal static partial float? store_SingleArray([JSMarshalAs<JSType.Array<JSType.Number>>] float[]? value, [JSMarshalAs<JSType.Number>] int index);

        [JSImport("storeAt", "JavaScriptTestHelper")]
        internal static partial float? store_SingleArray_NoAttributes(float[]? value, int index);

        [JSImport("echo1", "JavaScriptTestHelper")]
        [return: JSMarshalAs<JSType.Array<JSType.String>>]
        internal static partial string[]? echo1_StringArray([JSMarshalAs<JSType.Array<JSType.String>>] string[]? value);

        [JSImport("storeAt", "JavaScriptTestHelper")]
        [return: JSMarshalAs<JSType.String>]
        internal static partial string? store_StringArray([JSMarshalAs<JSType.Array<JSType.String>>] string[]? value, [JSMarshalAs<JSType.Number>] int index);

        [JSImport("echo1", "JavaScriptTestHelper")]
        [return: JSMarshalAs<JSType.Array<JSType.Any>>]
        internal static partial object[]? echo1_ObjectArray([JSMarshalAs<JSType.Array<JSType.Any>>] object[]? value);