Skip to content

Commit a0978b1

Browse files
committed
refactor: fix types to remove any
require() returns any so we were missing some typing errors.
1 parent 483cbe2 commit a0978b1

File tree

21 files changed

+81
-57
lines changed

21 files changed

+81
-57
lines changed

packages/angular/cli/commands/add.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@ import { NpmInstall } from '../tasks/npm-install';
1616
import { getPackageManager } from '../utilities/config';
1717

1818

19-
export default class AddCommand extends SchematicCommand {
19+
export class AddCommand extends SchematicCommand {
2020
readonly name = 'add';
2121
readonly description = 'Add support for a library to your project.';
2222
readonly allowPrivateSchematics = true;
23-
scope = CommandScope.inProject;
23+
static aliases = [];
24+
static scope = CommandScope.inProject;
2425
arguments = ['collection'];
2526
options: Option[] = [];
2627

packages/angular/cli/commands/build.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ import { ArchitectCommand, ArchitectCommandOptions } from '../models/architect-c
1010
import { CommandScope, Option } from '../models/command';
1111
import { Version } from '../upgrade/version';
1212

13-
export default class BuildCommand extends ArchitectCommand {
13+
export class BuildCommand extends ArchitectCommand {
1414
public readonly name = 'build';
1515
public readonly target = 'build';
1616
public readonly description =
1717
'Builds your app and places it into the output path (dist/ by default).';
1818
public static aliases = ['b'];
19-
public scope = CommandScope.inProject;
19+
public static scope = CommandScope.inProject;
2020
public options: Option[] = [
2121
this.prodOption,
2222
this.configurationOption,

packages/angular/cli/commands/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ function normalizeValue(value: string, path: string): JsonValue {
178178
return value;
179179
}
180180

181-
export default class ConfigCommand extends Command {
181+
export class ConfigCommand extends Command {
182182
public readonly name = 'config';
183183
public readonly description = 'Get/set configuration values.';
184184
public readonly arguments = ['jsonPath', 'value'];

packages/angular/cli/commands/doc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export interface Options {
1414
search?: boolean;
1515
}
1616

17-
export default class DocCommand extends Command {
17+
export class DocCommand extends Command {
1818
public readonly name = 'doc';
1919
public readonly description = 'Opens the official Angular API documentation for a given keyword.';
2020
public static aliases = ['d'];

packages/angular/cli/commands/e2e.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ import { ArchitectCommand, ArchitectCommandOptions } from '../models/architect-c
1010
import { CommandScope, Option } from '../models/command';
1111

1212

13-
export default class E2eCommand extends ArchitectCommand {
13+
export class E2eCommand extends ArchitectCommand {
1414
public readonly name = 'e2e';
1515
public readonly target = 'e2e';
1616
public readonly description = 'Run e2e tests in existing project.';
1717
public static aliases: string[] = ['e'];
18-
public readonly scope = CommandScope.inProject;
18+
public static scope = CommandScope.inProject;
1919
public readonly multiTarget = true;
2020
public readonly options: Option[] = [
2121
this.prodOption,

packages/angular/cli/commands/easter-egg.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function pickOne(of: string[]): string {
1313
return of[Math.floor(Math.random() * of.length)];
1414
}
1515

16-
export default class AwesomeCommand extends Command {
16+
export class AwesomeCommand extends Command {
1717
public readonly name = 'make-this-awesome';
1818
public readonly description = '';
1919
public readonly hidden = true;

packages/angular/cli/commands/eject.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ import { tags } from '@angular-devkit/core';
1010
import { Command, Option } from '../models/command';
1111

1212

13-
export default class EjectCommand extends Command {
13+
export class EjectCommand extends Command {
1414
public readonly name = 'eject';
1515
public readonly description = 'Temporarily disabled. Ejects your app and output the proper '
1616
+ 'webpack configuration and scripts.';
1717
public readonly arguments: string[] = [];
1818
public readonly options: Option[] = [];
19+
public static aliases = [];
1920

2021
run() {
2122
this.logger.info(tags.stripIndents`

packages/angular/cli/commands/generate.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ import {
1717
} from '../utilities/schematics';
1818

1919

20-
export default class GenerateCommand extends SchematicCommand {
20+
export class GenerateCommand extends SchematicCommand {
2121
public readonly name = 'generate';
2222
public readonly description = 'Generates and/or modifies files based on a schematic.';
2323
public static aliases = ['g'];
24-
public readonly scope = CommandScope.inProject;
24+
public static scope = CommandScope.inProject;
2525
public arguments = ['schematic'];
2626
public options: Option[] = [
2727
...this.coreOptions,

packages/angular/cli/commands/getset.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export interface Options {
1313
search?: boolean;
1414
}
1515

16-
export default class GetSetCommand extends Command {
16+
export class GetSetCommand extends Command {
1717
public readonly name = 'getset';
1818
public readonly description = 'Deprecated in favor of config command.';
1919
public readonly arguments: string[] = [];

packages/angular/cli/commands/help.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { terminal } from '@angular-devkit/core';
1111
import { Command, Option } from '../models/command';
1212

1313

14-
export default class HelpCommand extends Command {
14+
export class HelpCommand extends Command {
1515
public readonly name = 'help';
1616
public readonly description = 'Help.';
1717
public readonly arguments: string[] = [];

0 commit comments

Comments
 (0)