Apparently the code worked but webstorm didnt like the var name of interface.