Skip to content

Commit

Permalink
fix(TS2322): Type '((str: string) => PatternMatchResult) | StoreFunct…
Browse files Browse the repository at this point in the history
…ion' is not assignable to type 'StoreFunction'.
  • Loading branch information
dimaslanjaka committed Oct 5, 2024
1 parent c089dfe commit 85b66d4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/extend/processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import { Pattern } from 'hexo-util';
import type File from '../box/file';

interface StoreFunction {
(file: File): any
(file: File | string): any;
}

type Store = {
pattern: Pattern;
process: StoreFunction
}[];
pattern: Pattern;
process: StoreFunction;
}[];

type patternType = Exclude<ConstructorParameters<typeof Pattern>[0], ((str: string) => string)>;
type patternType = Exclude<ConstructorParameters<typeof Pattern>[0], (str: string) => string>;
class Processor {
public store: Store;

Expand Down

0 comments on commit 85b66d4

Please sign in to comment.