Javascript WebStorm中未解析的函数或方法筛选器()

Javascript WebStorm中未解析的函数或方法筛选器(),javascript,webstorm,Javascript,Webstorm,我使用WebStorm 2017.3.1 关于这个代码 router.get('/costs/:id',((req,res)=>{ 让costsId=Number(请求参数id); let cost=costs.filter(cost=>cost.id==costsId); res.send(成本); }) );已知问题,请关注更新已知问题,请关注更新是否在其他地方定义了成本,因为它在路由处理程序函数中未定义?const costs=require(“../data/costs”)什么是成本?

我使用WebStorm 2017.3.1

关于这个代码

router.get('/costs/:id',((req,res)=>{
让costsId=Number(请求参数id);
let cost=costs.filter(cost=>cost.id==costsId);
res.send(成本);
})

);已知问题,请关注更新

已知问题,请关注更新

是否在其他地方定义了
成本
,因为它在路由处理程序函数中未定义?
const costs=require(“../data/costs”)什么是
成本
?json
[{“id”:1,“category”:“food”,“title”:“Meat”},{“id”:2,“category”:“food”,“title”:“Juice”}]
@DenisVasilenko什么是
类型的(成本)
?是否在其他地方定义了
成本
,因为它在路由处理程序函数中未定义?
const costs=require(“../data/costs”)什么是
成本
?json
[{“id”:1,“category”:“food”,“title”:“Meat”},{“id”:2,“category”:“food”,“title”:“Juice”}]
@DenisVasilenko什么是
类型的(成本)