@@ -18,6 +18,7 @@ import { useModal } from '~/composables/useModal'
1818import { useAtproto } from ' ~/composables/atproto/useAtproto'
1919import { togglePackageLike } from ' ~/utils/atproto/likes'
2020import { LinkBase } from ' #components'
21+ import type { RouteLocationRaw } from ' vue-router'
2122
2223defineOgImageComponent (' Package' , {
2324 name : () => packageName .value ,
@@ -516,7 +517,7 @@ useSeoMeta({
516517 twitterDescription : () => pkg .value ?.description ?? ' ' ,
517518})
518519
519- const linkCode = computed ((): Parameters < typeof navigateTo >[ 0 ] | null => {
520+ const codeLink = computed ((): RouteLocationRaw | null => {
520521 if (pkg .value == null || resolvedVersion .value == null ) {
521522 return null
522523 }
@@ -535,10 +536,10 @@ const linkCode = computed((): Parameters<typeof navigateTo>[0] | null => {
535536onKeyStroke (
536537 e => isKeyWithoutModifiers (e , ' .' ) && ! isEditableElement (e .target ),
537538 e => {
538- if (linkCode .value === null ) return
539+ if (codeLink .value === null ) return
539540 e .preventDefault ()
540541
541- navigateTo (linkCode .value )
542+ navigateTo (codeLink .value )
542543 },
543544 { dedupe: true },
544545)
@@ -674,9 +675,9 @@ onKeyStroke(
674675 {{ $t('package.links.docs') }}
675676 </LinkBase >
676677 <LinkBase
677- v-if =" linkCode "
678+ v-if =" codeLink "
678679 variant =" button-secondary"
679- :to =" linkCode "
680+ :to =" codeLink "
680681 aria-keyshortcuts =" ."
681682 classicon =" i-carbon:code"
682683 >
0 commit comments