Skip to content

Commit 2f7f00f

Browse files
committed
refactor(@schematics/angular): replace usage of unknown for any
Google3 is still on TypeScript 2.9.
1 parent 3127fed commit 2f7f00f

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

packages/schematics/angular/utility/project.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,14 @@ export function getProject<TProjectType extends ProjectType = ProjectType.Applic
3535
return workspace.projects[projectName] as WorkspaceProject<TProjectType>;
3636
}
3737

38-
export function isWorkspaceSchema(workspace: unknown): workspace is WorkspaceSchema {
38+
// TODO(hans): change this any to unknown when google3 supports TypeScript 3.0.
39+
// tslint:disable-next-line:no-any
40+
export function isWorkspaceSchema(workspace: any): workspace is WorkspaceSchema {
3941
return !!(workspace && (workspace as WorkspaceSchema).projects);
4042
}
4143

42-
export function isWorkspaceProject(project: unknown): project is WorkspaceProject {
44+
// TODO(hans): change this any to unknown when google3 supports TypeScript 3.0.
45+
// tslint:disable-next-line:no-any
46+
export function isWorkspaceProject(project: any): project is WorkspaceProject {
4347
return !!(project && (project as WorkspaceProject).projectType);
4448
}

packages/schematics/angular/utility/workspace-models.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,5 +146,7 @@ export interface WorkspaceTargets<TProjectType extends ProjectType = ProjectType
146146
e2e?: E2EBuilderTarget;
147147
'app-shell'?: AppShellBuilderTarget;
148148
'extract-i18n'?: ExtractI18nBuilderTarget;
149-
[key: string]: unknown;
149+
// TODO(hans): change this any to unknown when google3 supports TypeScript 3.0.
150+
// tslint:disable-next-line:no-any
151+
[key: string]: any;
150152
}

0 commit comments

Comments
 (0)