mocha-steps
mocha-steps copied to clipboard
Namespace 'Mocha' has no exported member 'Func'.
node_modules/mocha-steps/lib/mocha-steps.d.ts(3,45): error TS2694: Namespace 'Mocha' has no exported member 'Func'.
node_modules/mocha-steps/lib/mocha-steps.d.ts(3,72): error TS2694: Namespace 'Mocha' has no exported member 'Test'.
node_modules/mocha-steps/lib/mocha-steps.d.ts(4,46): error TS2694: Namespace 'Mocha' has no exported member 'Func'.
node_modules/mocha-steps/lib/mocha-steps.d.ts(4,73): error TS2694: Namespace 'Mocha' has no exported member 'Test'.
This shows while compiling Typescript,
http://prntscr.com/nb4yan
Any ideas?
Still happening
@rprieto @mrhornsby @tandrup
Hi @goktugyil - have you got @types/Mocha as a devDependency for your project? Func
is defined in there https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/mocha/index.d.ts#L2219
Hi @goktugyil - have you got @types/Mocha as a devDependency for your project?
Func
is defined in there https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/mocha/index.d.ts#L2219
@mrhornsby I try get that, both 1.1.2 and 1.3.0, however it did not solve this error
Hi @goktugyil - I've just checked one of my projects and it is compiling fine and tests are passing. Here are all the versions that might be relevant from my package.json:
"@types/mocha": "7.0.2",
"mocha": "7.1.1",
"mocha-steps": "1.3.0",
"typescript": "3.5.2",
In my IDE clicking on the Func
symbol in mocha-steps
takes me through to @types/mocha
so I'm sure it is correctly resolving to the type.
The only additional thing might be something in your tsconfig.json
- I've copied a slightly redacted version of mine below to see if that gives you a clue:
{
"compilerOptions": {
"allowJs": true,
"module": "commonjs",
"moduleResolution": "node",
"outDir": "build",
"strict": true,
"target": "es2017",
"typeRoots": ["node_modules/@types"]
},
"include": ["src/ts/**/*.ts"]
}
Hope this helps to solve your issue as I can't really see what it would be beyond that.
Regards
Mark