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
@ -67,7 +67,7 @@ export const APPLICATION_MODULE_PROVIDERS: StaticProvider[] = [
|
||||
* Re-exported by `BrowserModule`, which is included automatically in the root
|
||||
* `AppModule` when you create a new app with the CLI `new` command.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
@NgModule({providers: APPLICATION_MODULE_PROVIDERS})
|
||||
export class ApplicationModule {
|
||||
|
@ -57,7 +57,7 @@ export const ALLOW_MULTIPLE_PLATFORMS = new InjectionToken<boolean>('AllowMultip
|
||||
/**
|
||||
* A token for third-party components that can register themselves with NgProbe.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export class NgProbeToken {
|
||||
constructor(public name: string, public token: any) {}
|
||||
@ -67,7 +67,7 @@ export class NgProbeToken {
|
||||
* Creates a platform.
|
||||
* Platforms have to be eagerly created via this function.
|
||||
*
|
||||
* @experimental APIs related to application bootstrap are currently under review.
|
||||
* @publicApi
|
||||
*/
|
||||
export function createPlatform(injector: Injector): PlatformRef {
|
||||
if (_platform && !_platform.destroyed &&
|
||||
@ -84,7 +84,7 @@ export function createPlatform(injector: Injector): PlatformRef {
|
||||
/**
|
||||
* Creates a factory for a platform
|
||||
*
|
||||
* @experimental APIs related to application bootstrap are currently under review.
|
||||
* @publicApi
|
||||
*/
|
||||
export function createPlatformFactory(
|
||||
parentPlatformFactory: ((extraProviders?: StaticProvider[]) => PlatformRef) | null,
|
||||
@ -111,7 +111,7 @@ export function createPlatformFactory(
|
||||
/**
|
||||
* Checks that there currently is a platform which contains the given token as a provider.
|
||||
*
|
||||
* @experimental APIs related to application bootstrap are currently under review.
|
||||
* @publicApi
|
||||
*/
|
||||
export function assertPlatform(requiredToken: any): PlatformRef {
|
||||
const platform = getPlatform();
|
||||
@ -131,7 +131,7 @@ export function assertPlatform(requiredToken: any): PlatformRef {
|
||||
/**
|
||||
* Destroy the existing platform.
|
||||
*
|
||||
* @experimental APIs related to application bootstrap are currently under review.
|
||||
* @publicApi
|
||||
*/
|
||||
export function destroyPlatform(): void {
|
||||
if (_platform && !_platform.destroyed) {
|
||||
@ -142,7 +142,7 @@ export function destroyPlatform(): void {
|
||||
/**
|
||||
* Returns the current platform.
|
||||
*
|
||||
* @experimental APIs related to application bootstrap are currently under review.
|
||||
* @publicApi
|
||||
*/
|
||||
export function getPlatform(): PlatformRef|null {
|
||||
return _platform && !_platform.destroyed ? _platform : null;
|
||||
@ -203,7 +203,7 @@ export class PlatformRef {
|
||||
* let moduleRef = platformBrowser().bootstrapModuleFactory(MyModuleNgFactory);
|
||||
* ```
|
||||
*
|
||||
* @experimental APIs related to application bootstrap are currently under review.
|
||||
* @publicApi
|
||||
*/
|
||||
bootstrapModuleFactory<M>(moduleFactory: NgModuleFactory<M>, options?: BootstrapOptions):
|
||||
Promise<NgModuleRef<M>> {
|
||||
|
@ -18,7 +18,7 @@ import {ComponentRef} from './linker/component_factory';
|
||||
* If you need to avoid randomly generated value to be used as an application id, you can provide
|
||||
* a custom value via a DI provider <!-- TODO: provider --> configuring the root {@link Injector}
|
||||
* using this token.
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export const APP_ID = new InjectionToken<string>('AppId');
|
||||
|
||||
@ -28,7 +28,7 @@ export function _appIdRandomProviderFactory() {
|
||||
|
||||
/**
|
||||
* Providers that will generate a random APP_ID_TOKEN.
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export const APP_ID_RANDOM_PROVIDER = {
|
||||
provide: APP_ID,
|
||||
@ -42,13 +42,13 @@ function _randomChar(): string {
|
||||
|
||||
/**
|
||||
* A function that will be executed when a platform is initialized.
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export const PLATFORM_INITIALIZER = new InjectionToken<Array<() => void>>('Platform Initializer');
|
||||
|
||||
/**
|
||||
* A token that indicates an opaque platform id.
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export const PLATFORM_ID = new InjectionToken<Object>('Platform ID');
|
||||
|
||||
@ -58,13 +58,13 @@ export const PLATFORM_ID = new InjectionToken<Object>('Platform ID');
|
||||
*
|
||||
* `(componentRef: ComponentRef) => void`.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export const APP_BOOTSTRAP_LISTENER =
|
||||
new InjectionToken<Array<(compRef: ComponentRef<any>) => void>>('appBootstrapListener');
|
||||
|
||||
/**
|
||||
* A token which indicates the root directory of the application
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export const PACKAGE_ROOT_URL = new InjectionToken<string>('Application Packages Root URL');
|
||||
|
@ -14,7 +14,7 @@ export class EventListener {
|
||||
}
|
||||
|
||||
/**
|
||||
* @experimental All debugging apis are currently experimental.
|
||||
* @publicApi
|
||||
*/
|
||||
export class DebugNode {
|
||||
listeners: EventListener[] = [];
|
||||
@ -38,7 +38,7 @@ export class DebugNode {
|
||||
}
|
||||
|
||||
/**
|
||||
* @experimental All debugging apis are currently experimental.
|
||||
* @publicApi
|
||||
*/
|
||||
export class DebugElement extends DebugNode {
|
||||
name !: string;
|
||||
@ -126,7 +126,7 @@ export class DebugElement extends DebugNode {
|
||||
}
|
||||
|
||||
/**
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export function asNativeElements(debugEls: DebugElement[]): any {
|
||||
return debugEls.map((el) => el.nativeElement);
|
||||
@ -162,7 +162,7 @@ function _queryNodeChildren(
|
||||
const _nativeNodeToDebugNode = new Map<any, DebugNode>();
|
||||
|
||||
/**
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export function getDebugNode(nativeNode: any): DebugNode|null {
|
||||
return _nativeNodeToDebugNode.get(nativeNode) || null;
|
||||
@ -184,6 +184,6 @@ export function removeDebugNodeFromIndex(node: DebugNode) {
|
||||
* A boolean-valued function over a value, possibly including context information
|
||||
* regarding that value's position in an array.
|
||||
*
|
||||
* @experimental All debugging apis are currently experimental.
|
||||
* @publicApi
|
||||
*/
|
||||
export interface Predicate<T> { (value: T): boolean; }
|
||||
|
@ -72,7 +72,7 @@ export interface InjectorDef<T> {
|
||||
* `InjectableDefType`s contain their own Dependency Injection metadata and are usable in an
|
||||
* `InjectorDef`-based `StaticInjector.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export interface InjectableType<T> extends Type<T> {
|
||||
/**
|
||||
@ -86,7 +86,7 @@ export interface InjectableType<T> extends Type<T> {
|
||||
*
|
||||
* `InjectorDefTypes` can be used to configure a `StaticInjector`.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export interface InjectorType<T> extends Type<T> {
|
||||
/**
|
||||
@ -124,7 +124,7 @@ export interface InjectorTypeWithProviders<T> {
|
||||
* * `factory` gives the zero argument function which will create an instance of the injectable.
|
||||
* The factory can call `inject` to access the `Injector` and request injection of dependencies.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export function defineInjectable<T>(opts: {
|
||||
providedIn?: Type<any>| 'root' | 'any' | null,
|
||||
@ -153,7 +153,7 @@ export function defineInjectable<T>(opts: {
|
||||
* whose providers will also be added to the injector. Locally provided types will override
|
||||
* providers from imports.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export function defineInjector(options: {factory: () => any, providers?: any[], imports?: any[]}):
|
||||
never {
|
||||
|
@ -18,7 +18,7 @@ import {stringify} from '../util';
|
||||
* ### Example
|
||||
*
|
||||
* {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref_fn'}
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export interface ForwardRefFn { (): any; }
|
||||
|
||||
@ -32,7 +32,7 @@ export interface ForwardRefFn { (): any; }
|
||||
* @usageNotes
|
||||
* ### Example
|
||||
* {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export function forwardRef(forwardRefFn: ForwardRefFn): Type<any> {
|
||||
(<any>forwardRefFn).__forward_ref__ = forwardRef;
|
||||
@ -51,7 +51,7 @@ export function forwardRef(forwardRefFn: ForwardRefFn): Type<any> {
|
||||
* {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}
|
||||
*
|
||||
* @see `forwardRef`
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export function resolveForwardRef(type: any): any {
|
||||
if (typeof type === 'function' && type.hasOwnProperty('__forward_ref__') &&
|
||||
|
@ -18,7 +18,7 @@ import {convertInjectableProviderToFactory} from './util';
|
||||
/**
|
||||
* Injectable providers used in `@Injectable` decorator.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export type InjectableProvider = ValueSansProvider | ExistingSansProvider |
|
||||
StaticClassSansProvider | ConstructorSansProvider | FactorySansProvider | ClassSansProvider;
|
||||
@ -52,7 +52,7 @@ export interface InjectableDecorator {
|
||||
/**
|
||||
* Type of the Injectable metadata.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export interface Injectable { providedIn?: Type<any>|'root'|null; }
|
||||
|
||||
@ -68,7 +68,7 @@ export const Injectable: InjectableDecorator = makeDecorator(
|
||||
/**
|
||||
* Type representing injectable service.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export interface InjectableType<T> extends Type<T> { ngInjectableDef: InjectableDef<T>; }
|
||||
|
||||
|
@ -26,7 +26,7 @@ export const THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;
|
||||
* Requesting this token instead of `Injector` allows `StaticInjector` to be tree-shaken from a
|
||||
* project.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export const INJECTOR = new InjectionToken<Injector>('INJECTOR');
|
||||
|
||||
@ -445,7 +445,7 @@ export function setCurrentInjector(injector: Injector | null | undefined): Injec
|
||||
* of providing an additional array of dependencies as was common to do with `useFactory` providers.
|
||||
* `inject` is faster and more type-safe.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export function inject<T>(token: Type<T>| InjectionToken<T>): T;
|
||||
export function inject<T>(token: Type<T>| InjectionToken<T>, flags?: InjectFlags): T|null;
|
||||
|
@ -18,7 +18,7 @@ import {Type} from '../type';
|
||||
*
|
||||
* {@example core/di/ts/provider_spec.ts region='ValueSansProvider'}
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export interface ValueSansProvider {
|
||||
/**
|
||||
@ -64,7 +64,7 @@ export interface ValueProvider extends ValueSansProvider {
|
||||
*
|
||||
* {@example core/di/ts/provider_spec.ts region='StaticClassSansProvider'}
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export interface StaticClassSansProvider {
|
||||
/**
|
||||
@ -124,7 +124,7 @@ export interface StaticClassProvider extends StaticClassSansProvider {
|
||||
* class MyService {}
|
||||
* ```
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export interface ConstructorSansProvider {
|
||||
/**
|
||||
@ -215,7 +215,7 @@ export interface ExistingProvider extends ExistingSansProvider {
|
||||
*
|
||||
* {@example core/di/ts/provider_spec.ts region='FactorySansProvider'}
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export interface FactorySansProvider {
|
||||
/**
|
||||
@ -300,7 +300,7 @@ export interface TypeProvider extends Type<any> {}
|
||||
*
|
||||
* {@example core/di/ts/provider_spec.ts region='ClassSansProvider'}
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export interface ClassSansProvider {
|
||||
/**
|
||||
|
@ -66,7 +66,7 @@ interface Record<T> {
|
||||
/**
|
||||
* Create a new `Injector` which is configured using a `defType` of `InjectorType<any>`s.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export function createInjector(
|
||||
defType: /* InjectorType<any> */ any, parent: Injector | null = null,
|
||||
|
@ -140,7 +140,7 @@ export abstract class ReflectiveInjector implements Injector {
|
||||
* var injector = ReflectiveInjector.fromResolvedProviders(providers);
|
||||
* expect(injector.get(Car) instanceof Car).toBe(true);
|
||||
* ```
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
static fromResolvedProviders(providers: ResolvedReflectiveProvider[], parent?: Injector):
|
||||
ReflectiveInjector {
|
||||
|
@ -52,7 +52,7 @@ const _EMPTY_LIST: any[] = [];
|
||||
* expect(injector.get('message')).toEqual('Hello');
|
||||
* ```
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export interface ResolvedReflectiveProvider {
|
||||
/**
|
||||
@ -83,7 +83,7 @@ export class ResolvedReflectiveProvider_ implements ResolvedReflectiveProvider {
|
||||
|
||||
/**
|
||||
* An internal resolved representation of a factory function created by resolving `Provider`.
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export class ResolvedReflectiveFactory {
|
||||
constructor(
|
||||
|
@ -28,7 +28,7 @@ import {InjectionToken} from '../di/injection_token';
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* @experimental i18n support is experimental.
|
||||
* @publicApi
|
||||
*/
|
||||
export const LOCALE_ID = new InjectionToken<string>('LocaleId');
|
||||
|
||||
@ -54,7 +54,7 @@ export const LOCALE_ID = new InjectionToken<string>('LocaleId');
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* @experimental i18n support is experimental.
|
||||
* @publicApi
|
||||
*/
|
||||
export const TRANSLATIONS = new InjectionToken<string>('Translations');
|
||||
|
||||
@ -77,7 +77,7 @@ export const TRANSLATIONS = new InjectionToken<string>('Translations');
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* @experimental i18n support is experimental.
|
||||
* @publicApi
|
||||
*/
|
||||
export const TRANSLATIONS_FORMAT = new InjectionToken<string>('TranslationsFormat');
|
||||
|
||||
@ -102,7 +102,7 @@ export const TRANSLATIONS_FORMAT = new InjectionToken<string>('TranslationsForma
|
||||
* });
|
||||
* ```
|
||||
*
|
||||
* @experimental i18n support is experimental.
|
||||
* @publicApi
|
||||
*/
|
||||
export enum MissingTranslationStrategy {
|
||||
Error = 0,
|
||||
|
@ -23,7 +23,7 @@ let _runModeLocked: boolean = false;
|
||||
*
|
||||
* By default, this is true, unless a user calls `enableProdMode` before calling this.
|
||||
*
|
||||
* @experimental APIs related to application bootstrap are currently under review.
|
||||
* @publicApi
|
||||
*/
|
||||
export function isDevMode(): boolean {
|
||||
_runModeLocked = true;
|
||||
|
@ -21,7 +21,7 @@ import {NgModuleFactory} from './ng_module_factory';
|
||||
/**
|
||||
* Combination of NgModuleFactory and ComponentFactorys.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export class ModuleWithComponentFactories<T> {
|
||||
constructor(
|
||||
@ -91,7 +91,7 @@ export class Compiler {
|
||||
/**
|
||||
* Options for creating a compiler
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export type CompilerOptions = {
|
||||
useJit?: boolean,
|
||||
@ -104,14 +104,14 @@ export type CompilerOptions = {
|
||||
/**
|
||||
* Token to provide CompilerOptions in the platform injector.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export const COMPILER_OPTIONS = new InjectionToken<CompilerOptions[]>('compilerOptions');
|
||||
|
||||
/**
|
||||
* A factory for creating a Compiler
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export abstract class CompilerFactory {
|
||||
abstract createCompiler(options?: CompilerOptions[]): Compiler;
|
||||
|
@ -55,7 +55,7 @@ export interface InternalNgModuleRef<T> extends NgModuleRef<T> {
|
||||
}
|
||||
|
||||
/**
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export abstract class NgModuleFactory<T> {
|
||||
abstract get moduleType(): Type<T>;
|
||||
|
@ -20,7 +20,7 @@ let moduleFactories = new Map<string, NgModuleFactory<any>>();
|
||||
|
||||
/**
|
||||
* Registers a loaded module. Should only be called from generated NgModuleFactory code.
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export function registerModuleFactory(id: string, factory: NgModuleFactory<any>) {
|
||||
const existing = moduleFactories.get(id);
|
||||
@ -39,7 +39,7 @@ export function clearModulesForTest() {
|
||||
* Returns the NgModuleFactory with the given id, if it exists and has been loaded.
|
||||
* Factories for modules that do not specify an `id` cannot be retrieved. Throws if the module
|
||||
* cannot be found.
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export function getModuleFactory(id: string): NgModuleFactory<any> {
|
||||
const factory = moduleFactories.get(id);
|
||||
|
@ -22,7 +22,7 @@ declare var System: any;
|
||||
* Configuration for SystemJsNgModuleLoader.
|
||||
* token.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export abstract class SystemJsNgModuleLoaderConfig {
|
||||
/**
|
||||
@ -45,7 +45,7 @@ const DEFAULT_CONFIG: SystemJsNgModuleLoaderConfig = {
|
||||
|
||||
/**
|
||||
* NgModuleFactoryLoader that uses SystemJS to load NgModuleFactory
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
@Injectable()
|
||||
export class SystemJsNgModuleLoader implements NgModuleFactoryLoader {
|
||||
|
@ -13,9 +13,9 @@ import {ChangeDetectorRef} from '../change_detection/change_detector_ref';
|
||||
* Represents an Angular [view](guide/glossary#view),
|
||||
* specifically the [host view](guide/glossary#view-tree) that is defined by a component.
|
||||
* Also serves as the base class
|
||||
* that adds destroy methods for [embedded views](guide/glossary#view-tree).
|
||||
*
|
||||
* @see `EmbeddedViewRef`
|
||||
* that adds destroy methods for [embedded views](guide/glossary#view-tree).
|
||||
*
|
||||
* @see `EmbeddedViewRef`
|
||||
*/
|
||||
export abstract class ViewRef extends ChangeDetectorRef {
|
||||
/**
|
||||
@ -89,7 +89,7 @@ export abstract class ViewRef extends ChangeDetectorRef {
|
||||
* </ul>
|
||||
* <!-- /ViewRef: outer-0 -->
|
||||
* ```
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export abstract class EmbeddedViewRef<C> extends ViewRef {
|
||||
/**
|
||||
|
@ -43,7 +43,7 @@ import {makeParamDecorator, makePropDecorator} from '../util/decorators';
|
||||
* class ModuleWithRoutes {}
|
||||
* ```
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export const ANALYZE_FOR_ENTRY_COMPONENTS = new InjectionToken<any>('AnalyzeForEntryComponents');
|
||||
|
||||
|
@ -86,7 +86,7 @@ export interface ModuleWithProviders<
|
||||
*
|
||||
* @param name The name of a defined schema.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export interface SchemaMetadata { name: string; }
|
||||
|
||||
@ -105,7 +105,7 @@ export const CUSTOM_ELEMENTS_SCHEMA: SchemaMetadata = {
|
||||
/**
|
||||
* Defines a schema that allows any property on any element.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export const NO_ERRORS_SCHEMA: SchemaMetadata = {
|
||||
name: 'no-errors-schema'
|
||||
|
@ -23,6 +23,6 @@ const _CORE_PLATFORM_PROVIDERS: StaticProvider[] = [
|
||||
/**
|
||||
* This platform has to be included in any other platform
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export const platformCore = createPlatformFactory(null, 'core', _CORE_PLATFORM_PROVIDERS);
|
||||
|
@ -48,7 +48,7 @@ function noopScope(arg0?: any, arg1?: any): any {
|
||||
* needs to be fixed before the app should be profiled. Add try-finally only when you expect that
|
||||
* an exception is expected during normal execution while profiling.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export const wtfCreateScope: (signature: string, flags?: any) => WtfScopeFn =
|
||||
wtfEnabled ? createScope : (signature: string, flags?: any) => noopScope;
|
||||
@ -60,7 +60,7 @@ export const wtfCreateScope: (signature: string, flags?: any) => WtfScopeFn =
|
||||
* - `returnValue` (optional) to be passed to the WTF.
|
||||
*
|
||||
* Returns the `returnValue for easy chaining.
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export const wtfLeave: <T>(scope: any, returnValue?: T) => T =
|
||||
wtfEnabled ? leave : (s: any, r?: any) => r;
|
||||
@ -76,7 +76,7 @@ export const wtfLeave: <T>(scope: any, returnValue?: T) => T =
|
||||
* wtfEndTimeRange(s);
|
||||
* });
|
||||
* }
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export const wtfStartTimeRange: (rangeType: string, action: string) => any =
|
||||
wtfEnabled ? startTimeRange : (rangeType: string, action: string) => null;
|
||||
@ -85,6 +85,6 @@ export const wtfStartTimeRange: (rangeType: string, action: string) => any =
|
||||
* Ends a async time range operation.
|
||||
* [range] is the return value from [wtfStartTimeRange] Async ranges only work if WTF has been
|
||||
* enabled.
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export const wtfEndTimeRange: (range: any) => void = wtfEnabled ? endTimeRange : (r: any) => null;
|
||||
|
@ -11,7 +11,7 @@ import {global} from '../util';
|
||||
/**
|
||||
* A scope function for the Web Tracing Framework (WTF).
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export interface WtfScopeFn { (arg0?: any, arg1?: any): any; }
|
||||
|
||||
|
@ -119,7 +119,7 @@ export abstract class RootRenderer {
|
||||
/**
|
||||
* Used by `RendererFactory2` to associate custom rendering data and styles
|
||||
* with a rendering implementation.
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export interface RendererType2 {
|
||||
/**
|
||||
@ -152,7 +152,7 @@ export interface RendererType2 {
|
||||
/**
|
||||
* Creates and initializes a custom renderer that implements the `Renderer2` base class.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export abstract class RendererFactory2 {
|
||||
/**
|
||||
@ -179,7 +179,7 @@ export abstract class RendererFactory2 {
|
||||
|
||||
/**
|
||||
* Flags for renderer-specific style modifiers.
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export enum RendererStyleFlags2 {
|
||||
/**
|
||||
@ -205,7 +205,7 @@ export enum RendererStyleFlags2 {
|
||||
* not statically known, use the `setProperty()` or
|
||||
* `setAttribute()` method.
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export abstract class Renderer2 {
|
||||
/**
|
||||
|
@ -273,7 +273,7 @@ export function directiveInject<T>(
|
||||
* })
|
||||
* ```
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export function injectAttribute(attrNameToInject: string): string|undefined {
|
||||
const tNode = getPreviousOrParentTNode();
|
||||
|
@ -14,7 +14,7 @@ import {NgZone} from '../zone/ng_zone';
|
||||
* Testability API.
|
||||
* `declare` keyword causes tsickle to generate externs, so these methods are
|
||||
* not renamed by Closure Compiler.
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export declare interface PublicTestability {
|
||||
isStable(): boolean;
|
||||
@ -52,7 +52,7 @@ interface WaitCallback {
|
||||
* The Testability service provides testing hooks that can be accessed from
|
||||
* the browser and by services such as Protractor. Each bootstrapped Angular
|
||||
* application on the page will have an instance of Testability.
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
@Injectable()
|
||||
export class Testability implements PublicTestability {
|
||||
@ -223,7 +223,7 @@ export class Testability implements PublicTestability {
|
||||
|
||||
/**
|
||||
* A global registry of {@link Testability} instances for specific elements.
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
@Injectable()
|
||||
export class TestabilityRegistry {
|
||||
@ -283,7 +283,7 @@ export class TestabilityRegistry {
|
||||
* Adapter interface for retrieving the `Testability` service associated for a
|
||||
* particular context.
|
||||
*
|
||||
* @experimental Testability apis are primarily intended to be used by e2e test tool vendors like
|
||||
* @publicApi
|
||||
* the Protractor team.
|
||||
*/
|
||||
export interface GetTestability {
|
||||
@ -302,7 +302,7 @@ class _NoopGetTestability implements GetTestability {
|
||||
|
||||
/**
|
||||
* Set the {@link GetTestability} implementation used by the Angular testing framework.
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export function setTestabilityGetter(getter: GetTestability): void {
|
||||
_testabilityGetter = getter;
|
||||
|
@ -80,7 +80,7 @@ import {EventEmitter} from '../event_emitter';
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @experimental
|
||||
* @publicApi
|
||||
*/
|
||||
export class NgZone {
|
||||
readonly hasPendingMicrotasks: boolean = false;
|
||||
|
@ -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