From 404171ca038adf1029efc16463704b97db2152e2 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Tue, 12 Nov 2019 16:24:02 +0530 Subject: [PATCH] sources type --- remix-tests/src/compiler.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/remix-tests/src/compiler.ts b/remix-tests/src/compiler.ts index 0ff0f9fbba..52ca31590a 100644 --- a/remix-tests/src/compiler.ts +++ b/remix-tests/src/compiler.ts @@ -41,7 +41,7 @@ function isRemixTestFile(path: string) { * @param isRoot True, If file is a root test contract file which is getting processed, not an imported file */ -function processFile(filePath: string, sources: any, isRoot: boolean = false) { +function processFile(filePath: string, sources: SrcIfc, isRoot: boolean = false) { const importRegEx: RegExp = /import ['"](.+?)['"];/g; let group: RegExpExecArray| null = null; const isFileAlreadyInSources: boolean = Object.keys(sources).includes(filePath) @@ -76,7 +76,7 @@ const isBrowser = !(typeof (window) === 'undefined' || userAgent.indexOf(' elect export function compileFileOrFiles(filename: string, isDirectory: boolean, opts: any, cb: Function) { let compiler: any let accounts: any[] = opts.accounts || [] - const sources: any = { + const sources: SrcIfc = { 'tests.sol': { content: require('../sol/tests.sol.js') }, 'remix_tests.sol': { content: require('../sol/tests.sol.js') }, 'remix_accounts.sol': { content: writeTestAccountsContract(accounts) }