Typecheck fails in fresh project if `typescript.strict = false`
alexblunck opened this issue · comments
I am getting following Error when running npx nuxi typecheck
in a fresh project with only @nuxt/scripts installed.
Error only occurs if typescript.strict
ist set to false
in nuxt.config.ts
.
node_modules/@nuxt/scripts/dist/runtime/components/ScriptGoogleAdsense.vue:31:6 - error TS2322: Type '(any[] & { loaded: boolean; }) | undefined[]' is not assignable to type 'any[] & { loaded: boolean; }'.
Type 'undefined[]' is not assignable to type 'any[] & { loaded: boolean; }'.
Property 'loaded' is missing in type 'undefined[]' but required in type '{ loaded: boolean; }'.
31 (window.adsbygoogle = window.adsbygoogle || []).push({})
~~~~~~~~~~~~~~~~~~
node_modules/@nuxt/scripts/dist/runtime/registry/google-adsense.d.ts:14:9
14 loaded: boolean;
~~~~~~
'loaded' is declared here.
Found 1 error in node_modules/@nuxt/scripts/dist/runtime/components/ScriptGoogleAdsense.vue:31
Reproduction: https://stackblitz.com/edit/nuxt-starter-8gr3ay
Fixed in 0.6.1, thanks for reporting!