mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-24 18:26:27 +00:00
Comply with noImplicitAny (#9940)
* Stash noImplicitAny work * Stash * Fix imports * Iterate * Fix tests * Delint * Fix tests
This commit is contained in:
committed by
GitHub
parent
ac7f69216e
commit
61a63e47f4
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user