Files
blog/node_modules/hexo/dist/extend/processor.d.ts
2025-07-16 16:30:56 +00:00

19 lines
496 B
TypeScript

import { Pattern } from 'hexo-util';
import type File from '../box/file';
interface StoreFunction {
(file: File): any;
}
type Store = {
pattern: Pattern;
process: StoreFunction;
}[];
type patternType = Exclude<ConstructorParameters<typeof Pattern>[0], ((str: string) => string)>;
declare class Processor {
store: Store;
constructor();
list(): Store;
register(fn: StoreFunction): void;
register(pattern: patternType, fn: StoreFunction): void;
}
export = Processor;