build: update ts-api-guardian jsdoc tag requirements (#26595)
Now `@experimental` tags are banned; and `@publicApi` tags are required on exports. PR Close #26595
This commit is contained in:
parent
24521f549c
commit
c5949f85ef
|
@ -24,9 +24,9 @@ export function startCli() {
|
||||||
const options: SerializationOptions = {
|
const options: SerializationOptions = {
|
||||||
stripExportPattern: [].concat(argv['stripExportPattern']),
|
stripExportPattern: [].concat(argv['stripExportPattern']),
|
||||||
allowModuleIdentifiers: [].concat(argv['allowModuleIdentifiers']),
|
allowModuleIdentifiers: [].concat(argv['allowModuleIdentifiers']),
|
||||||
exportTags: {required: [], banned: [], toCopy: ['deprecated', 'experimental']},
|
exportTags: {required: ['publicApi'], banned: ['experimental'], toCopy: ['deprecated']},
|
||||||
memberTags: {required: [], banned: [], toCopy: ['deprecated', 'experimental']},
|
memberTags: {required: [], banned: ['experimental', 'publicApi'], toCopy: ['deprecated']},
|
||||||
paramTags: {required: [], banned: [], toCopy: ['deprecated', 'experimental']}
|
paramTags: {required: [], banned: ['experimental', 'publicApi'], toCopy: ['deprecated']}
|
||||||
};
|
};
|
||||||
|
|
||||||
for (const error of errors) {
|
for (const error of errors) {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import * as foo from './somewhere';
|
import * as foo from './somewhere';
|
||||||
|
|
||||||
|
/** @publicApi */
|
||||||
export declare class A extends foo.Bar {
|
export declare class A extends foo.Bar {
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
|
/** @publicApi */
|
||||||
export declare const A: string;
|
export declare const A: string;
|
||||||
|
/** @publicApi */
|
||||||
export declare var B: string;
|
export declare var B: string;
|
||||||
|
|
|
@ -1,11 +1,17 @@
|
||||||
|
/** @publicApi */
|
||||||
export declare type E = string;
|
export declare type E = string;
|
||||||
|
/** @publicApi */
|
||||||
export interface D {
|
export interface D {
|
||||||
e: number;
|
e: number;
|
||||||
}
|
}
|
||||||
|
/** @publicApi */
|
||||||
export declare var e: C;
|
export declare var e: C;
|
||||||
|
/** @publicApi */
|
||||||
export declare class C {
|
export declare class C {
|
||||||
e: number;
|
e: number;
|
||||||
d: string;
|
d: string;
|
||||||
}
|
}
|
||||||
|
/** @publicApi */
|
||||||
export declare function b(): boolean;
|
export declare function b(): boolean;
|
||||||
|
/** @publicApi */
|
||||||
export declare const a: string;
|
export declare const a: string;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
export {original_symbol as __private_symbol} from './stripped_alias_original';
|
export {original_symbol as __private_symbol} from './stripped_alias_original';
|
||||||
|
/** @publicApi */
|
||||||
export class B {
|
export class B {
|
||||||
}
|
}
|
|
@ -1,3 +1,4 @@
|
||||||
export const __a__: string;
|
export const __a__: string;
|
||||||
|
/** @publicApi */
|
||||||
export class B {
|
export class B {
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/** @publicApi */
|
||||||
export interface A {
|
export interface A {
|
||||||
c: number;
|
c: number;
|
||||||
a(arg: any[]): {[name: string]: number};
|
a(arg: any[]): {[name: string]: number};
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
|
/** @publicApi */
|
||||||
export declare const b: boolean;
|
export declare const b: boolean;
|
||||||
|
|
Loading…
Reference in New Issue