@apia/util 4.0.17 → 4.0.18
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 +10 -14
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -144,7 +144,7 @@ declare const shortcutController: {
|
|
|
144
144
|
console.log('Abctrl+cd'),
|
|
145
145
|
}, 'dev'); // Este shortcut solo se ejecuta en desarrollo
|
|
146
146
|
*/
|
|
147
|
-
on(keys: (string | TKey)[], callback: TCallback, category?:
|
|
147
|
+
on(keys: (string | TKey)[], callback: TCallback, category?: "dev", fireEvenFromInputs?: boolean): void;
|
|
148
148
|
};
|
|
149
149
|
|
|
150
150
|
type DownloadStringAsDocProps = {
|
|
@@ -1234,24 +1234,20 @@ type TFireEvent<Events extends TMap> = <K extends keyof Events>(id: TId, ev: K,
|
|
|
1234
1234
|
methods
|
|
1235
1235
|
*/
|
|
1236
1236
|
declare function makeImperativeComponent<ComponentProps extends TMap, Events extends TMap = TMap>(): <State extends TMap, Methods extends TMethods<State>>({ Component, initialState, methods, }: {
|
|
1237
|
-
initialState?: State
|
|
1238
|
-
methods?: Methods
|
|
1239
|
-
Component: FC<Omit<ComponentProps,
|
|
1240
|
-
}) => [
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
FC<ComponentProps & {
|
|
1244
|
-
id: TId;
|
|
1245
|
-
}>
|
|
1246
|
-
];
|
|
1237
|
+
initialState?: State;
|
|
1238
|
+
methods?: Methods;
|
|
1239
|
+
Component: FC<Omit<ComponentProps, "id"> & State>;
|
|
1240
|
+
}) => [TMethodsMap<Methods>, TFireEvent<Events>, FC<ComponentProps & {
|
|
1241
|
+
id: TId;
|
|
1242
|
+
}>];
|
|
1247
1243
|
|
|
1248
1244
|
type TSingleMethodsMap<Methods extends TMethods<any>, MethodsMap extends TMethodsMap<Methods>> = {
|
|
1249
1245
|
[Name in keyof MethodsMap]: MethodsMap[Name] extends (id: TId, ...args: infer Action) => unknown ? (...args: Action) => unknown : never;
|
|
1250
1246
|
};
|
|
1251
1247
|
declare function makeSingleImperativeComponent<ComponentProps extends TMap, Events extends TMap = TMap>(): <State extends TMap, Methods extends TMethods<State>>({ initialState, methods, Component, }: {
|
|
1252
|
-
initialState?: State
|
|
1253
|
-
methods?: Methods
|
|
1254
|
-
Component: FC<Omit<ComponentProps,
|
|
1248
|
+
initialState?: State;
|
|
1249
|
+
methods?: Methods;
|
|
1250
|
+
Component: FC<Omit<ComponentProps, "id"> & State>;
|
|
1255
1251
|
}) => [TSingleMethodsMap<Methods, TMethodsMap<Methods>>, <K extends keyof Events>(ev: K, args: Events[K]) => void, FC<ComponentProps>];
|
|
1256
1252
|
|
|
1257
1253
|
declare const useImperativeComponentEvents: <Events extends TMap = TMap>(handlers: Partial<TEventsMap<Events>>) => string;
|