Open reedom opened 4 years ago
Hi @reedom, sorry for the late answer!
Have you tried copying the declaration in your project from the repo: https://github.com/sebelga/gstore-node/blob/master/typings/nsql-cache/index.d.ts
Cheers! 👍
Yes, I had tried and then posted this issue, while wondering it was whether the expected solution or just a workaround, or even it was only me who face this kind of type-not-found error.
And my question hasn't changed ever since.
Hello,
So indeed you need to copy the nsql-cache
typing from this repo into yours.
I added a "typings"
folder at the root with this folder structure
- typings
- nsql-cache
- index.d.ts
Then in you tsconfig.json
file you need to add this folder
// tsconfig.json
{
"compilerOptions": {
...
},
"include": [
"src",
"typings"
]
}
Let me know if it works for you.
When I invoke
tsc
upon my project, I got the following error innode_modules/gstore-node/lib/index
, due to lack ofnsql-cache
module's type definition. How other people overcome this?As workarounds, I could take the ways below, but I feel like none of them are best. a. turn off
strict
flag intsconfig.json
b. includesql-cache
's type definition ingstore-node
repository somehow