Native SetAmmoInClip does not work in Javascript due to number -> int/float conversion

Lua code works:

local bool, currentWeapon = GetCurrentPedWeapon(PlayerPedId(), true)
local ret = SetAmmoInClip(PlayerPedId(), currentWeapon, 10)

JS/TS code doesn’t:

const [, currentWeapon] = GetCurrentPedWeapon(PlayerPedId(), true)
const ret = SetAmmoInClip(PlayerPedId(), currentWeapon, 10)

Lua returns true , JS returns false
and in Lua I get ammo in my weapon in JS - I don’t.

This is my guess, but it could be to weird handling of float/ints between JS and C.