} from './types'
import { onBeforeRouteLeave } from './navigationGuards'
+// necessary for webpack
+///<reference path="global.d.ts"/>
+
declare module 'vue' {
function inject<T>(key: InjectionKey<T> | string): T | undefined
function inject<T>(key: InjectionKey<T> | string, defaultValue: T): T
import { inject, getCurrentInstance, warn } from 'vue'
import { matchedRouteKey } from './components/View'
-// TODO: why is this necessary if it's in global.d.ts, included in tsconfig.json
-declare var __DEV__: boolean
-
export function onBeforeRouteLeave(leaveGuard: NavigationGuard) {
const instance = getCurrentInstance()
if (!instance) {
vue: '@vue/runtime-dom',
},
// Add `.ts` and `.tsx` as a resolvable extension.
- extensions: ['.ts', '.tsx', '.js', '.vue'],
+ extensions: ['.ts', 'd.ts', '.tsx', '.js', '.vue'],
},
plugins: [
new VueLoaderPlugin(),