简体   繁体   English

/** @docs-private */ 在 angular 的打字稿代码库中是什么意思?

[英]What is the meaning of /** @docs-private */ in angular's typescript codebase?

I was reading through some of the @angular/cdk code on GitHub and I am wondering what is the meaning of this "@docs-private" comment.我正在阅读 GitHub 上的一些 @angular/cdk 代码,我想知道这个“@docs-private”评论的含义是什么。

https://github.com/angular/components/blob/main/src/cdk/table/row.ts https://github.com/angular/components/blob/main/src/cdk/table/row.ts

在此处输入图像描述

 * Base class for the CdkHeaderRowDef and CdkRowDef that handles checking their columns inputs
 * for changes and notifying the table.
 */
@Directive()
export abstract class BaseRowDef implements OnChanges {
  /** The columns to be displayed on this row. */
  columns: Iterable<string>;

  /** Differ used to check if any changes were made to the columns. */
  protected _columnsDiffer: IterableDiffer<any>;

  constructor(
    /** @docs-private */ public template: TemplateRef<any>,
    protected _differs: IterableDiffers,
  ) {}

  ngOnChanges(changes: SimpleChanges): void {
    // Create a new columns differ if one does not yet exist. Initialize it based on initial value
    // of the columns property or an empty array if none is provided.
    if (!this._columnsDiffer) {
      const columns = (changes['columns'] && changes['columns'].currentValue) || [];
      this._columnsDiffer = this._differs.find(columns).create();
      this._columnsDiffer.diff(columns);
    }
  }```

It's internal tooling for Angular docs它是 Angular 文档的内部工具

Additionally, the @docs-private JsDoc annotation can be used to hide any symbol from the public API docs.此外,@docs-private JsDoc 注释可用于隐藏公共 API 文档中的任何符号。

In GitHub you can do a search within the codebase - very handy for things like this在 GitHub 中,您可以在代码库中进行search ——对于此类事情非常方便

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM