Actions JS parser giving erroneous errors

In my post-login action, I do a fetch() request to my server to resolve the user.

My action contains code like:

let user = await fetch('...');
user = await user.json();
api.accessToken.setCustomClaim('user.foo', user.bar);

This gives the error:

Property ‘bar’ does not exist on type ‘Response’

This is clearly wrong since user, by that point, is not a response, but a decoded payload. And my code works fine. So it’s just the error reporter misfiring, seemingly.