CR feedback.

This commit is contained in:
Cyrus Najmabadi
2015-04-17 12:06:21 -07:00
parent 605ee10768
commit c2e178ee51
4 changed files with 12 additions and 12 deletions

View File

@@ -596,7 +596,11 @@ module ts {
type: TypeNode;
}
export interface StringLiteralTypeNode extends LiteralExpression, TypeNode { }
// Note that a StringLiteral AST node is both an Expression and a TypeNode. The latter is
// because string literals can appear in the type annotation of a parameter node.
export interface StringLiteral extends LiteralExpression, TypeNode {
_stringLiteralBrand: any;
}
// Note: 'brands' in our syntax nodes serve to give us a small amount of nominal typing.
// Consider 'Expression'. Without the brand, 'Expression' is actually no different
@@ -689,10 +693,6 @@ module ts {
hasExtendedUnicodeEscape?: boolean;
}
export interface StringLiteralExpression extends LiteralExpression, TypeNode {
_stringLiteralExpressionBrand: any;
}
export interface TemplateExpression extends PrimaryExpression {
head: LiteralExpression;
templateSpans: NodeArray<TemplateSpan>;