fix(nuxt3): correct app types (#630)

* fix(nuxt3): correct app types

* fix module augmentation
* include all shims in types file

* style: disable eslint rule
This commit is contained in:
Daniel Roe 2021-10-02 23:39:02 +01:00 committed by GitHub
parent 5cf293ea88
commit 768488f07d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 7 deletions

View File

@ -24,7 +24,7 @@ export interface RuntimeNuxtHooks {
}
export interface NuxtApp {
app: App
app: App<Element>
globalName: string
hooks: Hookable<RuntimeNuxtHooks>

View File

@ -1,4 +1,4 @@
import './shims'
// eslint-disable-next-line
export * from '../dist'
export * from '../index'

View File

@ -1,5 +1,4 @@
// eslint-disable-next-line import/default
import Vue from 'vue'
import { Component } from '@vue/runtime-core'
import { $Fetch } from 'ohmyfetch'
import { Nuxt } from '../dist'
@ -26,11 +25,12 @@ declare global {
}
declare module '*.vue' {
export default Vue
export default Component
}
declare module 'vue' {
interface App {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
interface App<HostElement> {
$nuxt: Nuxt
}
}

View File

@ -1,2 +1,2 @@
export * from './dist/index'
export * from './dist/app/index'
export * from './dist/app/types/index'