@rainte/js 0.0.58 → 0.0.60

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.
@@ -10,7 +10,7 @@ export * from './axios';
10
10
  * @example
11
11
  * get('/api/user', { id: 1 })
12
12
  */
13
- export declare const get: <T = unknown>(url: string, params?: ObjectProps) => Promise<AxiosResponse<T>>;
13
+ export declare const get: <T = unknown>(url: string, params?: Record<string, any>) => Promise<AxiosResponse<T>>;
14
14
  /**
15
15
  * POST 请求,默认 `Content-Type: application/json`。
16
16
  *
@@ -21,7 +21,7 @@ export declare const get: <T = unknown>(url: string, params?: ObjectProps) => Pr
21
21
  * @example
22
22
  * post('/api/user', { name: 'foo' })
23
23
  */
24
- export declare const post: <T = unknown>(url: string, data?: ObjectProps) => Promise<AxiosResponse<T>>;
24
+ export declare const post: <T = unknown>(url: string, data?: Record<string, any>) => Promise<AxiosResponse<T>>;
25
25
  /**
26
26
  * 下载请求,强制 `responseType = 'blob'`(除非调用方显式指定了其他值)。
27
27
  *
@@ -20,7 +20,7 @@ export declare const search: (query?: string) => URLSearchParams;
20
20
  * params('?a=1&b=2&b=3') // { a: '1', b: ['2', '3'] }
21
21
  * params() // 当前页面的 query 对象
22
22
  */
23
- export declare const params: (query?: string) => ObjectProps;
23
+ export declare const params: (query?: string) => Record<string, any>;
24
24
  /**
25
25
  * 打开新窗口/标签页。
26
26
  *
package/package.json CHANGED
@@ -1,13 +1,12 @@
1
1
  {
2
2
  "name": "@rainte/js",
3
- "version": "0.0.58",
3
+ "version": "0.0.60",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
8
8
  "files": [
9
- "dist",
10
- "index.d.ts"
9
+ "dist"
11
10
  ],
12
11
  "main": "./dist/index.umd.cjs",
13
12
  "module": "./dist/index.js",
@@ -17,9 +16,6 @@
17
16
  "types": "./dist/types/lib.d.ts",
18
17
  "import": "./dist/index.js",
19
18
  "require": "./dist/index.umd.cjs"
20
- },
21
- "./global": {
22
- "types": "./index.d.ts"
23
19
  }
24
20
  },
25
21
  "scripts": {
package/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- type ObjectProps = Record<string, any>
2
- type ProviderProps<T = any> = { children: T }
3
- type FunctionProps<T = any> = (...args: any[]) => T