1. src/components/UserProfile.tsx:12:35 - Type '{ children: string; }' is missing the following properties from type 'UserProfileProps': user, onEdit (TS2739)
1. src/components/UserProfile.tsx:12:35 - Type '{ children: string; }' is missing the following properties from type 'UserProfileProps': user, onEdit (TS2739)
\`\`\`
SNIPPET
\`\`\`
2. src/components/UserProfile.tsx:25:15 - Object is possibly 'null'. (TS2531)
2. src/components/UserProfile.tsx:25:15 - Object is possibly 'null'. (TS2531)
\`\`\`
SNIPPET
\`\`\`
3. src/hooks/useLocalStorage.ts:18:12 - Type 'string | null' is not assignable to type 'T'. (TS2322)
3. src/hooks/useLocalStorage.ts:18:12 - Type 'string | null' is not assignable to type 'T'. (TS2322)
@@ -55,9 +103,25 @@ exports[`problem_prompt > realistic TypeScript error scenarios > should handle c
...
@@ -55,9 +103,25 @@ exports[`problem_prompt > realistic TypeScript error scenarios > should handle c
"Fix these 4 TypeScript compile-time errors:
"Fix these 4 TypeScript compile-time errors:
1. src/components/ProductCard.tsx:22:18 - Property 'price' is missing in type '{ name: string; description: string; }' but required in type 'Product'. (TS2741)
1. src/components/ProductCard.tsx:22:18 - Property 'price' is missing in type '{ name: string; description: string; }' but required in type 'Product'. (TS2741)
\`\`\`
SNIPPET
\`\`\`
2. src/components/SearchInput.tsx:15:45 - Type '(value: string) => void' is not assignable to type 'ChangeEventHandler<HTMLInputElement>'. (TS2322)
2. src/components/SearchInput.tsx:15:45 - Type '(value: string) => void' is not assignable to type 'ChangeEventHandler<HTMLInputElement>'. (TS2322)
\`\`\`
SNIPPET
\`\`\`
3. src/api/userService.ts:8:1 - Function lacks ending return statement and return type does not include 'undefined'. (TS2366)
3. src/api/userService.ts:8:1 - Function lacks ending return statement and return type does not include 'undefined'. (TS2366)
\`\`\`
SNIPPET
\`\`\`
4. src/utils/dataProcessor.ts:34:25 - Object is possibly 'undefined'. (TS2532)
4. src/utils/dataProcessor.ts:34:25 - Object is possibly 'undefined'. (TS2532)