input-names.d.ts 1.1 KB

1234567891011121314151617181920212223242526
  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 { ResolvedResource } from '../../update-tool/component-resource-collector';
  9. import { Migration } from '../../update-tool/migration';
  10. import { InputNameUpgradeData } from '../data';
  11. import { UpgradeData } from '../upgrade-data';
  12. /**
  13. * Migration that walks through every template or stylesheet and replaces outdated input
  14. * names to the new input name. Selectors in stylesheets could also target input
  15. * bindings declared as static attribute. See for example:
  16. *
  17. * e.g. `<my-component color="primary">` becomes `my-component[color]`
  18. */
  19. export declare class InputNamesMigration extends Migration<UpgradeData> {
  20. /** Change data that upgrades to the specified target version. */
  21. data: InputNameUpgradeData[];
  22. enabled: boolean;
  23. visitStylesheet(stylesheet: ResolvedResource): void;
  24. visitTemplate(template: ResolvedResource): void;
  25. private _replaceInputName;
  26. }