@@ -174,7 +174,10 @@ export async function taskCompileSolidityGetCompilationJobs(
174
174
config : BuildConfig ,
175
175
dependencyGraph : taskTypes . DependencyGraph ,
176
176
solidityFilesCache ?: SolidityFilesCache ,
177
- ) {
177
+ ) : Promise < {
178
+ jobs : taskTypes . CompilationJob [ ] ;
179
+ errors : taskTypes . CompilationJobCreationError [ ] ;
180
+ } > {
178
181
const connectedComponents = dependencyGraph . getConnectedComponents ( ) ;
179
182
180
183
log (
@@ -218,7 +221,7 @@ export async function taskCompileSolidityGetCompilationJobs(
218
221
*/
219
222
export async function taskCompileSolidityHandleCompilationJobsFailures (
220
223
compilationJobsCreationErrors : CompilationJobCreationError [ ] ,
221
- ) {
224
+ ) : Promise < void > {
222
225
const hasErrors = compilationJobsCreationErrors . length > 0 ;
223
226
224
227
if ( hasErrors ) {
@@ -536,7 +539,9 @@ export async function taskCompileSolidityMergeCompilationJobs(
536
539
/**
537
540
* Prints a message when there's nothing to compile.
538
541
*/
539
- export async function taskCompileSolidityLogNothingToCompile ( quiet : boolean ) {
542
+ export async function taskCompileSolidityLogNothingToCompile (
543
+ quiet : boolean ,
544
+ ) : Promise < void > {
540
545
if ( ! quiet ) {
541
546
console . log ( "Nothing to compile" ) ;
542
547
}
@@ -548,7 +553,7 @@ export async function taskCompileSolidityLogDownloadCompilerStart(
548
553
solcVersion : string ,
549
554
isCompilerDownloaded : boolean ,
550
555
_quiet : boolean , // TODO: keep unused?
551
- ) {
556
+ ) : Promise < void > {
552
557
if ( isCompilerDownloaded ) {
553
558
return ;
554
559
}
@@ -561,7 +566,7 @@ export async function taskCompileSolidityLogDownloadCompilerEnd(
561
566
_solcVersion : string , // TODO: keep unused?
562
567
_isCompilerDownloaded : boolean , // TODO: keep unused?
563
568
_quiet : boolean , // TODO: keep unused?
564
- ) {
569
+ ) : Promise < void > {
565
570
return ;
566
571
}
567
572
@@ -659,7 +664,7 @@ export async function taskCompileSolidityLogRunCompilerStart(
659
664
_compilationJobs : CompilationJob [ ] , // TODO: keep unused?
660
665
_compilationJobIndex : number , // TODO: keep unused?
661
666
_quiet : boolean , // TODO: keep unused?
662
- ) {
667
+ ) : Promise < void > {
663
668
return ;
664
669
}
665
670
@@ -716,7 +721,7 @@ export async function taskCompileSolidityLogRunCompilerEnd(
716
721
_compilationJobIndex : number , // TODO: keep unused?
717
722
_output : any , // TODO: keep unused?
718
723
_quiet : boolean , // TODO: keep unused?
719
- ) {
724
+ ) : Promise < void > {
720
725
return ;
721
726
}
722
727
@@ -785,7 +790,10 @@ export async function taskCompileSolidityCompile(
785
790
compilationJob : CompilationJob ,
786
791
compilationJobs : CompilationJob [ ] ,
787
792
compilationJobIndex : number ,
788
- ) {
793
+ ) : Promise < {
794
+ output : CompilerOutput ;
795
+ solcBuild : taskTypes . SolcBuild ;
796
+ } > {
789
797
return taskCompileSolidityCompileSolc (
790
798
input ,
791
799
quiet ,
@@ -805,7 +813,7 @@ export async function taskCompileSolidityCompile(
805
813
export async function taskCompileSolidityLogCompilationErrors (
806
814
output : any ,
807
815
_quiet : boolean , // TODO: keep unused?
808
- ) {
816
+ ) : Promise < void > {
809
817
if ( output ?. errors === undefined ) {
810
818
return ;
811
819
}
@@ -883,7 +891,7 @@ function isConsoleLogError(error: any): boolean {
883
891
export async function taskCompileSolidityCheckErrors (
884
892
output : any ,
885
893
quiet : boolean ,
886
- ) {
894
+ ) : Promise < void > {
887
895
await taskCompileSolidityLogCompilationErrors ( output , quiet ) ;
888
896
889
897
if ( hasCompilationErrors ( output ) ) {
@@ -1001,7 +1009,13 @@ export async function taskCompileSolidityCompileJob(
1001
1009
quiet : boolean ,
1002
1010
emitsArtifacts : boolean ,
1003
1011
artifacts : Artifacts ,
1004
- ) {
1012
+ ) : Promise < {
1013
+ artifactsEmittedPerFile : taskTypes . ArtifactsEmittedPerFile ;
1014
+ compilationJob : taskTypes . CompilationJob ;
1015
+ input : CompilerInput ;
1016
+ output : CompilerOutput ;
1017
+ solcBuild : taskTypes . SolcBuild ;
1018
+ } > {
1005
1019
log ( `Compiling job with version '${ compilationJob . getSolcConfig ( ) . version } '` ) ;
1006
1020
const input : CompilerInput =
1007
1021
await taskCompileSolidityGetCompilerInput ( compilationJob ) ;
@@ -1128,7 +1142,7 @@ export async function taskCompileSolidityCompileJobs(
1128
1142
export async function taskCompileSolidityLogCompilationResult (
1129
1143
compilationJobs : CompilationJob [ ] ,
1130
1144
_quiet ?: boolean , // TODO: keep unused?
1131
- ) {
1145
+ ) : Promise < void > {
1132
1146
let count = 0 ;
1133
1147
const evmVersions = new Set < string > ( ) ;
1134
1148
const unknownEvmVersions = new Set < string > ( ) ;
@@ -1173,7 +1187,9 @@ export async function taskCompileSolidityLogCompilationResult(
1173
1187
1174
1188
// TASK_COMPILE_REMOVE_OBSOLETE_ARTIFACTS
1175
1189
// TESTED
1176
- export async function taskCompileRemoveObsoleteArtifacts ( artifacts : Artifacts ) {
1190
+ export async function taskCompileRemoveObsoleteArtifacts (
1191
+ artifacts : Artifacts ,
1192
+ ) : Promise < void > {
1177
1193
/* eslint-disable-next-line @typescript-eslint/consistent-type-assertions --
1178
1194
We know this is the actual implementation, so we use some non-public methods
1179
1195
here by downcasting */
@@ -1247,7 +1263,7 @@ export async function taskCompileSolidity(
1247
1263
quiet : boolean ,
1248
1264
concurrency : number ,
1249
1265
tasksOverrides : TasksOverrides | undefined ,
1250
- ) {
1266
+ ) : Promise < void > {
1251
1267
const rootPath = config . paths . root ;
1252
1268
1253
1269
const sourcePaths : string [ ] = await taskCompileSolidityGetSourcePaths (
0 commit comments