build: remove unnecessary stability check (#23176)
Previously, it was necessary to attach on of the three "stability" jsdoc tags (`@stable`, `@deprecated` or `@experimental`) to each public API export. To ensure that the public API was correctly tagged, the `ts-api-guardian` would check that one of these tags appeared on every public export. Now the doc-gen is able to compute that a code item is stable if it does not contain the `@experimental` nor `@deprecated` tags. Therefore there is no need to provide the `@stable` tag any more; and this tag has now been marked as deprecated - i.e. it should not be used. The ts-api-guardian has been modified in this commit so that it no longer warns/fails if the `@stable` is missing. PR Close #23176
This commit is contained in:

committed by
Igor Minar

parent
b8053f1d4f
commit
ac316be79b
@ -31,11 +31,6 @@ export interface SerializationOptions {
|
||||
* whitelisting angular.
|
||||
*/
|
||||
allowModuleIdentifiers?: string[];
|
||||
/**
|
||||
* Warns or errors if stability annotations are missing on an export.
|
||||
* Supports experimental, stable and deprecated.
|
||||
*/
|
||||
onStabilityMissing?: DiagnosticSeverity;
|
||||
}
|
||||
|
||||
export type DiagnosticSeverity = 'warn' | 'error' | 'none';
|
||||
@ -124,12 +119,6 @@ class ResolvedDeclarationEmitter {
|
||||
const match = stabilityAnnotationPattern.exec(trivia);
|
||||
if (match) {
|
||||
output += `/** @${match[1]} */\n`;
|
||||
} else if (['warn', 'error'].indexOf(this.options.onStabilityMissing as string) >= 0) {
|
||||
this.diagnostics.push({
|
||||
type: this.options.onStabilityMissing,
|
||||
message: createErrorMessage(
|
||||
decl, `No stability annotation found for symbol "${symbol.name}"`)
|
||||
});
|
||||
}
|
||||
|
||||
output += stripEmptyLines(this.emitNode(decl)) + '\n';
|
||||
|
Reference in New Issue
Block a user