]> git.ipfire.org Git - thirdparty/vuejs/router.git/commitdiff
chore: add vm to playground for testing purposes
authorEduardo San Martin Morote <posva13@gmail.com>
Thu, 9 Apr 2020 13:32:41 +0000 (15:32 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Thu, 9 Apr 2020 13:32:41 +0000 (15:32 +0200)
playground/main.ts

index bfdfa541962088e8218c073b4216fb8feae67ffa..defbc8f753cd3cc2b19831b42d06c54ef4a1b2f5 100644 (file)
@@ -1,6 +1,6 @@
 // necessary for webpack
 ///<reference path="../src/global.d.ts"/>
-import { createApp } from 'vue'
+import { createApp, App as Application } from 'vue'
 import { router, routerHistory } from './router'
 import { globalState } from './store'
 import App from './App.vue'
@@ -10,6 +10,7 @@ declare global {
     // h: HTML5History
     h: typeof routerHistory
     r: typeof router
+    vm: ReturnType<Application['mount']>
   }
 }
 
@@ -21,4 +22,4 @@ const app = createApp(App)
 app.provide('state', globalState)
 app.use(router)
 
-app.mount('#app')
+window.vm = app.mount('#app')