You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
quick-lint reports: using a '.' after a '?.' might fail, since '?.' might return 'undefined'., however this is not true.
Running the above code shows that optional chaining short-circuits the entire property access expression to undefined, not just the first property access.
❯ deno
Deno 1.39.4
exit using ctrl+d, ctrl+c, or close()
REPL is running with all permissions allowed.
To specify permissions, run `deno repl` with allow flags.
> undefined?.a.b.c.d
undefined
idk if there's a "correct" version of this diagnostic, or if we should just delete the whole thing
The text was updated successfully, but these errors were encountered:
This closesquick-lint#1128 -- it warns the user about using a dot After an optional chain. This cover optional chain with function call as well as optional chain with index expressions
minimal example:
quick-lint reports:
using a '.' after a '?.' might fail, since '?.' might return 'undefined'.
, however this is not true.Running the above code shows that optional chaining short-circuits the entire property access expression to
undefined
, not just the first property access.idk if there's a "correct" version of this diagnostic, or if we should just delete the whole thing
The text was updated successfully, but these errors were encountered: