Rush StackShopBlogEvents
跳到主要内容

@public

标准化酌情决定
语法种类修饰符

建议含义

表示 API 项目的发布阶段为“公共”。它已正式发布给第三方开发人员,并且其签名保证是稳定的(例如,遵循语义版本控制规则)。

示例

/**
* Represents a book in the catalog.
* @public
*/
export class Book {
/**
* The title of the book.
* @internal
*/
public get _title(): string;

/**
* The author of the book.
*/
public get author(): string;
}

在此示例中,Book.author 从包含类继承其 @public 指定,而 Book._title 被标记为“internal”。

另请参阅