Skip to content

Commit

Permalink
chore: add type assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Apr 26, 2023
1 parent 61c9064 commit 83d0a64
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/nuxt/src/app/components/nuxt-island.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { RendererNode } from 'vue'
import type { RendererNode, Slots } from 'vue'
import { computed, createStaticVNode, defineComponent, getCurrentInstance, h, ref, watch } from 'vue'
import { debounce } from 'perfect-debounce'
import { hash } from 'ohash'
Expand Down Expand Up @@ -74,7 +74,7 @@ export default defineComponent({
if (process.server || !nuxtApp.isHydrating) {
await fetchComponent()
}
return () => h((_, { slots }) => slots.default?.(), { key: key.value }, {
return () => h((_, { slots }) => (slots as Slots).default?.(), { key: key.value }, {
default: () => [createStaticVNode(html.value, 1)]
})
}
Expand Down
2 changes: 1 addition & 1 deletion packages/nuxt/src/app/components/nuxt-link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export function defineNuxtLink (options: NuxtLinkOptions) {
onNuxtReady(() => {
idleId = requestIdleCallback(() => {
if (el?.value?.tagName) {
unobserve = observer!.observe(el.value, async () => {
unobserve = observer!.observe(el.value as HTMLElement, async () => {
unobserve?.()
unobserve = null

Expand Down

0 comments on commit 83d0a64

Please sign in to comment.