mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-07-02 14:48:32 -05:00
In plain JS files, only suggestion did-you-mean errors (#46151)
They will have code fixes, and are tuned for high precision. Others are not.
This commit is contained in:
committed by
GitHub
parent
fbff13105a
commit
8c270757b2
@@ -28454,7 +28454,7 @@ namespace ts {
|
||||
if (relatedInfo) {
|
||||
addRelatedInfo(resultDiagnostic, relatedInfo);
|
||||
}
|
||||
addErrorOrSuggestion(!isUncheckedJS, resultDiagnostic);
|
||||
addErrorOrSuggestion(!isUncheckedJS || errorInfo.code !== Diagnostics.Property_0_may_not_exist_on_type_1_Did_you_mean_2.code, resultDiagnostic);
|
||||
}
|
||||
|
||||
function containerSeemsToBeEmptyDomElement(containingType: Type) {
|
||||
|
||||
10
tests/cases/fourslash/codeFixSpellingJs9.ts
Normal file
10
tests/cases/fourslash/codeFixSpellingJs9.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
// @allowjs: true
|
||||
// @noEmit: true
|
||||
|
||||
// @filename: noSuggestionWithoutDidYouMean.js
|
||||
//// let a = {};
|
||||
//// console.log(a.apple);
|
||||
verify.noErrors()
|
||||
verify.getSuggestionDiagnostics([])
|
||||
Reference in New Issue
Block a user