twcpt 0.0.10 → 0.0.11

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.
@@ -5,8 +5,13 @@ export interface BizResponse<T = unknown> {
5
5
  ok: boolean;
6
6
  [key: string]: unknown;
7
7
  }
8
- export declare function useBizRequest(): {
8
+ export interface UseBizRequestOptions {
9
+ intercept?: boolean;
10
+ }
11
+ export interface UseBizRequestReturn {
9
12
  run: <T>(requester: () => Promise<BizResponse<T> | {
10
13
  data: BizResponse<T>;
11
14
  } | unknown>) => Promise<T | undefined>;
12
- };
15
+ error: (callback: (res: BizResponse<any>) => void) => void;
16
+ }
17
+ export declare function useBizRequest(options?: UseBizRequestOptions): UseBizRequestReturn;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "twcpt",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "A Vue 3 component library built with Vite and TypeScript, featuring components integrated with Element-plus.",
5
5
  "main": "dist/twcpt.umd.js",
6
6
  "module": "dist/twcpt.es.js",
@@ -1,2 +0,0 @@
1
- import { JTWMessagesAPI } from './types';
2
- export declare const jwMessages: JTWMessagesAPI;