-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not find a declaration file for module 'ava'. 'node_modules/ava/entrypoints/main.mjs' implicitly has an 'any' type. #2934
Comments
What happens with a stable TypeScript version, rather than a pre-release? |
Thanks @novemberborn it works with the stable version |
Fingers crossed then it's a TS bug that'll go away before final release. |
With typescript 4.7 release seems like it's still an issue when the project has
minimal repo: package.json: {
"name": "ava-ts-module",
"type": "module",
"version": "1.0.0",
"scripts": {
"test": "ava"
},
"devDependencies": {
"ava": "^4.2.0",
"ts-node": "^10.8.0",
"typescript": "^4.7.2"
},
"ava": {
"extensions": {
"ts": "module"
},
"nodeArguments": [
"--loader=ts-node/esm"
]
}
} tsconfig.json {
"compilerOptions": {
"module": "NodeNext",
"strict": true
}
} tests\sample.test.ts import test from 'ava';
test('one test', t => {
t.pass();
}); Seems like adding |
My test code is written in TypeScript but the type declarations cannot be found when using ava version 4. With ava version 3 it seems to work. This is probably due to the missing index.js file in the ava package?
Test file:
tests/my.test.ts
run:
output:
package.json
ava.config.js
tsconfig.json
Maybe i'm missing something. I'm happy to provide a repo for reproducing the problem.
The text was updated successfully, but these errors were encountered: