assemblyscript-regex
assemblyscript-regex copied to clipboard
Fix AS210 error where expressions are never null
After updating to the latest version of Assemblyscript 0.20.1
, we ran into a couple of small type errors:
INFO AS210: Expression is never 'null'.
return matchStr != null ? new Match([matchStr!], 0, str) : null;
~~~~~~~~
in ~lib/assemblyscript-regex/assembly/regexp.ts(162,44)
INFO AS210: Expression is never 'null'.
[matchStr!].concat(lastCapturesForGroup(groupMarkers)),
~~~~~~~~
in ~lib/assemblyscript-regex/assembly/regexp.ts(186,12)
INFO AS210: Expression is never 'null'.
return matchStr != null ? new Match([matchStr!], 0, str) : null;
~~~~~~~~
in ~lib/assemblyscript-regex/assembly/regexp.ts(162,44)
INFO AS210: Expression is never 'null'.
[matchStr!].concat(lastCapturesForGroup(groupMarkers)),
~~~~~~~~
in ~lib/assemblyscript-regex/assembly/regexp.ts(186,12)
Ended up being very minor fixes, let me know if you need any further details.