forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add undefined checks for malformed type tags
Fixes microsoft#7002
- Loading branch information
1 parent
1256352
commit 5af2c47
Showing
6 changed files
with
58 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
//// [myFile02.js] | ||
|
||
/** | ||
* Checks if `value` is classified as an `Array` object. | ||
* | ||
* @type Function | ||
*/ | ||
var isArray = Array.isArray; | ||
|
||
|
||
//// [myFile02.js] | ||
/** | ||
* Checks if `value` is classified as an `Array` object. | ||
* | ||
* @type Function | ||
*/ | ||
var isArray = Array.isArray; |
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,13 @@ | ||
=== tests/cases/conformance/salsa/myFile02.js === | ||
|
||
/** | ||
* Checks if `value` is classified as an `Array` object. | ||
* | ||
* @type Function | ||
*/ | ||
var isArray = Array.isArray; | ||
>isArray : Symbol(isArray, Decl(myFile02.js, 6, 3)) | ||
>Array.isArray : Symbol(ArrayConstructor.isArray, Decl(lib.d.ts, --, --)) | ||
>Array : Symbol(Array, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --)) | ||
>isArray : Symbol(ArrayConstructor.isArray, Decl(lib.d.ts, --, --)) | ||
|
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,13 @@ | ||
=== tests/cases/conformance/salsa/myFile02.js === | ||
|
||
/** | ||
* Checks if `value` is classified as an `Array` object. | ||
* | ||
* @type Function | ||
*/ | ||
var isArray = Array.isArray; | ||
>isArray : (arg: any) => arg is any[] | ||
>Array.isArray : (arg: any) => arg is any[] | ||
>Array : ArrayConstructor | ||
>isArray : (arg: any) => arg is any[] | ||
|
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,10 @@ | ||
// @allowJS: true | ||
// @suppressOutputPathCheck: true | ||
|
||
// @filename: myFile02.js | ||
/** | ||
* Checks if `value` is classified as an `Array` object. | ||
* | ||
* @type Function | ||
*/ | ||
var isArray = Array.isArray; |