MCPcopy Create free account
hub / github.com/angular/components / getVersionUpgradeData

Function getVersionUpgradeData

src/cdk/schematics/ng-update/upgrade-data.ts:74–87  ·  view source on GitHub ↗
(migration: Migration<UpgradeData>, dataName: T)

Source from the content-addressed store, hash-verified

72 * data portion that is specifically tied to the target version.
73 */
74export function getVersionUpgradeData<
75 T extends keyof UpgradeData,
76 U = ValueOfChanges<UpgradeData[T]>,
77>(migration: Migration<UpgradeData>, dataName: T): U[] {
78 if (migration.targetVersion === null) {
79 return [];
80 }
81
82 // Note that below we need to cast to `unknown` first TS doesn't infer the type of T correctly.
83 return getChangesForTarget<U>(
84 migration.targetVersion,
85 migration.upgradeData[dataName] as unknown as VersionChanges<U>,
86 );
87}

Callers 11

CssTokensMigrationClass · 0.90
initMethod · 0.90
ClassNamesMigrationClass · 0.90
InputNamesMigrationClass · 0.90

Calls 1

getChangesForTargetFunction · 0.90

Tested by

no test coverage detected