MCPcopy Create free account
hub / github.com/microsoft/typescript-go / HasInitializer

Function HasInitializer

internal/ast/utilities.go:3018–3027  ·  view source on GitHub ↗
(node *Node)

Source from the content-addressed store, hash-verified

3016}
3017
3018func HasInitializer(node *Node) bool {
3019 switch node.Kind {
3020 case KindVariableDeclaration, KindParameter, KindBindingElement, KindPropertyDeclaration,
3021 KindPropertyAssignment, KindEnumMember, KindForStatement, KindForInStatement, KindForOfStatement,
3022 KindJsxAttribute:
3023 return node.Initializer() != nil
3024 default:
3025 return false
3026 }
3027}
3028
3029func IsVariableParameterOrProperty(node *Node) bool {
3030 switch node.Kind {

Callers 5

findBestFittingNodeFunction · 0.92
isDefinitionVisibleFunction · 0.92
getCompletionDataMethod · 0.92
isImplementationFunction · 0.92

Calls 1

InitializerMethod · 0.80

Tested by

no test coverage detected