Improve this page

@preapproved

Tag type: modifier

TSDoc standardization: none; this tag is proprietary to API Extractor

Even though an API is marked as @internal, its signature will still be tracked in the API report file (*.api.md file) because an API review process is often interested in internal APIs. We may ask questions such as:

  • “Will this change cause a break for other internal packages?”
  • “Should we consider making this a @public API instead?”
  • “Why do we keep adding more stuff to that huge “InternalUtilities” class?”

However, if it is not useful to review a certain API, it can be marked as @preapproved. This prevents it from being emitted in the API file, and thus exempts it from any review policies.

The @preapproved tag is only supported for declarations marked as @internal, and only for the following declaration types:

  • classes
  • enums
  • interfaces
  • namespaces

Usage example:

/**
 * Identifiers for various log messages.
 *
 * @privateRemarks
 * These tokens are generated by the tooling system, so there is no reason
 * to review them.
 *
 * @internal @preapproved
 */
export enum _LoggingIds {
  ...
}

See also