Closed ThibaultVlacich closed 1 month ago
When nuxt-applicationinsights is installed, running nuxi typecheck will raise errors that the output of useRuntimeConfig() is unknown
nuxt-applicationinsights
nuxi typecheck
useRuntimeConfig()
unknown
Very easy to create a reproduction: just create a new Nuxt 3 project, and add this:
nuxt.config.ts:
nuxt.config.ts
runtimeConfig: { public: { test: "", }, },
app.vue:
app.vue
<script setup lang="ts"> const config = useRuntimeConfig() const test: string = config.public.test </script>
This raises no error, but as soon as modules: ["nuxt-applicationinsights"], is added to nuxt.config.ts, an error appears saying that Type 'unknown' is not assignable to type 'string'.
modules: ["nuxt-applicationinsights"],
Type 'unknown' is not assignable to type 'string'.
When
nuxt-applicationinsights
is installed, runningnuxi typecheck
will raise errors that the output ofuseRuntimeConfig()
isunknown
Very easy to create a reproduction: just create a new Nuxt 3 project, and add this:
nuxt.config.ts
:app.vue
:This raises no error, but as soon as
modules: ["nuxt-applicationinsights"],
is added tonuxt.config.ts
, an error appears saying thatType 'unknown' is not assignable to type 'string'.