huang-julien / nuxt-applicationinsights

ApplicationInsights module for Nuxt 3.
15 stars 0 forks source link

RuntimeConfig types breaks since version 0.5.0 #65

Closed julien1619 closed 3 weeks ago

julien1619 commented 3 weeks ago

I updated this module in 0.5.0 in my Nuxt 3 codebase and every access to the Runtime Config from my server side part are breaking and considered unknown when typechecking my project.

For example:

server/connectors/tenant/fr/auth.ts:41:7 - error TS2322: Type 'unknown' is not assignable to type 'string'.

41       client_secret: clientSecret,

Here is a small repro repository: https://github.com/Creatiwity/nuxt-appinsights-repro-fail

You can test it this way (with bun or npm):

bun install
bun run typecheck # will error

If you remove nuxt-applicationinsights from the modules list it will work.