noImplicitReturns
is ignored if strictNullChecks
is true
#51312
Labels
Working as Intended
The behavior described is the intended behavior; this is not a bug
Bug Report
If
strictNullChecks
is set to true directly or just by having thestrict
flag set to trueTHEN
noImplicitReturns
does not work🔎 Search Terms
noImplicitReturns
strictNullChecks
ignored
doesn't work
strict
strict mode
🕗 Version & Regression Information
Not sure, I just jumped on a new project, and they have this problem and it's conflicting with my project that uses it.
If possible, please try testing the nightly version of TS to see if it's already been fixed.
For npm:
typescript@next
I tried this, and the issue is still present on:
4.9.0-dev.20221025
Please keep and fill in the line that best applies:
-->
⏯ Playground Link
To repro, just remove line 3:
// @strictNullChecks: false
Workbench Repro
💻 Code
Workbench Repro
🙁 Actual behavior
With strictNullChecks set to true, the error for noImplicitReturn is not visible.
🙂 Expected behavior
With strictNullChecks set to true, the error for noImplicitReturn should still be not visible.
The text was updated successfully, but these errors were encountered: