Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit 0d15b57

Browse files
committed
add type
1 parent 773e176 commit 0d15b57

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/workflow-compile/src/index.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import debugModule from "debug";
22
const debug = debugModule("workflow-compile");
33
import fse from "fs-extra";
44
import { prepareConfig } from "./utils";
5-
import { Shims } from "@truffle/compile-common";
5+
import { Shims, Compilation } from "@truffle/compile-common";
66
import { getTruffleDb } from "@truffle/db-loader";
77

88
const SUPPORTED_COMPILERS = {
@@ -13,15 +13,13 @@ const SUPPORTED_COMPILERS = {
1313

1414
async function compile(config) {
1515
// determine compiler(s) to use
16-
//
1716
const compilers = config.compiler
1817
? config.compiler === "none"
1918
? []
2019
: [config.compiler]
2120
: Object.keys(config.compilers);
2221

2322
// invoke compilers
24-
//
2523
const rawCompilations = await Promise.all(
2624
compilers.map(async name => {
2725
const Compile = SUPPORTED_COMPILERS[name];
@@ -44,7 +42,7 @@ async function compile(config) {
4442
// collect results - rawCompilations is CompilerResult[]
4543
// flatten the array and remove compilations without results
4644
const compilations = rawCompilations.reduce((a, compilerResult) => {
47-
compilerResult.compilations.forEach(compilation => {
45+
compilerResult.compilations.forEach((compilation: Compilation) => {
4846
if (compilation.contracts.length > 0) {
4947
a = a.concat(compilation);
5048
}

0 commit comments

Comments
 (0)