【发布时间】:2021-09-29 20:57:21
【问题描述】:
我在第 3 行收到以下错误(id: faker.unique(().....):
“any 值 @typescript-eslint/no-unsafe-member-access 上的不安全成员访问 .toString”
我明白为什么我会收到错误,但我不知道如何解决它。任何建议将不胜感激:) 提前致谢。
export const mockFinance = (): FinanceData => (
{
id: faker.unique(() => faker.datatype.number({ min: 1, max: 10000 })).toString() as Scalars['ID'],
monthlyPrice: faker.commerce.price() as Maybe<Scalars['Float']>
}
);
【问题讨论】:
标签: typescript-eslint faker.js