little-cartoon-10569
07/01/2020, 1:24 AMreturn pulumi.all([this.vpc.publicSubnets, this.vpc.privateSubnets, this.vpc.isolatedSubnets]).apply(([pub, pri, iso]) => {
// ...
});
That's all good in VSCode, Pulumi CLI, and Mocha (when called from VSCode's Test Explorer). But when I run my tests from the command line, I'm getting implicit-any errors:
main/pulumi/resources/Vpc.ts:72:108 - error TS7031: Binding element 'pub' implicitly has an 'any' type.
72 return pulumi.all([this.vpc.publicSubnets, this.vpc.privateSubnets, this.vpc.isolatedSubnets]).apply(([pub, pri, iso]) => {
What might cause this? My tsconfig.json files are almost identical (the test one has an additional glob in the include section for the test directory), my package.json's scripts.test section is pretty straightforward
"scripts": {
"compile": "tsc",
"lint": "node_modules/tslint/bin/tslint --project tsconfig.json",
"prepare": "npm run compile",
"test": "env TS_NODE_PROJECT=\"tsconfig.test.json\" node --trace-warnings --unhandled-rejections=strict node_modules/mocha/bin/_mocha --config test/mocha/.mocharc.json",
},
I have no idea what I'm doing wrong....apply()
. For example:
pulumi.all([this.publicSubnets, this.privateSubnets]).apply([pub, pri]: awsx.ec2.Subnet[][]) => {
// ...
});
melodic-beard-90525
07/02/2020, 10:49 PMlittle-cartoon-10569
07/03/2020, 2:19 AM