From cd0d11a007c5c3207a6d8fe8bb7e2a462b256f83 Mon Sep 17 00:00:00 2001 From: Mimi <1119186082@qq.com> Date: Fri, 25 Nov 2022 11:46:05 +0800 Subject: [PATCH] number_format --- lib/plugins/helper/number_format.ts | 2 +- lib/plugins/tag/include_code.ts | 2 +- lib/theme/processors/source.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/plugins/helper/number_format.ts b/lib/plugins/helper/number_format.ts index fe78432c48..350e1b1129 100644 --- a/lib/plugins/helper/number_format.ts +++ b/lib/plugins/helper/number_format.ts @@ -1,7 +1,7 @@ interface Options { delimiter?: string; separator?: string; - precision?: number | string; + precision?: number; } function numberFormatHelper(num: number, options: Options = {}) { diff --git a/lib/plugins/tag/include_code.ts b/lib/plugins/tag/include_code.ts index e03c3fecc8..f752fa5901 100644 --- a/lib/plugins/tag/include_code.ts +++ b/lib/plugins/tag/include_code.ts @@ -54,7 +54,7 @@ export = ctx => function includeCodeTag(args) { return exists(src).then(exist => { if (exist) return readFile(src); - }).then(code => { + }).then((code: string) => { if (!code) return; const lines = code.split('\n'); diff --git a/lib/theme/processors/source.ts b/lib/theme/processors/source.ts index 4233bac613..97688b7ba7 100644 --- a/lib/theme/processors/source.ts +++ b/lib/theme/processors/source.ts @@ -1,5 +1,5 @@ import {Pattern} from 'hexo-util'; -import common from '../../plugins/processor/common'; +import * as common from '../../plugins/processor/common'; export function process(file) { const Asset = this.model('Asset');