fix(nitro): correct #assets type declaration (#2403)

This commit is contained in:
Daniel Roe 2021-12-17 09:26:34 +00:00 committed by GitHub
parent d3e27874f5
commit d91677e72f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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' {