Skip to content

Commit

Permalink
refactor: 💡 simplify types
Browse files Browse the repository at this point in the history
  • Loading branch information
kaisermann committed Jun 8, 2020
1 parent b82d2ca commit 4ae99b8
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,26 +52,8 @@ export interface Transformers {
[languageName: string]: TransformerOptions;
}

export type AutoPreprocessOptions = {
export type AutoPreprocessOptions = Transformers & {
markupTagName?: string;
aliases?: Array<[string, string]>;
preserve?: string[];
typescript?: TransformerOptions<Options.Typescript>;
scss?: TransformerOptions<Options.Sass>;
sass?: TransformerOptions<Options.Sass>;
less?: TransformerOptions<Options.Less>;
stylus?: TransformerOptions<Options.Stylus>;
postcss?: TransformerOptions<Options.Postcss>;
babel?: TransformerOptions<Options.Babel>;
coffeescript?: TransformerOptions<Options.Coffeescript>;
pug?: TransformerOptions<Options.Pug>;
globalStyle?: Options.GlobalStyle;
// workaround while we don't have this
// https://github.com/microsoft/TypeScript/issues/17867
[languageName: string]:
| string
| Promise<string>
| Array<[string, string]>
| string[]
| TransformerOptions;
};

0 comments on commit 4ae99b8

Please sign in to comment.