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

Function getChangesForTarget

src/cdk/schematics/update-tool/version-changes.ts:31–38  ·  view source on GitHub ↗
(target: TargetVersion, data: VersionChanges<T>)

Source from the content-addressed store, hash-verified

29 * easy iterable array.
30 */
31export function getChangesForTarget<T>(target: TargetVersion, data: VersionChanges<T>): T[] {
32 if (!data) {
33 const version = (TargetVersion as Record<string, string>)[target];
34 throw new Error(`No data could be found for target version: ${version}`);
35 }
36
37 return (data[target] || []).reduce((result, prData) => result.concat(prData.changes), [] as T[]);
38}
39
40/**
41 * Gets all changes from the specified version changes object. This is helpful in case a migration

Callers 2

getVersionUpgradeDataFunction · 0.90
getAllChangesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected