什么是Angular或JavaScript中的@license和@publicApi内部注释

问题描述 投票:1回答:1

我构建了Angular应用,然后查看了构建的代码,在其中发现了@license或@publicApi的注释,如下图所示。我不知道这是什么东西,以及如何创建它们。如果有人知道,请在下面评论您的答案,这对我了解新知识会有所帮助。

enter image description here

javascript angular comments
1个回答
0
投票
例如,可以解释@license:https://jsdoc.app/tags-license.html

The @license tag identifies the software license that applies to any portion of your code. You can use any text to identify the license you are using.

公共API似乎是Google特有的。所有这些都是注释。它们不会改变代码的工作方式。

JSDoc的目的是记录您的JavaScript应用程序或库的API。假定您将要记录诸如模块,名称空间,类,方法,方法参数之类的内容。
© www.soinside.com 2019 - 2024. All rights reserved.