File tree Expand file tree Collapse file tree 3 files changed +20
-0
lines changed
tests/baselines/reference/api Expand file tree Collapse file tree 3 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -7059,6 +7059,22 @@ namespace ts {
70597059 return hasInitializer ( node ) && ! isForStatement ( node ) && ! isForInStatement ( node ) && ! isForOfStatement ( node ) && ! isJsxAttribute ( node ) ;
70607060 }
70617061
7062+ /** True if has an expression initializer node attached to it. */
7063+ export function isHasExpressionInitializer ( node : Node ) : node is HasExpressionInitializer {
7064+ switch ( node . kind ) {
7065+ case SyntaxKind . VariableDeclaration :
7066+ case SyntaxKind . PropertyDeclaration :
7067+ case SyntaxKind . BindingElement :
7068+ case SyntaxKind . PropertySignature :
7069+ case SyntaxKind . PropertyDeclaration :
7070+ case SyntaxKind . PropertyAssignment :
7071+ case SyntaxKind . EnumMember :
7072+ return true ;
7073+ default :
7074+ return false ;
7075+ }
7076+ }
7077+
70627078 export function isObjectLiteralElement ( node : Node ) : node is ObjectLiteralElement {
70637079 return node . kind === SyntaxKind . JsxAttribute || node . kind === SyntaxKind . JsxSpreadAttribute || isObjectLiteralElementLike ( node ) ;
70647080 }
Original file line number Diff line number Diff line change @@ -3612,6 +3612,8 @@ declare namespace ts {
36123612 function isJSDocCommentContainingNode ( node : Node ) : boolean ;
36133613 function isSetAccessor ( node : Node ) : node is SetAccessorDeclaration ;
36143614 function isGetAccessor ( node : Node ) : node is GetAccessorDeclaration ;
3615+ /** True if has an expression initializer node attached to it. */
3616+ function isHasExpressionInitializer ( node : Node ) : node is HasExpressionInitializer ;
36153617 function isObjectLiteralElement ( node : Node ) : node is ObjectLiteralElement ;
36163618 function isStringLiteralLike ( node : Node ) : node is StringLiteralLike ;
36173619}
Original file line number Diff line number Diff line change @@ -3612,6 +3612,8 @@ declare namespace ts {
36123612 function isJSDocCommentContainingNode ( node : Node ) : boolean ;
36133613 function isSetAccessor ( node : Node ) : node is SetAccessorDeclaration ;
36143614 function isGetAccessor ( node : Node ) : node is GetAccessorDeclaration ;
3615+ /** True if has an expression initializer node attached to it. */
3616+ function isHasExpressionInitializer ( node : Node ) : node is HasExpressionInitializer ;
36153617 function isObjectLiteralElement ( node : Node ) : node is ObjectLiteralElement ;
36163618 function isStringLiteralLike ( node : Node ) : node is StringLiteralLike ;
36173619}
You can’t perform that action at this time.
0 commit comments