Skip to content

Commit

Permalink
make it parse
Browse files Browse the repository at this point in the history
  • Loading branch information
KiaraGrouwstra committed Aug 25, 2017
1 parent 62eaaf9 commit 421ea01
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7986,8 +7986,8 @@ namespace ts {
return getTypeFromIntersectionTypeNode(<IntersectionTypeNode>node);
case SyntaxKind.JSDocNullableType:
return getTypeFromJSDocNullableTypeNode(<JSDocNullableType>node);
case SyntaxKind.ParenthesizedType:
case SyntaxKind.JSDocNonNullableType:
case SyntaxKind.ParenthesizedType:
case SyntaxKind.JSDocOptionalType:
case SyntaxKind.JSDocTypeExpression:
return getTypeFromTypeNode((<ParenthesizedTypeNode | JSDocTypeReferencingNode | JSDocTypeExpression>node).type);
Expand Down Expand Up @@ -22374,7 +22374,8 @@ namespace ts {
return checkUnionOrIntersectionType(<UnionOrIntersectionTypeNode>node);
case SyntaxKind.ParenthesizedType:
case SyntaxKind.TypeOperator:
return checkSourceElement((<ParenthesizedTypeNode | TypeOperatorNode>node).type);
case SyntaxKind.JSDocNonNullableType:
return checkSourceElement((<ParenthesizedTypeNode | TypeOperatorNode | JSDocNonNullableType>node).type);
case SyntaxKind.JSDocComment:
return checkJSDocComment(node as JSDoc);
case SyntaxKind.JSDocParameterTag:
Expand All @@ -22383,7 +22384,6 @@ namespace ts {
checkSignatureDeclaration(node as JSDocFunctionType);
// falls through
case SyntaxKind.JSDocVariadicType:
case SyntaxKind.JSDocNonNullableType:
case SyntaxKind.JSDocNullableType:
case SyntaxKind.JSDocAllType:
case SyntaxKind.JSDocUnknownType:
Expand Down
7 changes: 7 additions & 0 deletions tests/cases/compiler/nonNullType.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// @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>;

0 comments on commit 421ea01

Please sign in to comment.