From c1927d2342a769ece93717ab9db97241a7e79598 Mon Sep 17 00:00:00 2001 From: xxxigm Date: Thu, 4 Jun 2026 19:48:23 +0700 Subject: [PATCH] fix(desktop): set tsconfig lib/target to ES2023 for findLast/findLastIndex The desktop code uses Array.prototype.findLast (chat/composer/index.tsx) and findLastIndex (session/hooks/use-session-actions.ts), which are ES2023 APIs, but tsconfig declared only the ES2022 lib. Some TypeScript builds tolerate this, but a correct/stricter tsc fails the desktop build with: TS2550: Property 'findLast' does not exist on type 'ChatMessage[]'. Do you need to change your target library? Try changing 'lib' to 'es2023'. Declare es2023 so the build is correct regardless of the resolved TypeScript version (reported on Windows with Node 24). Refs #38970 --- apps/desktop/tsconfig.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/desktop/tsconfig.json b/apps/desktop/tsconfig.json index e66bb7aa3aa..270dc9f126c 100644 --- a/apps/desktop/tsconfig.json +++ b/apps/desktop/tsconfig.json @@ -1,8 +1,8 @@ { "compilerOptions": { - "target": "ES2022", + "target": "ES2023", "useDefineForClassFields": true, - "lib": ["DOM", "DOM.Iterable", "ES2022"], + "lib": ["DOM", "DOM.Iterable", "ES2023"], "allowJs": false, "skipLibCheck": true, "esModuleInterop": true,