Skip to content

Conversation

@AyomiCoder
Copy link

@AyomiCoder AyomiCoder commented Jan 16, 2026

This PR implements the deprecated property access check in internal/checker/checker.go, resolving a TODO comment. The implementation translates the logic from the TypeScript compiler to Go.

Additionally, it updates IsDeprecatedDeclaration to fallback to checking getJSDocDeprecatedTag, ensuring robust detection even if NodeFlagsDeprecated is not set.

  • internal/checker/checker.go:

    • Uncommented and implemented the deprecation check block in checkPropertyAccessExpressionOrQualifiedName.
    • Added logic to resolve the correct deprecatedNode.
    • Updated IsDeprecatedDeclaration to check JSDoc tags.
  • Compilation: go build ./cmd/tsgo passes.

  • Manual Testing: Tested with a @deprecated property.

  • Observation: The check logic is correct, but the currently implemented Parser does not yet attach JSDoc comments to AST nodes, so getJSDocDeprecatedTag returns nil. This feature will automatically become active once JSDoc parsing support is added upstream.

…and enable reporting for deprecated property accesses.
@AyomiCoder
Copy link
Author

I accept

@AyomiCoder
Copy link
Author

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant