Closed
Description
🐛 The bug
ERROR(vue-tsc) Binding element 'Vimeo' implicitly has an 'any' type.
FILE D:/dev/test1/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_@[email protected]_terser@5_npscaliduljzxdqaosyipgid7y/node_modules/@nuxt/scripts/dist/runtime/components/ScriptVimeoPlayer.vue:187:21
185 |
186 | onMounted(() => {
> 187 | onLoaded(async ({ Vimeo }) => {
| ^^^^^
188 | const vimeoOptions = props.vimeoOptions || {}
189 | if (!vimeoOptions.id && props.id) {
190 | vimeoOptions.id = props.id
ERROR(vue-tsc) Parameter 'instance' implicitly has an 'any' type.
FILE D:/dev/test1/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_@[email protected]_terser@5_npscaliduljzxdqaosyipgid7y/node_modules/@nuxt/scripts/dist/runtime/components/ScriptYouTubePlayer.vue:61:19
59 | }
60 | onMounted(() => {
> 61 | onLoaded(async (instance) => {
| ^^^^^^^^
62 | const YouTube: typeof YT & { ready: (fn: () => void) => void } = await instance.YT
63 | await new Promise<void>((resolve) => {
64 | if (typeof YT.Player === 'undefined')
[vue-tsc] Found 2 errors. Watching for file changes.
When using Nuxt Devtools in typescript strict mode and enabling type check, these two errors will be occurred.
export default defineNuxtConfig({
devtools: { enabled: true },
modules: ['@nuxt/scripts'],
typescript: {
typeCheck: true,
strict: true
},
})
I think this might be related to #217 (comment). These are same errors as what in that comment.
Versions:
@nuxt/scripts: 0.8.4
@nuxt/devtools : 1.4.1
vue-tsc: 2.0.29
🛠️ To reproduce
https://stackblitz.com/~/github.com/ifrvn/nuxt-scripts-issue-test
🌈 Expected behavior
no error
ℹ️ Additional context
No response