-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1 parent
a136f55
commit dc4e63f
Showing
12 changed files
with
127 additions
and
24 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
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
2 changes: 1 addition & 1 deletion
2
tests/baselines/reference/JSDocParsing/TypeExpressions.parsesCorrectly.nonNullableType2.json
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,5 +1,5 @@ | ||
{ | ||
"kind": "JSDocNonNullableType", | ||
"kind": "NonNullTypeNode", | ||
"pos": 1, | ||
"end": 8, | ||
"flags": "JSDoc", | ||
|
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,9 @@ | ||
//// [nonNullType.ts] | ||
type z = string | undefined | null | never; | ||
type a = string | undefined | null | never; | ||
type b = a!; | ||
type Assert<T> = T!; | ||
type c = Assert<a>; | ||
|
||
|
||
//// [nonNullType.js] |
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,21 @@ | ||
=== tests/cases/compiler/nonNullType.ts === | ||
type z = string | undefined | null | never; | ||
>z : Symbol(z, Decl(nonNullType.ts, 0, 0)) | ||
|
||
type a = string | undefined | null | never; | ||
>a : Symbol(a, Decl(nonNullType.ts, 0, 43)) | ||
|
||
type b = a!; | ||
>b : Symbol(b, Decl(nonNullType.ts, 1, 43)) | ||
>a : Symbol(a, Decl(nonNullType.ts, 0, 43)) | ||
|
||
type Assert<T> = T!; | ||
>Assert : Symbol(Assert, Decl(nonNullType.ts, 2, 12)) | ||
>T : Symbol(T, Decl(nonNullType.ts, 3, 12)) | ||
>T : Symbol(T, Decl(nonNullType.ts, 3, 12)) | ||
|
||
type c = Assert<a>; | ||
>c : Symbol(c, Decl(nonNullType.ts, 3, 20)) | ||
>Assert : Symbol(Assert, Decl(nonNullType.ts, 2, 12)) | ||
>a : Symbol(a, Decl(nonNullType.ts, 0, 43)) | ||
|
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,23 @@ | ||
=== tests/cases/compiler/nonNullType.ts === | ||
type z = string | undefined | null | never; | ||
>z : a | ||
>null : null | ||
|
||
type a = string | undefined | null | never; | ||
>a : a | ||
>null : null | ||
|
||
type b = a!; | ||
>b : string | ||
>a : a | ||
|
||
type Assert<T> = T!; | ||
>Assert : T | ||
>T : T | ||
>T : T | ||
|
||
type c = Assert<a>; | ||
>c : a | ||
>Assert : T | ||
>a : a | ||
|
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,6 @@ | ||
// @strictNullChecks: true | ||
type z = string | undefined | null | never; | ||
type a = string | undefined | null | never; | ||
type b = a!; | ||
type Assert<T> = T!; | ||
type c = Assert<a>; |