Azure / Azure/azure-sdk-tools

[js-api-parser] Refactor how we track deprecated APIView items

Open
#12,982 0 comments 0 reactions 1 assignee Claimed by @KarishmaGhiya View on GitHub
APIView Javascript
Dominant language
C#
Stars
135
Forks
260
Avg merge
3d 1h
Merged PRs (30d)
143

Description

Today we track item deprecation in each generator with a separate parameter that we pass to the generator. In an ideal world the token generators take a single parameter: the `ApiItem` (or subclass of) and that item has all the information we need to decide whether it's deprecated or not.

For example, for ApiEnum, we can do: `const deprecated = item.tsdocComment?.deprecatedBlock !== undefined;`

This issue tracks investigating whether that can work for us and if so, removing the `deprecated` argument to the `generate` function, replacing it with the logic above.

Also putting the discussion thread for context for more information we'll need in future https://github.com/Azure/azure-sdk-tools/pull/12986#discussion_r2547062791

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.