I am trying to setup @open-wc/testing for use in Typescript. I am attempting to follow this guide: https://open-wc.org/developing/types.html#types-are-good
I have the dependency saved as devDepdencies and can see it in my node_modules folder. I can also see some specific @types/... its added for mocha and chai.
However when I create a app.spec.ts file I only have access to the types that I've already added for the production code.
Here is my tsconfig.json
{
"compilerOptions": {
"target": "es2018",
"emitDecorationMetadata": true,
"experimentalDecorations": true,
"moduleResolution": "node",
"types": [ "lit-element", "rxjs", "rxjs/operators" ]
}
}
Now I know the guide says to do some other stuff like add allowJs, but I am not sure that's the issue here, because I will still expect the @types/mocha/@types/chai to be accessible from app.spec.ts, but they aren't (or at least that is what Visual Studio Code is reporting)
Aucun commentaire:
Enregistrer un commentaire