From 3064c3e75778817960e84b356b92ddca235d80c5 Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Sat, 30 Jul 2022 18:20:27 -0700 Subject: [PATCH] [feat] add SveltePreprocessor utility type --- src/compiler/preprocess/types.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/compiler/preprocess/types.ts b/src/compiler/preprocess/types.ts index b1e605238db..faef6c74ed5 100644 --- a/src/compiler/preprocess/types.ts +++ b/src/compiler/preprocess/types.ts @@ -40,3 +40,10 @@ export interface PreprocessorGroup { style?: Preprocessor; script?: Preprocessor; } + +export interface SveltePreprocessor< + PreprocessorType extends keyof PreprocessorGroup, + Options = any +> { + (options?: Options): Required>; +}