Export CachifiedOptionsWithSchema type#171
Conversation
to fix: > The inferred type of 'cache' cannot be named without a reference to '../../../../node_modules/@epic-web/cachified/dist/src/common'. This is likely not portable. A type annotation is necessary.ts(2742) When using `configure`
|
Makes sense but can you elaborate your scenario? Usually I'd try to avoid explicit type annotations so I'm wondering why you need it. On my end, this TS warning happens when I have configured a internal module to produce declarations + maps. Maybe your root fix might be ts-config not this. But its hard to tell without more context. |
|
My code: const cache = configure(opts)
// ^^^^^ The inferred type of 'cache' cannot be named without a reference to '../../../../node_modules/@epic-web/cachified/dist/src/common'. This is likely not portable. A type annotation is necessary.ts(2742)In my case, it is used in a monorepo where the package is configured to emit .d.ts & maps. yes I can fix it with tsconfig updates (and I already did since I no longer build with tsc) but I think the type should probably be exported though |
|
Yes, I agree! Thanks for the context helps us understand the use-cases and implications! |
|
🎉 This PR is included in version 5.6.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
to fix:
When using
configure