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:
Pete Bacon Darwin 2018-10-19 12:31:32 +01:00 committed by Alex Rickabaugh
parent 24521f549c
commit c5949f85ef
8 changed files with 16 additions and 3 deletions

View File

@ -24,9 +24,9 @@ export function startCli() {
const options: SerializationOptions = {
stripExportPattern: [].concat(argv['stripExportPattern']),
allowModuleIdentifiers: [].concat(argv['allowModuleIdentifiers']),
exportTags: {required: [], banned: [], toCopy: ['deprecated', 'experimental']},
memberTags: {required: [], banned: [], toCopy: ['deprecated', 'experimental']},
paramTags: {required: [], banned: [], toCopy: ['deprecated', 'experimental']}
exportTags: {required: ['publicApi'], banned: ['experimental'], toCopy: ['deprecated']},
memberTags: {required: [], banned: ['experimental', 'publicApi'], toCopy: ['deprecated']},
paramTags: {required: [], banned: ['experimental', 'publicApi'], toCopy: ['deprecated']}
};
for (const error of errors) {

View File

@ -1,4 +1,5 @@
import * as foo from './somewhere';
/** @publicApi */
export declare class A extends foo.Bar {
}

View File

@ -1,2 +1,4 @@
/** @publicApi */
export declare const A: string;
/** @publicApi */
export declare var B: string;

View File

@ -1,11 +1,17 @@
/** @publicApi */
export declare type E = string;
/** @publicApi */
export interface D {
e: number;
}
/** @publicApi */
export declare var e: C;
/** @publicApi */
export declare class C {
e: number;
d: string;
}
/** @publicApi */
export declare function b(): boolean;
/** @publicApi */
export declare const a: string;

View File

@ -1,3 +1,4 @@
export {original_symbol as __private_symbol} from './stripped_alias_original';
/** @publicApi */
export class B {
}

View File

@ -1,3 +1,4 @@
export const __a__: string;
/** @publicApi */
export class B {
}

View File

@ -1,3 +1,4 @@
/** @publicApi */
export interface A {
c: number;
a(arg: any[]): {[name: string]: number};

View File

@ -1 +1,2 @@
/** @publicApi */
export declare const b: boolean;