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

Function isImplementation

internal/ls/utilities.go:391–402  ·  view source on GitHub ↗
(node *ast.Node)

Source from the content-addressed store, hash-verified

389}
390
391func isImplementation(node *ast.Node) bool {
392 if node.Flags&ast.NodeFlagsAmbient != 0 {
393 return !(node.Kind == ast.KindInterfaceDeclaration || node.Kind == ast.KindTypeAliasDeclaration)
394 }
395 if ast.IsVariableLike(node) {
396 return ast.HasInitializer(node)
397 }
398 if ast.IsFunctionLikeDeclaration(node) {
399 return node.Body() != nil
400 }
401 return ast.IsClassLike(node) || ast.IsModuleOrEnumDeclaration(node)
402}
403
404func isImplementationExpression(node *ast.Node) bool {
405 switch node.Kind {

Callers 1

Calls 6

IsVariableLikeFunction · 0.92
HasInitializerFunction · 0.92
IsClassLikeFunction · 0.92
BodyMethod · 0.80

Tested by

no test coverage detected