@apia/util 4.0.18 → 4.0.19
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 +14 -10
- 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?: keyof typeof this.categories, fireEvenFromInputs?: boolean): void;
|
|
148
148
|
};
|
|
149
149
|
|
|
150
150
|
type DownloadStringAsDocProps = {
|
|
@@ -1234,20 +1234,24 @@ 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
|
-
|
|
1237
|
+
initialState?: State | undefined;
|
|
1238
|
+
methods?: Methods | undefined;
|
|
1239
|
+
Component: FC<Omit<ComponentProps, 'id'> & State>;
|
|
1240
|
+
}) => [
|
|
1241
|
+
TMethodsMap<Methods>,
|
|
1242
|
+
TFireEvent<Events>,
|
|
1243
|
+
FC<ComponentProps & {
|
|
1244
|
+
id: TId;
|
|
1245
|
+
}>
|
|
1246
|
+
];
|
|
1243
1247
|
|
|
1244
1248
|
type TSingleMethodsMap<Methods extends TMethods<any>, MethodsMap extends TMethodsMap<Methods>> = {
|
|
1245
1249
|
[Name in keyof MethodsMap]: MethodsMap[Name] extends (id: TId, ...args: infer Action) => unknown ? (...args: Action) => unknown : never;
|
|
1246
1250
|
};
|
|
1247
1251
|
declare function makeSingleImperativeComponent<ComponentProps extends TMap, Events extends TMap = TMap>(): <State extends TMap, Methods extends TMethods<State>>({ initialState, methods, Component, }: {
|
|
1248
|
-
initialState?: State;
|
|
1249
|
-
methods?: Methods;
|
|
1250
|
-
Component: FC<Omit<ComponentProps,
|
|
1252
|
+
initialState?: State | undefined;
|
|
1253
|
+
methods?: Methods | undefined;
|
|
1254
|
+
Component: FC<Omit<ComponentProps, 'id'> & State>;
|
|
1251
1255
|
}) => [TSingleMethodsMap<Methods, TMethodsMap<Methods>>, <K extends keyof Events>(ev: K, args: Events[K]) => void, FC<ComponentProps>];
|
|
1252
1256
|
|
|
1253
1257
|
declare const useImperativeComponentEvents: <Events extends TMap = TMap>(handlers: Partial<TEventsMap<Events>>) => string;
|