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

Method _createMigrations

src/cdk/schematics/update-tool/index.ts:172–194  ·  view source on GitHub ↗

* Creates instances of the given migrations with the specified target * version and data.

(
    types: MigrationCtor<Data, Context>[],
    target: TargetVersion | null,
    data: Data,
  )

Source from the content-addressed store, hash-verified

170 * version and data.
171 */
172 private _createMigrations<Data>(
173 types: MigrationCtor<Data, Context>[],
174 target: TargetVersion | null,
175 data: Data,
176 ): Migration<Data, Context>[] {
177 const result: Migration<Data, Context>[] = [];
178 for (const ctor of types) {
179 const instance = new ctor(
180 this._program,
181 this._typeChecker,
182 target,
183 this._context,
184 data,
185 this._fileSystem,
186 this._logger,
187 );
188 instance.init();
189 if (instance.enabled) {
190 result.push(instance);
191 }
192 }
193 return result;
194 }
195
196 /**
197 * Creates a program from the specified tsconfig and patches the host

Callers 1

migrateMethod · 0.95

Calls 2

pushMethod · 0.65
initMethod · 0.45

Tested by

no test coverage detected