Bug: Add support for optional variables
See original GitHub issueprofile?.username
is what’s causing the issue.
await redis.publish(`user:${profile?.username}.servers`, JSON.stringify(usersServers));

Removing the ?
allows the page to render correctly.

Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
How to pass optional parameters while omitting some other ...
Hi @Thomas I totally understand the documentation and know you must add the ? after the parameter in the function definition. But, related...
Read more >59327 – BASIC: A missing optional argument is treated as a ...
Is a bug because default values are not available and, even worse, the parameters in the function prototype are not available as variables...
Read more >Can't have paramarrays with optional arguments
Use a ParamArray to define procedures that accept variable-length argument lists. An Optional argument is one that the caller can supply or omit ......
Read more >Dealing with Optional Parameters in Go | by Peter Malina
The simplest solution for dealing with a small number of variables is to use different functions. This technique uses WithX as a convention...
Read more >Optional arguments in object variable type definition #19898
Actually there are workarounds for optional arguments in object variables. The tricky part is still on the default value of the variable and ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Oh sorry, I see @OmgImAlexis.
I’m afraid there isn’t much we can do: the highlight is done using codemirror.
There is a newer version that I’ll try to use and get in the next release. It doesn’t seem to update conditional annotations for JS, but we can 🤞 and keep this open until they fix it.
Thanks for raising it.
@OmgImAlexis the support should depend on the TS configuration you use. The problem here is that
error
isn’t typed.