From ccf7d791497139951fde58168999d44e18f706ee Mon Sep 17 00:00:00 2001 From: Oyster Lee Date: Tue, 11 Jan 2022 16:58:26 +0800 Subject: [PATCH] fix(types): add missing options parameter to importMeta (#6433) --- packages/vite/types/importMeta.d.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/vite/types/importMeta.d.ts b/packages/vite/types/importMeta.d.ts index d93fed42129c26..4ff865658cf372 100644 --- a/packages/vite/types/importMeta.d.ts +++ b/packages/vite/types/importMeta.d.ts @@ -4,6 +4,8 @@ /* eslint-disable @typescript-eslint/consistent-type-imports */ +import type { AssertOptions } from '../src/node/importGlob' + interface ImportMeta { url: string @@ -50,14 +52,20 @@ interface ImportMeta { readonly env: ImportMetaEnv - glob(pattern: string): Record< + glob( + pattern: string, + options?: AssertOptions + ): Record< string, () => Promise<{ [key: string]: any }> > - globEager(pattern: string): Record< + globEager( + pattern: string, + options?: AssertOptions + ): Record< string, { [key: string]: any