Change type of preprocessor functions to include Promise

pull/3414/head
Luiz Corte Real 6 years ago committed by Tech
parent 3bbfccc4cc
commit a304b661c5

@ -8,7 +8,7 @@ export interface PreprocessorGroup {
markup?: (options: { markup?: (options: {
content: string; content: string;
filename: string; filename: string;
}) => Processed; }) => Processed | Promise<Processed>;
style?: Preprocessor; style?: Preprocessor;
script?: Preprocessor; script?: Preprocessor;
} }
@ -17,7 +17,7 @@ export type Preprocessor = (options: {
content: string; content: string;
attributes: Record<string, string | boolean>; attributes: Record<string, string | boolean>;
filename?: string; filename?: string;
}) => Processed; }) => Processed | Promise<Processed>;
function parse_attributes(str: string) { function parse_attributes(str: string) {
const attrs = {}; const attrs = {};

Loading…
Cancel
Save