理想情况下,我喜欢它从一个外部JSON (api),这是从一个PHP网站生成的数据,我们已经运行。export const doctorsList: DoctorModel[] = () => .then((response) =>response.json()); 但是得到了这个错误: Type '() => Promise<any>' is missing the following propertie
我试图让TypeScript理解我的精简的结果,并为我的工厂方法的结果保留原始的类型。implicitly has an 'any' type because type '{ fetchSomething: (i: number) => (query: SomethingQuery) => Promise我知道下面的代码不能正确地输入,我只是不知道如何让TypeScript正确地推断。
const