File tree Expand file tree Collapse file tree
tests/baselines/reference/api Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -858,6 +858,7 @@ namespace ts {
858858 name ?: PropertyName ;
859859 }
860860
861+ /** Unlike ObjectLiteralElement, excludes JSXAttribute and JSXSpreadAttribute. */
861862 export type ObjectLiteralElementLike
862863 = PropertyAssignment
863864 | ShorthandPropertyAssignment
Original file line number Diff line number Diff line change @@ -6632,18 +6632,7 @@ namespace ts {
66326632 }
66336633
66346634 export function isObjectLiteralElement ( node : Node ) : node is ObjectLiteralElement {
6635- switch ( node . kind ) {
6636- case SyntaxKind . JsxAttribute :
6637- case SyntaxKind . JsxSpreadAttribute :
6638- case SyntaxKind . PropertyAssignment :
6639- case SyntaxKind . ShorthandPropertyAssignment :
6640- case SyntaxKind . MethodDeclaration :
6641- case SyntaxKind . GetAccessor :
6642- case SyntaxKind . SetAccessor :
6643- return true ;
6644- default :
6645- return false ;
6646- }
6635+ return node . kind === SyntaxKind . JsxAttribute || node . kind === SyntaxKind . JsxSpreadAttribute || isObjectLiteralElementLike ( node ) ;
66476636 }
66486637
66496638 /* @internal */
Original file line number Diff line number Diff line change @@ -616,6 +616,7 @@ declare namespace ts {
616616 _objectLiteralBrandBrand : any ;
617617 name ?: PropertyName ;
618618 }
619+ /** Unlike ObjectLiteralElement, excludes JSXAttribute and JSXSpreadAttribute. */
619620 type ObjectLiteralElementLike = PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment | MethodDeclaration | AccessorDeclaration ;
620621 interface PropertyAssignment extends ObjectLiteralElement , JSDocContainer {
621622 parent : ObjectLiteralExpression ;
Original file line number Diff line number Diff line change @@ -616,6 +616,7 @@ declare namespace ts {
616616 _objectLiteralBrandBrand : any ;
617617 name ?: PropertyName ;
618618 }
619+ /** Unlike ObjectLiteralElement, excludes JSXAttribute and JSXSpreadAttribute. */
619620 type ObjectLiteralElementLike = PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment | MethodDeclaration | AccessorDeclaration ;
620621 interface PropertyAssignment extends ObjectLiteralElement , JSDocContainer {
621622 parent : ObjectLiteralExpression ;
You can’t perform that action at this time.
0 commit comments