diff --git a/src/editor/index.ts b/src/editor/index.ts index e16cbf631..09e472afc 100644 --- a/src/editor/index.ts +++ b/src/editor/index.ts @@ -64,6 +64,13 @@ import defaults from './config/config'; import EditorModel from './model/Editor'; import EditorView from './view/EditorView'; +export type ParsedRule = { + selectors: string; + style: Record; + atRule?: string; + params?: string; +}; + export default class EditorModule implements IBaseModule { constructor(config = {}, opts: any = {}) { //@ts-ignore @@ -644,7 +651,7 @@ export default class EditorModule implements IBaseModule { * return result; * }); */ - setCustomParserCss(parser: any) { + setCustomParserCss(parser: (css: string, editor: EditorModule) => ParsedRule[]) { this.Parser.getConfig().parserCss = parser; return this; }