Declare Chai custom plugin as a NodeJS global variable in TypeScript
问题 Here is my previous question TL;DR: I'm trying to declare types for my NodeJS global variables (which I'm setting up in the before hook), so the TypeScript can recognize it. My wdio.conf: ... let chai = require('chai'); let { customAssert } = require('../helpers/customAssert'); ... before: async function (capabilities, specs) { // I have accomplished to declare types for this variables thanks to the answer in the previous question global.foo = "bar" global.expect= chai.expect; global.helpers