Skip to content

Commit 7ba2314

Browse files
committed
type fixes
1 parent e37d708 commit 7ba2314

2 files changed

Lines changed: 15 additions & 7 deletions

File tree

packages/apollo/src/Command.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export abstract class ProjectCommand extends Command {
9191
};
9292

9393
public project!: GraphQLProject;
94-
public tasks: Listr.ListrRawTask[] = [];
94+
public tasks: Listr.ListrTask[] = [];
9595

9696
protected type: "service" | "client" = "service";
9797
protected configMap?: (flags: any) => DeepPartial<ApolloConfig>;
@@ -215,7 +215,7 @@ export abstract class ProjectCommand extends Command {
215215
}
216216

217217
async runTasks<Result>(
218-
generateTasks: (context: ProjectContext) => Listr.ListrRawTask[],
218+
generateTasks: (context: ProjectContext) => Listr.ListrTask[],
219219
options?: Listr.ListrOptions | ((ctx: ProjectContext) => Listr.ListrOptions)
220220
): Promise<Result> {
221221
const { ctx } = this;

packages/apollo/src/utils/CompactRenderer.ts

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
1-
import { ListrTask, ListrOptions, ListrError } from "listr";
1+
import {
2+
ListrRenderer,
3+
ListrTaskObject,
4+
ListrOptions,
5+
ListrError
6+
} from "listr";
27

3-
export class CompactRenderer {
4-
_tasks: ReadonlyArray<ListrTask>;
8+
export class CompactRenderer<Ctx> implements ListrRenderer {
9+
_tasks: ReadonlyArray<ListrTaskObject<Ctx>>;
510

6-
constructor(tasks: ReadonlyArray<ListrTask>, options: ListrOptions) {
11+
constructor(
12+
tasks: ReadonlyArray<ListrTaskObject<Ctx>>,
13+
options: ListrOptions<Ctx>
14+
) {
715
this._tasks = tasks;
816
}
917

@@ -24,5 +32,5 @@ export class CompactRenderer {
2432
});
2533
}
2634

27-
end(err: ListrError) {}
35+
end(err: ListrError<Ctx>) {}
2836
}

0 commit comments

Comments
 (0)