Saturday, 10 June 2017

Pass array to async library eachSeries - expects 'Dictionary<{}>'

I have the following TypeScript code:

const allDescribeBlocks: Array<ITestSuite> = suman.allDescribeBlocks;

async.eachSeries(allDescribeBlocks, function (block: ITestSuite, cb: Function) {

//....

}, cb);

this will transpile with warnings:

Argument of type ITestSuite[] is not assignable to parameter of type Dictionary<{}>. Index signature is missing in ITestSuite[].

How to fix?

Here is the exact warning:enter image description here



via Alexander Mills

No comments:

Post a Comment