mirror of
https://github.com/imsyy/DailyHotApi.git
synced 2026-01-12 13:14:55 +08:00
🔧 build: 修正类型错误
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "dailyhot-api",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.1",
|
||||
"description": "An Api on Today's Hot list",
|
||||
"keywords": [
|
||||
"API",
|
||||
|
||||
@@ -4,7 +4,7 @@ import logger from "./utils/logger.js";
|
||||
import app from "./app.js";
|
||||
|
||||
// 启动服务器
|
||||
const serveHotApi = (port: number = config.PORT) => {
|
||||
const serveHotApi: (port?: number) => void = (port: number = config.PORT) => {
|
||||
try {
|
||||
const apiServer = serve({
|
||||
fetch: app.fetch,
|
||||
|
||||
3
src/types.d.ts
vendored
3
src/types.d.ts
vendored
@@ -63,6 +63,3 @@ export type Web = {
|
||||
export type Options = {
|
||||
[key: string]: string | undefined;
|
||||
};
|
||||
|
||||
// serveHotApi
|
||||
export default function serveHotApi(port?: number): unknown;
|
||||
@@ -3,11 +3,13 @@
|
||||
"target": "ESNext",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Bundler",
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"strict": false,
|
||||
"types": ["node"],
|
||||
"jsx": "react-jsx",
|
||||
"jsxImportSource": "hono/jsx",
|
||||
"outDir": "./dist"
|
||||
},
|
||||
"exclude": ["node_modules", "*.test.*"]
|
||||
"exclude": ["node_modules", "*.test.*", "./dist/**/*"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user