question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TSNonNullExpression for non-nullable expressions with array parentheses

See original GitHub issue

CLI warning: The prop value with an expression type of TSNonNullExpression could not be resolved. Please file issue to get this fixed immediately.

Was tracking some of the expressions til I found the cause which looks like this:

<div data-test={someNullishObject![0]} />

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ljharbcommented, Feb 17, 2022

Luckily i was able to repro it just from that one line 😃 we weren’t handling bracketed member expressions, specifically.

1reaction
steve-py96commented, Feb 17, 2022

Woah that’s hella weird, I was building a repro and first I was gonna slap myself cause it didn’t throw me the warning, but apparently it only throws on interactive HTMLElements (just a guess after testing <button> and <a> yet), therefore this might be caused somewhere else… (was at least my guess before you just fixed this, you’re sanic xd)

Thx for fixing ❤️ , I’ll leave the repro link here anyway tho, else RIP the effort! 😄 https://stackblitz.com/edit/vitejs-vite-cd1axh?file=src%2FApp.tsx&terminal=lint

Read more comments on GitHub >

github_iconTop Results From Across the Web

The prop value with an expression type of ... - GitHub
The prop value with an expression type of TSNonNullExpression could not be ... for non-nullable expressions with array parentheses #115.
Read more >
Square brackets around vs after expression in Typescript
As @VLAZ pointd out, x is an Array, while y is a Tuple. The difference is observable even in this simple case. interface...
Read more >
Solved: I don't want any square brackets "[ ]" around my a...
Solved: Hello! I have the following flow, where I compose a new array: https://i.imgur.com/vZtCm3f.png This array needs to be embedded in a specific....
Read more >
Get more than one elements from array in QGIS expressions ...
Using QGIS expressions, if you have an array, you can get the n-th element by simply adding a number (n) in square brackets...
Read more >
6.4 Parentheses for Grouping | Stan Reference Manual
Any expression wrapped in parentheses is also an expression. ... The square brackets [ and ] are reserved for array indexing and the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found