types(compiler-sfc): use specific preprocessLang instead of string (#528)

This commit is contained in:
Pocho
2019-12-10 03:19:39 +08:00
committed by Evan You
parent 9b5c4a2ec1
commit 55e234816e
2 changed files with 6 additions and 3 deletions

View File

@@ -104,7 +104,9 @@ const styl: StylePreprocessor = {
}
}
export const processors: Record<string, StylePreprocessor> = {
export type PreprocessLang = 'less' | 'sass' | 'scss' | 'styl' | 'stylus'
export const processors: Record<PreprocessLang, StylePreprocessor> = {
less,
sass,
scss,