我是TypeScript中的新成员,我们希望以某种方式“扩展”现有的useQuery钩子,根据查询键至少包含两个项的规则,将其从react中“扩展”。useQuery<Data, Error>(["module_1"], fetchFn); // there should be TS error because array has only 1 item
如何“扩展
假设我在JavaScript中有这些类,我试图将它们转换为TypeScript: tags = { };error TS7022: 'tags' implicitly has type 'any' because it does not have a type annotation这里的错误很明显。我在重新定义this