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

Function IsDeprecatedDeclaration

internal/ast/utilities.go:1217–1219  ·  view source on GitHub ↗

IsDeprecatedDeclaration reports whether the given declaration is marked as @deprecated. It checks NodeFlagsPossiblyContainsDeprecatedTag on combined node flags, then confirms by walking up to find the node with the flag and performing a JSDoc lookup.

(declaration *Node)

Source from the content-addressed store, hash-verified

1215// It checks NodeFlagsPossiblyContainsDeprecatedTag on combined node flags, then confirms
1216// by walking up to find the node with the flag and performing a JSDoc lookup.
1217func IsDeprecatedDeclaration(declaration *Node) bool {
1218 return IsDeprecatedDeclarationWithCachedFlags(declaration, GetCombinedNodeFlags(declaration))
1219}
1220
1221// IsDeprecatedDeclarationWithCachedFlags is the core logic for IsDeprecatedDeclaration,
1222// parameterized on pre-computed combined flags so the checker can supply cached flags.

Callers 1

isDeprecatedDeclarationFunction · 0.92

Calls 2

GetCombinedNodeFlagsFunction · 0.85

Tested by

no test coverage detected