mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-16 21:58:19 +00:00
fix(components): augment 'vue' module rather than overwriting (#305)
This commit is contained in:
parent
2abac1d78c
commit
b53d8a77ff
42
packages/app/types/shims.d.ts
vendored
42
packages/app/types/shims.d.ts
vendored
@ -3,35 +3,33 @@ import { $Fetch } from 'ohmyfetch'
|
||||
import { Nuxt } from '../dist'
|
||||
|
||||
declare global {
|
||||
// eslint-disable-next-line no-var
|
||||
var $fetch: $Fetch
|
||||
// eslint-disable-next-line no-var
|
||||
var $fetch: $Fetch
|
||||
|
||||
namespace NodeJS {
|
||||
interface Global {
|
||||
$fetch: $Fetch
|
||||
}
|
||||
interface Process {
|
||||
browser: boolean
|
||||
client: boolean
|
||||
mode: 'spa' | 'universal'
|
||||
server: boolean
|
||||
static: boolean
|
||||
}
|
||||
namespace NodeJS {
|
||||
interface Global {
|
||||
$fetch: $Fetch
|
||||
}
|
||||
interface Process {
|
||||
browser: boolean
|
||||
client: boolean
|
||||
mode: 'spa' | 'universal'
|
||||
server: boolean
|
||||
static: boolean
|
||||
}
|
||||
}
|
||||
|
||||
interface Window {
|
||||
__NUXT__?: Record<string, any>
|
||||
}
|
||||
interface Window {
|
||||
__NUXT__?: Record<string, any>
|
||||
}
|
||||
}
|
||||
|
||||
declare module '*.vue' {
|
||||
export default Vue
|
||||
export default Vue
|
||||
}
|
||||
|
||||
declare module 'vue' {
|
||||
interface App {
|
||||
$nuxt: Nuxt
|
||||
}
|
||||
interface App {
|
||||
$nuxt: Nuxt
|
||||
}
|
||||
}
|
||||
|
||||
export {}
|
||||
|
@ -5,3 +5,6 @@ declare module 'vue' {
|
||||
}).join(',\n') %>
|
||||
}
|
||||
}
|
||||
|
||||
// export required to turn this into a module for TS augmentation purposes
|
||||
export { }
|
||||
|
4
packages/nitro/src/runtime/types.d.ts
vendored
4
packages/nitro/src/runtime/types.d.ts
vendored
@ -7,5 +7,5 @@ declare global {
|
||||
}
|
||||
}
|
||||
|
||||
// type export required to turn this into a module for TS augmentation purposes
|
||||
export type A = {}
|
||||
// export required to turn this into a module for TS augmentation purposes
|
||||
export { }
|
||||
|
2
packages/nitro/types/shims.d.ts
vendored
2
packages/nitro/types/shims.d.ts
vendored
@ -21,5 +21,3 @@ declare module '#assets' {
|
||||
export function statAsset(id: string): Promise<AssetMeta>
|
||||
export function getAsset<T=any>(id: string): { read: () => Promise<T>, meta: AssetMeta }
|
||||
}
|
||||
|
||||
export {}
|
||||
|
Loading…
Reference in New Issue
Block a user