@wzyjs/types 0.2.14 → 0.2.38

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/package.json CHANGED
@@ -1,34 +1,8 @@
1
1
  {
2
2
  "name": "@wzyjs/types",
3
- "version": "0.2.14",
3
+ "version": "0.2.38",
4
4
  "description": "description",
5
5
  "author": "wzy",
6
- "scripts": {
7
- "dev": "father dev",
8
- "build": "father build"
9
- },
10
- "exports": {
11
- ".": {
12
- "import": "./dist/esm/index.js",
13
- "require": "./dist/cjs/index.js"
14
- }
15
- },
16
- "typesVersions": {
17
- "*": {
18
- "*": [
19
- "./dist/esm/index.d.ts"
20
- ]
21
- }
22
- },
23
- "dependencies": {
24
- "father": "^4.4.5"
25
- },
26
- "publishConfig": {
27
- "access": "public"
28
- },
29
- "repository": {
30
- "type": "git",
31
- "url": "https://gitee.com/wang-zhenyu/app.git"
32
- },
33
- "gitHead": "4debf634852c7e5375d4dc5616e4e607005761c2"
6
+ "main": "src/index.ts",
7
+ "gitHead": "bfb32153a2f138276be305724ba75cbd65fd2ac0"
34
8
  }
package/src/index.ts CHANGED
@@ -1,3 +1,2 @@
1
- export * from './base'
2
- export * from './api'
1
+ export * from './tool'
3
2
  export * from './other'
package/src/other.ts CHANGED
@@ -1,6 +1,3 @@
1
- // 键值对
2
- export type KeyValue<D extends object | string = string, V = any> = Partial<Record<D extends string ? string : keyof D, V>>
3
-
4
1
  // 选项
