/
githubmirror
/
angular-cli
Обзор
Документация
Войти
/
githubmirror
/
angular-cli
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/angular_devkit/schematics/tasks/run-schematic/task.ts
42 строки
1 KB
Ash Ramirez
refactor(@angular/cli): update aio links -> adev links
06 июн 2024, 12:12
06 июн 2024, 12:12
434a374
Код
Авторство
О чём код?
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import { TaskConfiguration, TaskConfigurationGenerator } from '../../src'; import { RunSchematicName, RunSchematicTaskOptions } from './options'; export class RunSchematicTask<T> implements TaskConfigurationGenerator<RunSchematicTaskOptions<T>> { protected _collection: string | null; protected _schematic: string; protected _options: T; constructor(s: string, o: T); constructor(c: string, s: string, o: T); constructor(c: string | null, s: string | T, o?: T) { if (arguments.length == 2 || typeof s !== 'string') { o = s as T; s = c as string; c = null; } this._collection = c; this._schematic = s; this._options = o as T; } toConfiguration(): TaskConfiguration<RunSchematicTaskOptions<T>> { return { name: RunSchematicName, options: { collection: this._collection, name: this._schematic, options: this._options, }, }; } }