Sweep small typecheck nits: union expansions + React 19 JSX + extra arg

- 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.
This commit is contained in:
simoleo89
2026-05-11 20:55:00 +02:00
parent 96b61ff67b
commit feba672d08
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -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';
@@ -83,7 +83,7 @@ export const UserContainerView: FC<{
__html: LocalizeText(
'extendedprofile.friends.count',
['count'],
[userProfile.friendsCount]
[userProfile.friendsCount.toString()]
)
}}
/>
@@ -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';
+1 -1
View File
@@ -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 };