From e2a99d14394b6fbcd60041fa6c2f786eb02ffe6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=9E=E4=BB=99=E9=83=BD=E6=B2=A1=E7=94=A8?= <615206459@qq.com> Date: Sat, 14 Oct 2023 13:42:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/cool/base.ts | 2 +- build/cool/eps/index.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/cool/base.ts b/build/cool/base.ts index ce3ea23..edd1832 100644 --- a/build/cool/base.ts +++ b/build/cool/base.ts @@ -1,4 +1,4 @@ -import { Plugin } from "vite"; +import type { Plugin } from "vite"; import { createSvg } from "./svg"; import { createTag } from "./tag"; import { createEps } from "./eps"; diff --git a/build/cool/eps/index.ts b/build/cool/eps/index.ts index dbfbd28..1b75b32 100644 --- a/build/cool/eps/index.ts +++ b/build/cool/eps/index.ts @@ -22,7 +22,7 @@ async function getData(temps?: Eps.Entity[]) { // 本地文件 try { list = JSON.parse(readFile(join(DistPath, "eps.json")) || "[]"); - } catch (err) { + } catch (err: any) { error(`[eps] ${join(DistPath, "eps.json")} 文件异常, ${err.message}`); } @@ -87,7 +87,7 @@ function createJson() { // 创建描述文件 async function createDescribe({ list, service }: { list: Eps.Entity[]; service: any }) { // 获取类型 - function getType({ propertyName, type }) { + function getType({ propertyName, type }: any) { for (const map of Entity.mapping) { if (map.custom) { const resType = map.custom({ propertyName, type });