Comply with noImplicitAny (#9940)

* Stash noImplicitAny work

* Stash

* Fix imports

* Iterate

* Fix tests

* Delint

* Fix tests
This commit is contained in:
Michael Telatynski
2023-02-13 11:39:16 +00:00
committed by GitHub
parent ac7f69216e
commit 61a63e47f4
359 changed files with 1621 additions and 1353 deletions
+3 -3
View File
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import React from "react";
import React, { ReactNode } from "react";
/**
* Joins an array into one value with a joiner. E.g. join(["hello", "world"], " ") -> <span>hello world</span>
@@ -22,8 +22,8 @@ import React from "react";
* @param joiner the string/JSX.Element to join with
* @returns the joined array
*/
export function jsxJoin(array: Array<string | JSX.Element>, joiner?: string | JSX.Element): JSX.Element {
const newArray = [];
export function jsxJoin(array: ReactNode[], joiner?: string | JSX.Element): JSX.Element {
const newArray: ReactNode[] = [];
array.forEach((element, index) => {
newArray.push(element, index === array.length - 1 ? null : joiner);
});