MCPcopy Create free account
hub / github.com/Effect-TS/tsgo / getNodeModifiers

Function getNodeModifiers

internal/refactors/function_to_arrow.go:218–226  ·  view source on GitHub ↗

getNodeModifiers returns the modifier list from a function-like node.

(node *ast.Node)

Source from the content-addressed store, hash-verified

216
217// getNodeModifiers returns the modifier list from a function-like node.
218func getNodeModifiers(node *ast.Node) *ast.ModifierList {
219 switch node.Kind {
220 case ast.KindFunctionDeclaration:
221 return node.AsFunctionDeclaration().Modifiers()
222 case ast.KindMethodDeclaration:
223 return node.AsMethodDeclaration().Modifiers()
224 }
225 return nil
226}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected