Skip to content

Commit e1bfd7f

Browse files
author
Kanchalai Tanglertsampan
committed
Address PR: Update comment and use JSDoc
1 parent 78c3f17 commit e1bfd7f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/compiler/types.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,16 +1057,19 @@ namespace ts {
10571057
expression: Expression;
10581058
}
10591059

1060-
// The reason we create this interface so that JSXAttributes and ObjectLiteralExpression interface can extend out of it.
1061-
// JSXAttributes differs from normal ObjectLiteralExpression in that JSXAttributes can only take JSXAttribute or JSXSpreadAttribute
1062-
// but not ShortHandPropertyAssignment, methodDeclaration or other ObjectLiteralElementLike acceptable by ObjectLiteralExpression.
1060+
/**
1061+
* This interface is a base interface for ObjectLiteralExpression and JSXAttributes to extend from. JSXAttributes is similar to
1062+
* ObjectLiteralExpression in that it contains array of properties; however, JSXAttributes' properties can only be
1063+
* JSXAttribute or JSXSpreadAttribute. ObjectLiteralExpression, on the other hand, can only have properties of type
1064+
* ObjectLiteralElement (e.g. PropertyAssignment, ShorthandPropertyAssignment etc.)
1065+
**/
10631066
export interface ObjectLiteralExpressionBase<T extends ObjectLiteralElementLike> extends PrimaryExpression, Declaration {
10641067
properties: NodeArray<T>;
10651068
}
10661069

10671070
// An ObjectLiteralExpression is the declaration node for an anonymous symbol.
10681071
// @kind(SyntaxKind.ObjectLiteralExpression)
1069-
export interface ObjectLiteralExpression extends ObjectLiteralExpressionBase<ObjectLiteralElement>{
1072+
export interface ObjectLiteralExpression extends ObjectLiteralExpressionBase<ObjectLiteralElement> {
10701073
/* @internal */
10711074
multiLine?: boolean;
10721075
}

0 commit comments

Comments
 (0)