Skip to content

Commit

Permalink
feat(docs): rewrite Expo.vue in TS (#397)
Browse files Browse the repository at this point in the history
Rewrites `src/pages/Expo.vue` in TypeScript.

All the changes are straightforward. Here is a tip for TypeScript
migration:
- Explicitly import and register Buefy components so that they are
  type-checked. Note that no type-checking is performed for globally
  registered components.
  • Loading branch information
kikuomax authored Jan 16, 2025
1 parent a488f79 commit 5e33a3b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions packages/docs/src/pages/Expo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,14 @@
</article>
</template>

<script>
<script lang="ts">
import { defineComponent } from 'vue'
import { BIcon } from '@ntohq/buefy-next'
import expoData from '@/data/expo'
export default {
export default defineComponent({
components: { BIcon },
data() {
return {
expo: expoData
Expand All @@ -72,9 +76,9 @@
window.open(url, '', opts)
},
getImg(img) {
getImg(img: string) {
return new URL(`/src/assets/expo/${img}`, import.meta.url).href
}
}
}
})
</script>

0 comments on commit 5e33a3b

Please sign in to comment.