5
2
  export interface Option<V extends string | number = string> {
6
3
  label: string,
@@ -8,7 +5,7 @@ export interface Option<V extends string | number = string> {
8
5
  children?: Option<V>[],
9
6
  }
10
7
 
11
- // 分页的类型
8
+ // 分页
12
9
  export interface Pagination {
13
10
  current?: number,
14
11
  pageSize?: number,
@@ -3,3 +3,6 @@ export type Optional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>
3
3
 
4
4
  // 将指定类型排除、将指定类型设为可选
5
5
  export type Set<T, OmitK extends keyof T = never, OptionalK extends Exclude<keyof T, OmitK> = never> = Optional<Omit<T, OmitK>, OptionalK>
6
+
7
+ // 键值对
8
+ export type KeyValue<D extends object | string = string, V = any> = Partial<Record<D extends string ? string : keyof D, V>>
package/.fatherrc.ts DELETED
@@ -1,6 +0,0 @@
1
- import { defineConfig } from 'father'
2
-
3
- export default defineConfig({
4
- esm: { input: 'src' },
5
- cjs: { input: 'src' },
6
- })
package/dist/cjs/api.d.ts DELETED
@@ -1,29 +0,0 @@
1
- import { KeyValue } from './other';
2
- export interface RequestRes<D = any> {
3
- success: boolean;
4
- message: string;
5
- data: D;
6
- }
7
- export type Order = {
8
- [key: string]: 'asc' | 'desc';
9
- };
10
- export declare enum OperatorType {
11
- In = "In",
12
- Like = "Like",
13
- Between = "Between",
14
- Equal = "Equal",
15
- LessThan = "LessThan",
16
- MoreThan = "MoreThan",
17
- LessThanOrEqual = "LessThanOrEqual",
18
- MoreThanOrEqual = "MoreThanOrEqual",
19
- IsNull = "IsNull"
20
- }
21
- export type WhereItem = {
22
- _type?: OperatorType;
23
- _value: any;
24
- };
25
- export type Where = KeyValue | {
26
- [key: string]: WhereItem;
27
- };
28
- export type SortParams<D extends object | string = string> = Record<D extends string ? string : keyof D, 'ascend' | 'descend' | null>;
29
- export type FilterParams = Record<string, (string | number)[] | null>;
package/dist/cjs/api.js DELETED
@@ -1,40 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
-
19
- // src/api.ts
20
- var api_exports = {};
21
- __export(api_exports, {
22
- OperatorType: () => OperatorType
23
- });
24
- module.exports = __toCommonJS(api_exports);
25
- var OperatorType = /* @__PURE__ */ ((OperatorType2) => {
26
- OperatorType2["In"] = "In";
27
- OperatorType2["Like"] = "Like";
28
- OperatorType2["Between"] = "Between";
29
- OperatorType2["Equal"] = "Equal";
30
- OperatorType2["LessThan"] = "LessThan";
31
- OperatorType2["MoreThan"] = "MoreThan";
32
- OperatorType2["LessThanOrEqual"] = "LessThanOrEqual";
33
- OperatorType2["MoreThanOrEqual"] = "MoreThanOrEqual";
34
- OperatorType2["IsNull"] = "IsNull";
35
- return OperatorType2;
36
- })(OperatorType || {});
37
- // Annotate the CommonJS export names for ESM import in node:
38
- 0 && (module.exports = {
39
- OperatorType
40
- });
@@ -1,2 +0,0 @@
1
- export type Optional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
2
- export type Set<T, OmitK extends keyof T = never, OptionalK extends Exclude<keyof T, OmitK> = never> = Optional<Omit<T, OmitK>, OptionalK>;
package/dist/cjs/base.js DELETED
@@ -1,17 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from === "object" || typeof from === "function") {
7
- for (let key of __getOwnPropNames(from))
8
- if (!__hasOwnProp.call(to, key) && key !== except)
9
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
- }
11
- return to;
12
- };
13
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
-
15
- // src/base.ts
16
- var base_exports = {};
17
- module.exports = __toCommonJS(base_exports);
@@ -1,3 +0,0 @@
1
- export * from './base';
2
- export * from './api';
3
- export * from './other';
package/dist/cjs/index.js DELETED
@@ -1,27 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from === "object" || typeof from === "function") {
7
- for (let key of __getOwnPropNames(from))
8
- if (!__hasOwnProp.call(to, key) && key !== except)
9
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
- }
11
- return to;
12
- };
13
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
-
16
- // src/index.ts
17
- var src_exports = {};
18
- module.exports = __toCommonJS(src_exports);
19
- __reExport(src_exports, require("./base"), module.exports);
20
- __reExport(src_exports, require("./api"), module.exports);
21
- __reExport(src_exports, require("./other"), module.exports);
22
- // Annotate the CommonJS export names for ESM import in node:
23
- 0 && (module.exports = {
24
- ...require("./base"),
25
- ...require("./api"),
26
- ...require("./other")
27
- });
@@ -1,10 +0,0 @@
1
- export type KeyValue<D extends object | string = string, V = any> = Partial<Record<D extends string ? string : keyof D, V>>;
2
- export interface Option<V extends string | number = string> {
3
- label: string;
4
- value: V;
5
- children?: Option<V>[];
6
- }
7
- export interface Pagination {
8
- current?: number;
9
- pageSize?: number;
10
- }
package/dist/cjs/other.js DELETED
@@ -1,17 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from === "object" || typeof from === "function") {
7
- for (let key of __getOwnPropNames(from))
8
- if (!__hasOwnProp.call(to, key) && key !== except)
9
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
- }
11
- return to;
12
- };
13
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
-
15
- // src/other.ts
16
- var other_exports = {};
17
- module.exports = __toCommonJS(other_exports);
package/dist/esm/api.d.ts DELETED
@@ -1,29 +0,0 @@
1
- import { KeyValue } from './other';
2
- export interface RequestRes<D = any> {
3
- success: boolean;
4
- message: string;
5
- data: D;
6
- }
7
- export type Order = {
8
- [key: string]: 'asc' | 'desc';
9
- };
10
- export declare enum OperatorType {
11
- In = "In",
12
- Like = "Like",
13
- Between = "Between",
14
- Equal = "Equal",
15
- LessThan = "LessThan",
16
- MoreThan = "MoreThan",
17
- LessThanOrEqual = "LessThanOrEqual",
18
- MoreThanOrEqual = "MoreThanOrEqual",
19
- IsNull = "IsNull"
20
- }
21
- export type WhereItem = {
22
- _type?: OperatorType;
23
- _value: any;
24
- };
25
- export type Where = KeyValue | {
26
- [key: string]: WhereItem;
27
- };
28
- export type SortParams<D extends object | string = string> = Record<D extends string ? string : keyof D, 'ascend' | 'descend' | null>;
29
- export type FilterParams = Record<string, (string | number)[] | null>;
package/dist/esm/api.js DELETED
@@ -1,21 +0,0 @@
1
- // 接口响应的类型
2
-
3
- // 后端排序参数的类型
4
-
5
- // 后端查询参数的类型
6
- export var OperatorType = /*#__PURE__*/function (OperatorType) {
7
- OperatorType["In"] = "In";
8
- OperatorType["Like"] = "Like";
9
- OperatorType["Between"] = "Between";
10
- OperatorType["Equal"] = "Equal";
11
- OperatorType["LessThan"] = "LessThan";
12
- OperatorType["MoreThan"] = "MoreThan";
13
- OperatorType["LessThanOrEqual"] = "LessThanOrEqual";
14
- OperatorType["MoreThanOrEqual"] = "MoreThanOrEqual";
15
- OperatorType["IsNull"] = "IsNull";
16
- return OperatorType;
17
- }({});
18
-
19
- // 前端排序参数的类型
20
-
21
- // 前端查询参数的类型
@@ -1,2 +0,0 @@
1
- export type Optional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
2
- export type Set<T, OmitK extends keyof T = never, OptionalK extends Exclude<keyof T, OmitK> = never> = Optional<Omit<T, OmitK>, OptionalK>;
package/dist/esm/base.js DELETED
@@ -1 +0,0 @@
1
- export {};
@@ -1,3 +0,0 @@
1
- export * from './base';
2
- export * from './api';
3
- export * from './other';
package/dist/esm/index.js DELETED
@@ -1,3 +0,0 @@
1
- export * from "./base";
2
- export * from "./api";
3
- export * from "./other";
@@ -1,10 +0,0 @@
1
- export type KeyValue<D extends object | string = string, V = any> = Partial<Record<D extends string ? string : keyof D, V>>;
2
- export interface Option<V extends string | number = string> {
3
- label: string;
4
- value: V;
5
- children?: Option<V>[];
6
- }
7
- export interface Pagination {
8
- current?: number;
9
- pageSize?: number;
10
- }
package/dist/esm/other.js DELETED
@@ -1 +0,0 @@
1
- export {};
package/src/api.ts DELETED
@@ -1,37 +0,0 @@
1
- import { KeyValue } from './other'
2
-
3
- // 接口响应的类型
4
- export interface RequestRes<D = any> {
5
- success: boolean,
6
- message: string,
7
- data: D,
8
- }
9
-
10
- // 后端排序参数的类型
11
- export type Order = { [key: string]: 'asc' | 'desc' }
12
-
13
- // 后端查询参数的类型
14
- export enum OperatorType {
15
- In = 'In',
16
- Like = 'Like',
17
- Between = 'Between',
18
- Equal = 'Equal',
19
- LessThan = 'LessThan',
20
- MoreThan = 'MoreThan',
21
- LessThanOrEqual = 'LessThanOrEqual',
22
- MoreThanOrEqual = 'MoreThanOrEqual',
23
- IsNull = 'IsNull',
24
- }
25
-
26
- export type WhereItem = {
27
- _type?: OperatorType;
28
- _value: any;
29
- }
30
-
31
- export type Where = KeyValue | { [key: string]: WhereItem }
32
-
33
- // 前端排序参数的类型
34
- export type SortParams<D extends object | string = string> = Record<D extends string ? string : keyof D, 'ascend' | 'descend' | null>
35
-
36
- // 前端查询参数的类型
37
- export type FilterParams = Record<string, (string | number)[] | null>
package/tsconfig.json DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.json"
3
- }