From baec49f4aa828bf8d622531713290b55a1be49e3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=C3=A3o=20Magalh=C3=A3es?= <joamag@gmail.com>
Date: Sun, 17 Jul 2022 10:45:02 +0100
Subject: [PATCH] fixed: issue with ts and vue

---
 examples/web/index.ts                | 4 +---
 examples/web/shims-vue.d.ts          | 4 ++++
 examples/web/vue/app.vue             | 2 +-
 examples/web/vue/components/index.ts | 2 +-
 examples/web/vue/index.ts            | 1 -
 5 files changed, 7 insertions(+), 6 deletions(-)
 create mode 100644 examples/web/shims-vue.d.ts

diff --git a/examples/web/index.ts b/examples/web/index.ts
index 9acc538c..270a8246 100644
--- a/examples/web/index.ts
+++ b/examples/web/index.ts
@@ -3,8 +3,6 @@ import Boytacean from "./vue/app.vue";
 import { default as _wasm, GameBoy, PadKey, PpuMode } from "./lib/boytacean.js";
 import info from "./package.json";
 
-console.info(Boytacean);
-
 const PIXEL_UNSET_COLOR = 0x1b1a17ff;
 
 const LOGIC_HZ = 600;
@@ -13,7 +11,7 @@ const TIMER_HZ = 60;
 const IDLE_HZ = 10;
 
 const FREQUENCY_DELTA = 60;
-
+ 
 const DISPLAY_WIDTH = 160;
 const DISPLAY_HEIGHT = 144;
 const DISPLAY_RATIO = DISPLAY_WIDTH / DISPLAY_HEIGHT;
diff --git a/examples/web/shims-vue.d.ts b/examples/web/shims-vue.d.ts
new file mode 100644
index 00000000..ce8ffebf
--- /dev/null
+++ b/examples/web/shims-vue.d.ts
@@ -0,0 +1,4 @@
+declare module "*.vue" {
+    import Vue from "vue";
+    export default Vue;
+}
diff --git a/examples/web/vue/app.vue b/examples/web/vue/app.vue
index 5154c7de..f9265d49 100644
--- a/examples/web/vue/app.vue
+++ b/examples/web/vue/app.vue
@@ -9,7 +9,7 @@
 }
 </style>
 
-<script>
+<script lang="ts">
 export const Boytacean = {
     data() {
         return {
diff --git a/examples/web/vue/components/index.ts b/examples/web/vue/components/index.ts
index a6aa31e1..d54b4044 100644
--- a/examples/web/vue/components/index.ts
+++ b/examples/web/vue/components/index.ts
@@ -1,6 +1,6 @@
 import { App } from "vue";
 
-import { Button } from "./button/button.vue";
+import Button from "./button/button.vue";
 
 const install = (Vue: App) => {
     Vue.component("vue", Button);
diff --git a/examples/web/vue/index.ts b/examples/web/vue/index.ts
index ab32c201..3b2fc528 100644
--- a/examples/web/vue/index.ts
+++ b/examples/web/vue/index.ts
@@ -7,6 +7,5 @@ const install = (Vue: App) => {
 };
 
 export * from "./components";
-export { Boytacean } from "./app.vue";
 
 export default install;
-- 
GitLab