index.d.ts 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. /**
  2. * @license Angular v19.2.13
  3. * (c) 2010-2025 Google LLC. https://angular.io/
  4. * License: MIT
  5. */
  6. import * as i0 from '@angular/core';
  7. import { ModuleWithProviders, Provider, OnDestroy } from '@angular/core';
  8. export { ANIMATION_MODULE_TYPE } from '@angular/core';
  9. import { BrowserModule } from '../browser.d-C4gIBeOX.js';
  10. import { ɵAnimationEngine as _AnimationEngine, AnimationDriver, ɵAnimationStyleNormalizer as _AnimationStyleNormalizer } from '@angular/animations/browser';
  11. import '@angular/common';
  12. /**
  13. * Object used to configure the behavior of {@link BrowserAnimationsModule}
  14. * @publicApi
  15. */
  16. interface BrowserAnimationsModuleConfig {
  17. /**
  18. * Whether animations should be disabled. Passing this is identical to providing the
  19. * `NoopAnimationsModule`, but it can be controlled based on a runtime value.
  20. */
  21. disableAnimations?: boolean;
  22. }
  23. /**
  24. * Exports `BrowserModule` with additional dependency-injection providers
  25. * for use with animations. See [Animations](guide/animations).
  26. * @publicApi
  27. */
  28. declare class BrowserAnimationsModule {
  29. /**
  30. * Configures the module based on the specified object.
  31. *
  32. * @param config Object used to configure the behavior of the `BrowserAnimationsModule`.
  33. * @see {@link BrowserAnimationsModuleConfig}
  34. *
  35. * @usageNotes
  36. * When registering the `BrowserAnimationsModule`, you can use the `withConfig`
  37. * function as follows:
  38. * ```ts
  39. * @NgModule({
  40. * imports: [BrowserAnimationsModule.withConfig(config)]
  41. * })
  42. * class MyNgModule {}
  43. * ```
  44. */
  45. static withConfig(config: BrowserAnimationsModuleConfig): ModuleWithProviders<BrowserAnimationsModule>;
  46. static ɵfac: i0.ɵɵFactoryDeclaration<BrowserAnimationsModule, never>;
  47. static ɵmod: i0.ɵɵNgModuleDeclaration<BrowserAnimationsModule, never, never, [typeof BrowserModule]>;
  48. static ɵinj: i0.ɵɵInjectorDeclaration<BrowserAnimationsModule>;
  49. }
  50. /**
  51. * Returns the set of dependency-injection providers
  52. * to enable animations in an application. See [animations guide](guide/animations)
  53. * to learn more about animations in Angular.
  54. *
  55. * @usageNotes
  56. *
  57. * The function is useful when you want to enable animations in an application
  58. * bootstrapped using the `bootstrapApplication` function. In this scenario there
  59. * is no need to import the `BrowserAnimationsModule` NgModule at all, just add
  60. * providers returned by this function to the `providers` list as show below.
  61. *
  62. * ```ts
  63. * bootstrapApplication(RootComponent, {
  64. * providers: [
  65. * provideAnimations()
  66. * ]
  67. * });
  68. * ```
  69. *
  70. * @publicApi
  71. */
  72. declare function provideAnimations(): Provider[];
  73. /**
  74. * A null player that must be imported to allow disabling of animations.
  75. * @publicApi
  76. */
  77. declare class NoopAnimationsModule {
  78. static ɵfac: i0.ɵɵFactoryDeclaration<NoopAnimationsModule, never>;
  79. static ɵmod: i0.ɵɵNgModuleDeclaration<NoopAnimationsModule, never, never, [typeof BrowserModule]>;
  80. static ɵinj: i0.ɵɵInjectorDeclaration<NoopAnimationsModule>;
  81. }
  82. /**
  83. * Returns the set of dependency-injection providers
  84. * to disable animations in an application. See [animations guide](guide/animations)
  85. * to learn more about animations in Angular.
  86. *
  87. * @usageNotes
  88. *
  89. * The function is useful when you want to bootstrap an application using
  90. * the `bootstrapApplication` function, but you need to disable animations
  91. * (for example, when running tests).
  92. *
  93. * ```ts
  94. * bootstrapApplication(RootComponent, {
  95. * providers: [
  96. * provideNoopAnimations()
  97. * ]
  98. * });
  99. * ```
  100. *
  101. * @publicApi
  102. */
  103. declare function provideNoopAnimations(): Provider[];
  104. declare class InjectableAnimationEngine extends _AnimationEngine implements OnDestroy {
  105. constructor(doc: Document, driver: AnimationDriver, normalizer: _AnimationStyleNormalizer);
  106. ngOnDestroy(): void;
  107. static ɵfac: i0.ɵɵFactoryDeclaration<InjectableAnimationEngine, never>;
  108. static ɵprov: i0.ɵɵInjectableDeclaration<InjectableAnimationEngine>;
  109. }
  110. export { BrowserAnimationsModule, NoopAnimationsModule, provideAnimations, provideNoopAnimations, InjectableAnimationEngine as ɵInjectableAnimationEngine };
  111. export type { BrowserAnimationsModuleConfig };