Using nrlint 1.0.2 the following code shows the error that the left hand side of an arithmetic operation must of type 'any', 'Number' ...
The function does run ok (it subtracts the millisecond values).
const d1 = new Date()
const d2 = new Date(d1.getTime() + 1000)
msg.payload = d2 - d1
That is odd. A quick test with regular eslint (which is what the nrlint rule is using) seems fine with that code:
No doubt some subtle option missing here. Please raise an issue on the nrlint repo.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.