docs: convert all @experimental
tags to @publicApi
tags (#26595)
PR Close #26595
This commit is contained in:

committed by
Alex Rickabaugh

parent
4bd9f53e8f
commit
24521f549c
@ -14,7 +14,7 @@ const fakeAsyncTestModule = _Zone && _Zone[_Zone.__symbol__('fakeAsyncTest')];
|
||||
* Clears out the shared fake async zone for a test.
|
||||
* To be called in a global `beforeEach`.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export function resetFakeAsyncZone(): void {
|
||||
if (fakeAsyncTestModule) {
|
||||
@ -41,7 +41,7 @@ export function resetFakeAsyncZone(): void {
|
||||
* @param fn
|
||||
* @returns The function wrapped to be executed in the fakeAsync zone
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export function fakeAsync(fn: Function): (...args: any[]) => any {
|
||||
if (fakeAsyncTestModule) {
|
||||
@ -62,7 +62,7 @@ export function fakeAsync(fn: Function): (...args: any[]) => any {
|
||||
*
|
||||
* {@example core/testing/ts/fake_async.ts region='basic'}
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export function tick(millis: number = 0): void {
|
||||
if (fakeAsyncTestModule) {
|
||||
@ -80,7 +80,7 @@ export function tick(millis: number = 0): void {
|
||||
* @param maxTurns
|
||||
* @returns The simulated time elapsed, in millis.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export function flush(maxTurns?: number): number {
|
||||
if (fakeAsyncTestModule) {
|
||||
@ -93,7 +93,7 @@ export function flush(maxTurns?: number): number {
|
||||
/**
|
||||
* Discard all remaining periodic tasks.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export function discardPeriodicTasks(): void {
|
||||
if (fakeAsyncTestModule) {
|
||||
@ -106,7 +106,7 @@ export function discardPeriodicTasks(): void {
|
||||
/**
|
||||
* Flush any pending microtasks.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export function flushMicrotasks(): void {
|
||||
if (fakeAsyncTestModule) {
|
||||
|
@ -24,7 +24,7 @@ let _fakeAsyncTestZoneSpec: any = null;
|
||||
* Clears out the shared fake async zone for a test.
|
||||
* To be called in a global `beforeEach`.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export function resetFakeAsyncZoneFallback() {
|
||||
_fakeAsyncTestZoneSpec = null;
|
||||
@ -51,7 +51,7 @@ let _inFakeAsyncCall = false;
|
||||
* @param fn
|
||||
* @returns The function wrapped to be executed in the fakeAsync zone
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export function fakeAsyncFallback(fn: Function): (...args: any[]) => any {
|
||||
// Not using an arrow function to preserve context passed from call site
|
||||
@ -116,7 +116,7 @@ function _getFakeAsyncZoneSpec(): any {
|
||||
*
|
||||
* {@example core/testing/ts/fake_async.ts region='basic'}
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export function tickFallback(millis: number = 0): void {
|
||||
_getFakeAsyncZoneSpec().tick(millis);
|
||||
@ -130,7 +130,7 @@ export function tickFallback(millis: number = 0): void {
|
||||
* @param maxTurns
|
||||
* @returns The simulated time elapsed, in millis.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export function flushFallback(maxTurns?: number): number {
|
||||
return _getFakeAsyncZoneSpec().flush(maxTurns);
|
||||
@ -139,7 +139,7 @@ export function flushFallback(maxTurns?: number): number {
|
||||
/**
|
||||
* Discard all remaining periodic tasks.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export function discardPeriodicTasksFallback(): void {
|
||||
const zoneSpec = _getFakeAsyncZoneSpec();
|
||||
@ -149,7 +149,7 @@ export function discardPeriodicTasksFallback(): void {
|
||||
/**
|
||||
* Flush any pending microtasks.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export function flushMicrotasksFallback(): void {
|
||||
_getFakeAsyncZoneSpec().flushMicrotasks();
|
||||
|
@ -9,7 +9,7 @@
|
||||
/**
|
||||
* Type used for modifications to metadata
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export type MetadataOverride<T> = {
|
||||
add?: Partial<T>,
|
||||
|
@ -38,7 +38,7 @@ export class TestBedRender3 implements Injector, TestBed {
|
||||
* Test modules and platforms for individual platforms are available from
|
||||
* '@angular/<platform_name>/testing'.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
static initTestEnvironment(
|
||||
ngModule: Type<any>|Type<any>[], platform: PlatformRef, aotSummaries?: () => any[]): TestBed {
|
||||
@ -50,7 +50,7 @@ export class TestBedRender3 implements Injector, TestBed {
|
||||
/**
|
||||
* Reset the providers for the test injector.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
static resetTestEnvironment(): void { _getTestBedRender3().resetTestEnvironment(); }
|
||||
|
||||
@ -198,7 +198,7 @@ export class TestBedRender3 implements Injector, TestBed {
|
||||
* Test modules and platforms for individual platforms are available from
|
||||
* '@angular/<platform_name>/testing'.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
initTestEnvironment(
|
||||
ngModule: Type<any>|Type<any>[], platform: PlatformRef, aotSummaries?: () => any[]): void {
|
||||
@ -212,7 +212,7 @@ export class TestBedRender3 implements Injector, TestBed {
|
||||
/**
|
||||
* Reset the providers for the test injector.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
resetTestEnvironment(): void {
|
||||
this.resetTestingModule();
|
||||
|
@ -36,7 +36,7 @@ export interface TestBed {
|
||||
* Test modules and platforms for individual platforms are available from
|
||||
* '@angular/<platform_name>/testing'.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
initTestEnvironment(
|
||||
ngModule: Type<any>|Type<any>[], platform: PlatformRef, aotSummaries?: () => any[]): void;
|
||||
@ -44,7 +44,7 @@ export interface TestBed {
|
||||
/**
|
||||
* Reset the providers for the test injector.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
resetTestEnvironment(): void;
|
||||
|
||||
@ -120,7 +120,7 @@ export class TestBedViewEngine implements Injector, TestBed {
|
||||
* Test modules and platforms for individual platforms are available from
|
||||
* '@angular/<platform_name>/testing'.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
static initTestEnvironment(
|
||||
ngModule: Type<any>|Type<any>[], platform: PlatformRef,
|
||||
@ -133,7 +133,7 @@ export class TestBedViewEngine implements Injector, TestBed {
|
||||
/**
|
||||
* Reset the providers for the test injector.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
static resetTestEnvironment(): void { _getTestBedViewEngine().resetTestEnvironment(); }
|
||||
|
||||
@ -292,7 +292,7 @@ export class TestBedViewEngine implements Injector, TestBed {
|
||||
* Test modules and platforms for individual platforms are available from
|
||||
* '@angular/<platform_name>/testing'.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
initTestEnvironment(
|
||||
ngModule: Type<any>|Type<any>[], platform: PlatformRef, aotSummaries?: () => any[]): void {
|
||||
@ -309,7 +309,7 @@ export class TestBedViewEngine implements Injector, TestBed {
|
||||
/**
|
||||
* Reset the providers for the test injector.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
resetTestEnvironment(): void {
|
||||
this.resetTestingModule();
|
||||
@ -644,7 +644,7 @@ export const TestBed: TestBedStatic =
|
||||
*
|
||||
* It will be either an instance of `TestBedViewEngine` or `TestBedRender3`.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export const getTestBed: () => TestBed = ivyEnabled ? _getTestBedRender3 : _getTestBedViewEngine;
|
||||
|
||||
@ -698,7 +698,7 @@ export function inject(tokens: any[], fn: Function): () => any {
|
||||
}
|
||||
|
||||
/**
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export class InjectSetupWrapper {
|
||||
constructor(private _moduleDef: () => TestModuleMetadata) {}
|
||||
@ -721,7 +721,7 @@ export class InjectSetupWrapper {
|
||||
}
|
||||
|
||||
/**
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export function withModule(moduleDef: TestModuleMetadata): InjectSetupWrapper;
|
||||
export function withModule(moduleDef: TestModuleMetadata, fn: Function): () => any;
|
||||
|
@ -15,25 +15,25 @@ import {TestBed} from './test_bed';
|
||||
/**
|
||||
* An abstract class for inserting the root test component element in a platform independent way.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export class TestComponentRenderer {
|
||||
insertRootElement(rootElementId: string) {}
|
||||
}
|
||||
|
||||
/**
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export const ComponentFixtureAutoDetect =
|
||||
new InjectionToken<boolean[]>('ComponentFixtureAutoDetect');
|
||||
|
||||
/**
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export const ComponentFixtureNoNgZone = new InjectionToken<boolean[]>('ComponentFixtureNoNgZone');
|
||||
|
||||
/**
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export type TestModuleMetadata = {
|
||||
providers?: any[],
|
||||
@ -55,7 +55,7 @@ export interface TestBedStatic {
|
||||
/**
|
||||
* Reset the providers for the test injector.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
resetTestEnvironment(): void;
|
||||
|
||||
|
@ -17,7 +17,7 @@ function unimplemented(): any {
|
||||
/**
|
||||
* Special interface to the compiler only used by testing
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
@Injectable()
|
||||
export class TestingCompiler extends Compiler {
|
||||
@ -57,7 +57,7 @@ export class TestingCompiler extends Compiler {
|
||||
/**
|
||||
* A factory for creating a Compiler
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export abstract class TestingCompilerFactory {
|
||||
abstract createTestingCompiler(options?: CompilerOptions[]): TestingCompiler;
|
||||
|
Reference in New Issue
Block a user