mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-18 01:15:58 +00:00
fix(nitro): correct #assets
type declaration (#2403)
This commit is contained in:
parent
d3e27874f5
commit
d91677e72f
10
packages/nitro/types/shims.d.ts
vendored
10
packages/nitro/types/shims.d.ts
vendored
@ -5,9 +5,13 @@ declare module '#storage' {
|
||||
|
||||
declare module '#assets' {
|
||||
export interface AssetMeta { type?: string, etag?: string, mtime?: string }
|
||||
export function readAsset<T = any> (id: string): Promise<T>
|
||||
export function statAsset (id: string): Promise<AssetMeta>
|
||||
export function getKeys() : Promise<string[]>
|
||||
|
||||
export const assets: {
|
||||
getKeys(): Promise<string[]>
|
||||
hasItem(id: string): Promise<boolean>
|
||||
getItem<T = any> (id: string): Promise<T>
|
||||
getMeta(id: string): Promise<AssetMeta>
|
||||
}
|
||||
}
|
||||
|
||||
declare module '#config' {
|
||||
|
Loading…
Reference in New Issue
Block a user