Skip to content

App is failing while running locally, Unhandelled runtime error #236

@sumitmalik51

Description

@sumitmalik51

image
chat-session-list.tsx
error-message

Text
Argument of type '(prevUserInfo: UserInfoProps) => { chatId: any; input: string; userId: string; userName: string; firstName: string; lastName: string; age: number; riskLevel: string; annualHouseholdIncome: number; favoriteBook: string; favoriteAdvisor: string; }' is not assignable to parameter of type 'SetStateAction<{ input: string; userId: string; userName: string; chatId: string | undefined; firstName: string; lastName: string; age: number; authorRole: number; riskLevel: string; annualHouseholdIncome: number; favoriteBook: string; favoriteAdvisor: string; }>'.
Type '(prevUserInfo: UserInfoProps) => { chatId: any; input: string; userId: string; userName: string; firstName: string; lastName: string; age: number; riskLevel: string; annualHouseholdIncome: number; favoriteBook: string; favoriteAdvisor: string; }' is not assignable to type '(prev: { input: string; userId: string; userName: string; chatId: string | undefined; firstName: string; lastName: string; age: number; authorRole: number; riskLevel: string; annualHouseholdIncome: number; favoriteBook: string; favoriteAdvisor: string; }) => { ...; }'.
Types of parameters 'prevUserInfo' and 'prev' are incompatible.
Type '{ input: string; userId: string; userName: string; chatId: string | undefined; firstName: string; lastName: string; age: number; authorRole: number; riskLevel: string; annualHouseholdIncome: number; favoriteBook: string; favoriteAdvisor: string; }' is not assignable to type 'UserInfoProps'.
Types of property 'chatId' are incompatible.
Type 'string | undefined' is not assignable to type 'string'.
Type 'undefined' is not assignable to type 'string'.ts(2345)
const randomChatSession: any

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions