Question · Vibe coding with Claude Code course · Module 12: Medium clone
A tab type error and as any
tsc reports: Argument of type 'string' is not assignable to parameter of type 'SetStateAction<TabKey>'. Claude proposes setTab(t.key as any). What do you do?
Answer options
- You accept it, because the build will pass
- You switch off the no-explicit-any rule in eslint.config.mjs
- You ask for a type that fits: a tab array with as const and TabKey pulled from that array; npm run lint will reject as any anyway
- You change TabKey to string so that the error disappears
You can check the correct answer by solving this task in the CodeWorlds game.