mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-17 11:03:53 +08:00
refactor(@angular/cli): remove async from abstract functions
This is in preparation to support TypeScript 4.1. Within TypeScript 4.1 abstract class members cannot be marked as async.
This commit is contained in:
parent
1479b3e8ed
commit
acc22a399f
@ -160,7 +160,7 @@ export abstract class Command<T extends BaseCommandOptions = BaseCommandOptions>
|
|||||||
this.analytics.pageview('/command/' + paths.join('/'), { dimensions, metrics });
|
this.analytics.pageview('/command/' + paths.join('/'), { dimensions, metrics });
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract async run(options: T & Arguments): Promise<number | void>;
|
abstract run(options: T & Arguments): Promise<number | void>;
|
||||||
|
|
||||||
async validateAndRun(options: T & Arguments): Promise<number | void> {
|
async validateAndRun(options: T & Arguments): Promise<number | void> {
|
||||||
if (!(options.help === true || options.help === 'json' || options.help === 'JSON')) {
|
if (!(options.help === true || options.help === 'json' || options.help === 'JSON')) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user