From e1bfd7f792ed725c6b87d095ad475e8e79235119 Mon Sep 17 00:00:00 2001 From: Kanchalai Tanglertsampan Date: Mon, 26 Sep 2016 10:02:07 -0700 Subject: [PATCH] Address PR: Update comment and use JSDoc --- src/compiler/types.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 570f6992012..043e309f147 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -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 extends PrimaryExpression, Declaration { properties: NodeArray; } // An ObjectLiteralExpression is the declaration node for an anonymous symbol. // @kind(SyntaxKind.ObjectLiteralExpression) - export interface ObjectLiteralExpression extends ObjectLiteralExpressionBase{ + export interface ObjectLiteralExpression extends ObjectLiteralExpressionBase { /* @internal */ multiLine?: boolean; }