Skip to content

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

@KarishmaGhiya

Description

@KarishmaGhiya

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 #12986 (comment)

Metadata

Metadata

Assignees

Labels

APIViewjavascriptPull requests that update Javascript code

Type

Projects

Status

🆕 New

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions