Open
Description
Description
Environment
@graphprotocol/graph-cli
v0.97.1, which usesassemblyscript
v0.19.23@graphprotocol/graph-ts
v0.38.1, which usesassemblyscript
v0.27.31
Problem
keywords: assemblyscript, equality, string checks, string comparison, null check, ==
, ===
, !=
, !==
In previous versions of graph-t
s, we were able to perform null checks using ==
. But now, in the latest versions, we are forced to use ===
(otherwise, we get all sorts of errors at build time).
I wouldn't have a problem with using ===
, but we are also forced to use ==
for string comparisons.
This is a super error-prone design where the maintainers have to remember to use slightly different operators for different types.
Solution
Upgrade to AssemblyScript v0.20, in which the ===
operator no longer checks for strict object equality.
AssemblyScript/assemblyscript#621
Are you aware of any blockers that must be resolved before implementing this feature? If so, which? Link to any relevant GitHub issues.
No response
Some information to help us out
- Tick this box if you plan on implementing this feature yourself.
- I have searched the issue tracker to make sure this issue is not a duplicate.