From e0719fb7386ce5c528caf6811aea53df259a48a8 Mon Sep 17 00:00:00 2001 From: dimaslanjaka Date: Wed, 17 May 2023 16:12:32 +0700 Subject: [PATCH] feat(PatternMatchResult): add boolean type see usage as boolean: - https://github.com/dimaslanjaka/hexo/blob/4ba63bc65d05d231fd1db1053013e2ae71661a70/lib/plugins/processor/common.ts#L29-L32 - https://github.com/dimaslanjaka/hexo/blob/4ba63bc65d05d231fd1db1053013e2ae71661a70/lib/theme/processors/source.ts#L25-L32 --- lib/pattern.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pattern.ts b/lib/pattern.ts index 3ac48074..f90461cb 100644 --- a/lib/pattern.ts +++ b/lib/pattern.ts @@ -2,7 +2,7 @@ import escapeRegExp from './escape_regexp'; const rParam = /([:*])([\w?]*)?/g; -type PatternMatchResult = RegExpMatchArray | Record; +type PatternMatchResult = boolean | RegExpMatchArray | Record; class Pattern { match: (str: string) => PatternMatchResult;