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