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 {
7059
7059
return hasInitializer ( node ) && ! isForStatement ( node ) && ! isForInStatement ( node ) && ! isForOfStatement ( node ) && ! isJsxAttribute ( node ) ;
7060
7060
}
7061
7061
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
+
7062
7078
export function isObjectLiteralElement ( node : Node ) : node is ObjectLiteralElement {
7063
7079
return node . kind === SyntaxKind . JsxAttribute || node . kind === SyntaxKind . JsxSpreadAttribute || isObjectLiteralElementLike ( node ) ;
7064
7080
}
Original file line number Diff line number Diff line change @@ -3612,6 +3612,8 @@ declare namespace ts {
3612
3612
function isJSDocCommentContainingNode ( node : Node ) : boolean ;
3613
3613
function isSetAccessor ( node : Node ) : node is SetAccessorDeclaration ;
3614
3614
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 ;
3615
3617
function isObjectLiteralElement ( node : Node ) : node is ObjectLiteralElement ;
3616
3618
function isStringLiteralLike ( node : Node ) : node is StringLiteralLike ;
3617
3619
}
Original file line number Diff line number Diff line change @@ -3612,6 +3612,8 @@ declare namespace ts {
3612
3612
function isJSDocCommentContainingNode ( node : Node ) : boolean ;
3613
3613
function isSetAccessor ( node : Node ) : node is SetAccessorDeclaration ;
3614
3614
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 ;
3615
3617
function isObjectLiteralElement ( node : Node ) : node is ObjectLiteralElement ;
3616
3618
function isStringLiteralLike ( node : Node ) : node is StringLiteralLike ;
3617
3619
}
You can’t perform that action at this time.
0 commit comments