lzh-common 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -0
- package/package.json +15 -0
- package/src/category.ts +21 -0
- package/src/index.ts +1 -0
- package/tsconfig.json +15 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "lzh-common",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Shared TypeScript interfaces",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "tsc"
|
|
9
|
+
},
|
|
10
|
+
"author": "Your Name",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"devDependencies": {
|
|
13
|
+
"typescript": "^5.6.3"
|
|
14
|
+
}
|
|
15
|
+
}
|
package/src/category.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** 分类 */
|
|
2
|
+
export interface ICategoryDB {
|
|
3
|
+
/** 数据库自增id */
|
|
4
|
+
id: number;
|
|
5
|
+
/** 分类的名称 */
|
|
6
|
+
name: string;
|
|
7
|
+
/** 用来控制该分类的顺序,越大越靠前 */
|
|
8
|
+
sequence: number;
|
|
9
|
+
/** 分类的封面url */
|
|
10
|
+
cover_url: string;
|
|
11
|
+
/** 该分类的创建时间 */
|
|
12
|
+
create_time: string;
|
|
13
|
+
/** 该分类的新增时间 */
|
|
14
|
+
update_time: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** 返回给前端的类型 */
|
|
18
|
+
export type ICategoryF2e = ICategoryDB
|
|
19
|
+
|
|
20
|
+
/** 新增分类的请求参数 */
|
|
21
|
+
export type ICategoryAddReq = Pick<ICategoryDB, 'name' | 'sequence' | 'cover_url'>
|
package/src/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './category'
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"outDir": "./dist", // 编译输出目录
|
|
4
|
+
"declaration": true, // 生成 .d.ts 类型定义文件
|
|
5
|
+
"declarationMap": true, // 生成 .d.ts.map 文件
|
|
6
|
+
"module": "ESNext", // ES 模块系统
|
|
7
|
+
"target": "ESNext", // 编译目标
|
|
8
|
+
"strict": true, // 启用严格模式
|
|
9
|
+
"esModuleInterop": true, // 兼容 ES 模块
|
|
10
|
+
"skipLibCheck": true, // 跳过库文件检查
|
|
11
|
+
"forceConsistentCasingInFileNames": true // 文件名大小写一致
|
|
12
|
+
},
|
|
13
|
+
"include": ["src/**/*"], // 需要编译的源文件
|
|
14
|
+
"exclude": ["node_modules"] // 排除目录
|
|
15
|
+
}
|