Skip to content

Commit

Permalink
fix: add back global namespace type reference 🤔
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Sep 23, 2024
1 parent e8f58d1 commit 3e578f9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,5 +123,10 @@ export default defineNuxtModule<ModuleOptions>({
],
})
})

nuxt.options.typescript.hoist.push('@types/cloudflare-turnstile')
nuxt.hook('prepare:types', ({ references }) => {
references.push({ types: '@types/cloudflare-turnstile' })
})
},
})
2 changes: 1 addition & 1 deletion src/runtime/composables/turnstile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { RegistryScriptInput } from '#nuxt-scripts'

declare global {
interface Window {
// @types/cloudflare-turnsile doesn't provide full api
// @types/cloudflare-turnstile doesn't provide full api
turnstile: Turnstile.Turnstile
}
}
Expand Down

0 comments on commit 3e578f9

Please sign in to comment.