From feba672d084296e694c57cdbe1f315bb47228e55 Mon Sep 17 00:00:00 2001 From: simoleo89 Date: Mon, 11 May 2026 20:55:00 +0200 Subject: [PATCH] Sweep small typecheck nits: union expansions + React 19 JSX + extra arg MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ColorVariantType missed the 5 outline-* bootstrap variants GroupForumThreadView and GroupForumThreadListView already use; adding them clears 4 errors. - React 19 moved the JSX namespace out of the global scope into the react module; WiredNeighborhoodSelectorView referenced JSX.Element without importing it. - showConfirm() takes 7 args; the chat link confirm in useOnClickChat passed an 8th 'link' icon arg left over from an older signature. - LocalizeText placeholder array is string[]; UserContainerView passed userProfile.friendsCount (number) — call .toString(). Net tsgo error count: 97 -> 90. --- src/common/types/ColorVariantType.ts | 2 +- src/components/user-profile/UserContainerView.tsx | 2 +- .../wired/views/selectors/WiredNeighborhoodSelectorView.tsx | 2 +- src/hooks/useOnClickChat.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/types/ColorVariantType.ts b/src/common/types/ColorVariantType.ts index 945b64d..3f0047b 100644 --- a/src/common/types/ColorVariantType.ts +++ b/src/common/types/ColorVariantType.ts @@ -1 +1 @@ -export type ColorVariantType = 'primary' | 'success' | 'danger' | 'secondary' | 'link' | 'black' | 'white' | 'dark' | 'warning' | 'muted' | 'light' | 'gray'; +export type ColorVariantType = 'primary' | 'success' | 'danger' | 'secondary' | 'link' | 'black' | 'white' | 'dark' | 'warning' | 'muted' | 'light' | 'gray' | 'outline-primary' | 'outline-secondary' | 'outline-success' | 'outline-danger' | 'outline-warning'; diff --git a/src/components/user-profile/UserContainerView.tsx b/src/components/user-profile/UserContainerView.tsx index 851ccf6..029c91f 100644 --- a/src/components/user-profile/UserContainerView.tsx +++ b/src/components/user-profile/UserContainerView.tsx @@ -83,7 +83,7 @@ export const UserContainerView: FC<{ __html: LocalizeText( 'extendedprofile.friends.count', ['count'], - [userProfile.friendsCount] + [userProfile.friendsCount.toString()] ) }} /> diff --git a/src/components/wired/views/selectors/WiredNeighborhoodSelectorView.tsx b/src/components/wired/views/selectors/WiredNeighborhoodSelectorView.tsx index c042da7..a6689d8 100644 --- a/src/components/wired/views/selectors/WiredNeighborhoodSelectorView.tsx +++ b/src/components/wired/views/selectors/WiredNeighborhoodSelectorView.tsx @@ -1,5 +1,5 @@ import { GetRoomEngine } from '@nitrots/nitro-renderer'; -import { CSSProperties, FC, MouseEvent as ReactMouseEvent, useCallback, useEffect, useMemo, useState } from 'react'; +import { CSSProperties, FC, JSX, MouseEvent as ReactMouseEvent, useCallback, useEffect, useMemo, useState } from 'react'; import { FaMinus, FaPlus, FaTimes } from 'react-icons/fa'; import { MdGridOn } from 'react-icons/md'; import { LocalizeText, WiredFurniType } from '../../../../api'; diff --git a/src/hooks/useOnClickChat.ts b/src/hooks/useOnClickChat.ts index 99e02d5..96e2ae1 100644 --- a/src/hooks/useOnClickChat.ts +++ b/src/hooks/useOnClickChat.ts @@ -18,7 +18,7 @@ const useOnClickChatState = () => showConfirm(LocalizeText('chat.confirm.openurl', [ 'url' ], [ url ]), () => { window.open(url, '_blank'); - }, null, null, null, LocalizeText('generic.alert.title'), null, 'link'); + }, null, null, null, LocalizeText('generic.alert.title'), null); }; return { onClickChat };