upgrade-data.d.ts 1.9 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /**
  2. * @license
  3. * Copyright Google LLC All Rights Reserved.
  4. *
  5. * Use of this source code is governed by an MIT-style license that can be
  6. * found in the LICENSE file at https://angular.dev/license
  7. */
  8. import { Migration } from '../update-tool/migration';
  9. import { ValueOfChanges, VersionChanges } from '../update-tool/version-changes';
  10. import { AttributeSelectorUpgradeData, ClassNameUpgradeData, ConstructorChecksUpgradeData, CssSelectorUpgradeData, ElementSelectorUpgradeData, InputNameUpgradeData, MethodCallUpgradeData, OutputNameUpgradeData, PropertyNameUpgradeData, SymbolRemovalUpgradeData, CssTokenUpgradeData } from './data';
  11. /** Upgrade data for the Angular CDK. */
  12. export declare const cdkUpgradeData: UpgradeData;
  13. /**
  14. * Interface that describes the upgrade data that needs to be defined when using the CDK
  15. * upgrade rules.
  16. */
  17. export interface UpgradeData {
  18. attributeSelectors: VersionChanges<AttributeSelectorUpgradeData>;
  19. classNames: VersionChanges<ClassNameUpgradeData>;
  20. constructorChecks: VersionChanges<ConstructorChecksUpgradeData>;
  21. cssSelectors: VersionChanges<CssSelectorUpgradeData>;
  22. cssTokens: VersionChanges<CssTokenUpgradeData>;
  23. elementSelectors: VersionChanges<ElementSelectorUpgradeData>;
  24. inputNames: VersionChanges<InputNameUpgradeData>;
  25. methodCallChecks: VersionChanges<MethodCallUpgradeData>;
  26. outputNames: VersionChanges<OutputNameUpgradeData>;
  27. propertyNames: VersionChanges<PropertyNameUpgradeData>;
  28. symbolRemoval: VersionChanges<SymbolRemovalUpgradeData>;
  29. }
  30. /**
  31. * Gets the reduced upgrade data for the specified data key. The function reads out the
  32. * target version and upgrade data object from the migration and resolves the specified
  33. * data portion that is specifically tied to the target version.
  34. */
  35. export declare function getVersionUpgradeData<T extends keyof UpgradeData, U = ValueOfChanges<UpgradeData[T]>>(migration: Migration<UpgradeData>, dataName: T): U[];