mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-09 08:21:50 +00:00
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
This commit is contained in:
parent
3705625b74
commit
c1927d2342
1 changed files with 2 additions and 2 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue