* Creates instances of the given migrations with the specified target * version and data.
(
types: MigrationCtor<Data, Context>[],
target: TargetVersion | null,
data: Data,
)
| 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 |