From 7e07c8e8d8380a1891fa471e20deee73214dc47c Mon Sep 17 00:00:00 2001 From: bluwy Date: Thu, 4 Nov 2021 20:41:22 +0800 Subject: [PATCH] fix: loosen preprocessor types --- src/compiler/preprocess/types.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compiler/preprocess/types.ts b/src/compiler/preprocess/types.ts index 4ac441b5e6..af49705c25 100644 --- a/src/compiler/preprocess/types.ts +++ b/src/compiler/preprocess/types.ts @@ -19,8 +19,8 @@ export interface Processed { export type MarkupPreprocessor = (options: { content: string; - filename: string; -}) => Processed | Promise; + filename?: string; +}) => Processed | void | Promise; export type Preprocessor = (options: { /** @@ -33,7 +33,7 @@ export type Preprocessor = (options: { */ markup: string; filename?: string; -}) => Processed | Promise; +}) => Processed | void | Promise; export interface PreprocessorGroup { markup?: MarkupPreprocessor;