feat: 迭代

This commit is contained in:
2026-05-14 09:55:25 +08:00
parent 6eed65baf2
commit c647f3c8cd
27 changed files with 2242 additions and 105 deletions
+4
View File
@@ -2,10 +2,14 @@
"name": "@rent/shared-types",
"version": "1.0.0",
"private": true,
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc",
"dev": "tsc --watch"
},
"devDependencies": {
"typescript": "^6.0.3"
}
}
+5
View File
@@ -293,3 +293,8 @@ export interface ISellerInfo {
merchantId?: number;
merchantStatus?: MerchantStatus;
}
// ===================== 导出财务相关模块 =====================
export * from './finance';
export * from './finance-constants';
+3 -2
View File
@@ -1,14 +1,15 @@
{
"compilerOptions": {
"target": "ES2020",
"module": "commonjs",
"module": "ESNext",
"declaration": true,
"outDir": "./dist",
"rootDir": "./src",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
"forceConsistentCasingInFileNames": true,
"moduleResolution": "bundler"
},
"include": ["src"],
"exclude": ["node_modules", "dist"]
+4
View File
@@ -2,10 +2,14 @@
"name": "@rent/shared-utils",
"version": "1.0.0",
"private": true,
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc",
"dev": "tsc --watch"
},
"devDependencies": {
"typescript": "^6.0.3"
}
}
+4
View File
@@ -50,3 +50,7 @@ export function calcOrderAmount(roomPrice: number, nights: number, couponDiscoun
const payAmount = Math.max(0, totalAmount - couponDiscount);
return { totalAmount, payAmount };
}
// ===================== 导出格式化工具 =====================
export * from './format';
+3 -2
View File
@@ -1,14 +1,15 @@
{
"compilerOptions": {
"target": "ES2020",
"module": "commonjs",
"module": "ESNext",
"declaration": true,
"outDir": "./dist",
"rootDir": "./src",
"strict": true,
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
"forceConsistentCasingInFileNames": true,
"moduleResolution": "bundler"
},
"include": ["src"],
"exclude": ["node_modules", "dist"]