@textlint/kernel
Version:
textlint kernel is core logic by pure JavaScript.
20 lines • 622 B
TypeScript
import type { TextlintPluginProcessor } from "@textlint/types";
import { TxtNode } from "@textlint/ast-node-types";
type PreProcess = ReturnType<TextlintPluginProcessor["processor"]>["preProcess"];
/**
* Parse text by plugin
* If parse error is occurred, return an Error
* @param preProcess
* @param sourceText
* @param filePath
*/
export declare const parseByPlugin: ({ preProcess, sourceText, filePath }: {
preProcess: PreProcess;
sourceText: string;
filePath?: string | undefined;
}) => Promise<{
text: string;
ast: TxtNode;
} | Error>;
export {};
//# sourceMappingURL=parse-by-plugin.d.ts.map