Address PR: Update comment and use JSDoc

This commit is contained in:
Kanchalai Tanglertsampan
2016-09-26 10:02:07 -07:00
parent 78c3f17d01
commit e1bfd7f792

View File

@@ -1057,16 +1057,19 @@ namespace ts {
expression: Expression;
}
// The reason we create this interface so that JSXAttributes and ObjectLiteralExpression interface can extend out of it.
// JSXAttributes differs from normal ObjectLiteralExpression in that JSXAttributes can only take JSXAttribute or JSXSpreadAttribute
// but not ShortHandPropertyAssignment, methodDeclaration or other ObjectLiteralElementLike acceptable by ObjectLiteralExpression.
/**
* This interface is a base interface for ObjectLiteralExpression and JSXAttributes to extend from. JSXAttributes is similar to
* ObjectLiteralExpression in that it contains array of properties; however, JSXAttributes' properties can only be
* JSXAttribute or JSXSpreadAttribute. ObjectLiteralExpression, on the other hand, can only have properties of type
* ObjectLiteralElement (e.g. PropertyAssignment, ShorthandPropertyAssignment etc.)
**/
export interface ObjectLiteralExpressionBase<T extends ObjectLiteralElementLike> extends PrimaryExpression, Declaration {
properties: NodeArray<T>;
}
// An ObjectLiteralExpression is the declaration node for an anonymous symbol.
// @kind(SyntaxKind.ObjectLiteralExpression)
export interface ObjectLiteralExpression extends ObjectLiteralExpressionBase<ObjectLiteralElement>{
export interface ObjectLiteralExpression extends ObjectLiteralExpressionBase<ObjectLiteralElement> {
/* @internal */
multiLine?: boolean;
}