【发布时间】:2022-08-12 18:14:27
【问题描述】:
对于以下方法,lint 会发出警告
public async listUsers(startIndex: number, count = this.pageSize): Promise<AxiosResponse> {
logger.trace(\'Entering List User\');
return this.axiosInstance.get(\'/Users?startIndex=${startIndex}&count=${count}\', {
method: HttpMethod.GET
});
}
皮棉警告:
警告 \'count\' 被赋值但从未使用过 @typescript-eslint/no-unused-vars
-
这可能是一个转录错误,但您需要使用反引号
`在模板文字中使用表达式
标签: typescript lint