Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add quick fix for types * feat: add test case for quick fix of types * feat: add did-you-mean error when Cannot_find_name_0 and Cannot_find_namespace_0 * feat: add Cannot_find_namespace_0_Did_you_mean_1 error and only suggest when resolve type * feat: update baselines * feat: update baselines * feat: update baselines * chore: fix style problem * Always suggest spelling corrections * suggest primitives instead of their wrappers * Add primitives to suggestions Instead of altering wrappers to look like primitives. * add semicolons * revert unneeded change Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
- Loading branch information
1 parent
ee24e2e
commit d60747f
Showing
16 changed files
with
95 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
tests/baselines/reference/declarationEmitUnknownImport.errors.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
tests/baselines/reference/declarationEmitUnknownImport2.errors.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
tests/baselines/reference/parserUnfinishedTypeNameBeforeKeyword1.errors.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
tests/baselines/reference/parserUnterminatedGeneric1.errors.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGeneric1.ts(2,23): error TS2304: Cannot find name 'IPromise'. | ||
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGeneric1.ts(2,45): error TS2304: Cannot find name 'IPromise'. | ||
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGeneric1.ts(2,23): error TS2552: Cannot find name 'IPromise'. Did you mean 'Promise'? | ||
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGeneric1.ts(2,45): error TS2552: Cannot find name 'IPromise'. Did you mean 'Promise'? | ||
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGeneric1.ts(2,54): error TS1005: '>' expected. | ||
|
||
|
||
==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGeneric1.ts (3 errors) ==== | ||
interface IQService { | ||
all(promises: IPromise < any > []): IPromise< | ||
~~~~~~~~ | ||
!!! error TS2304: Cannot find name 'IPromise'. | ||
!!! error TS2552: Cannot find name 'IPromise'. Did you mean 'Promise'? | ||
~~~~~~~~ | ||
!!! error TS2304: Cannot find name 'IPromise'. | ||
!!! error TS2552: Cannot find name 'IPromise'. Did you mean 'Promise'? | ||
|
||
!!! error TS1005: '>' expected. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/// <reference path='fourslash.ts' /> | ||
|
||
//// declare let a: numbers; | ||
//// declare let b: Numbers; | ||
//// declare let c: objects; | ||
//// declare let d: Objects; | ||
//// declare let e: RegEx; | ||
//// namespace yadda { | ||
//// export type Thing = string; | ||
//// } | ||
//// let f: yaddas.Thing; | ||
|
||
verify.codeFixAll({ | ||
fixId: "fixSpelling", | ||
fixAllDescription: "Fix all detected spelling errors", | ||
newFileContent: | ||
`declare let a: number; | ||
declare let b: Number; | ||
declare let c: object; | ||
declare let d: Object; | ||
declare let e: RegExp; | ||
namespace yadda { | ||
export type Thing = string; | ||
} | ||
let f: yadda.Thing;`, | ||
}); |