Skip to content

Commit e45bbe5

Browse files
committed
Update package version to 0.1.18, add getHandlers function to registrar, and remove getAllHandlers function for improved handler management.
1 parent e9421a2 commit e45bbe5

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@flexsurfer/reflex",
3-
"version": "0.1.17",
3+
"version": "0.1.18",
44
"license": "MIT",
55
"repository": {
66
"type": "git",

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export { regSub, getSubscriptionValue } from './subs';
88
export { regEffect, DISPATCH_LATER, DISPATCH } from './fx';
99
export { regCoeffect, NOW, RANDOM } from './cofx';
1010
export { regGlobalInterceptor, getGlobalInterceptors, clearGlobalInterceptors } from './settings';
11-
export { getHandler, clearHandlers, clearReactions, clearSubs, getReactions } from './registrar';
11+
export { getHandler, getHandlers, clearHandlers, clearReactions, clearSubs, getReactions } from './registrar';
1212

1313
export { dispatch } from './router';
1414
export { debounceAndDispatch, throttleAndDispatch } from './debounce'
@@ -24,7 +24,7 @@ export {
2424
} from './hot-reload';
2525

2626
// Trace
27-
export { enableTracing, disableTracing, registerTraceCb, enableTracePrint } from './trace';
27+
export { enableTracing, disableTracing, registerTraceCb, removeTraceCb, enableTracePrint } from './trace';
2828

2929
// Re-export types for external use
3030
export type {

src/registrar.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ export function getHandler<T extends RegistryHandler = RegistryHandler>
2020
return handler;
2121
}
2222

23+
export function getHandlers(): Record<Kind, Record<string, RegistryHandler>> {
24+
return kindToIdToHandler;
25+
}
26+
2327
export function registerHandler<T extends RegistryHandler = RegistryHandler>
2428
(kind: Kind, id: Id, handlerFn: T): T {
2529
if (kindToIdToHandler[kind][id]) {
@@ -53,10 +57,6 @@ export function clearHandlers(kind?: Kind, id?: string): void {
5357
}
5458
}
5559

56-
export function getAllHandlers(): Record<Kind, Record<string, RegistryHandler>> {
57-
return JSON.parse(JSON.stringify(kindToIdToHandler));
58-
}
59-
6060
export function hasHandler(kind: Kind, id: string): boolean {
6161
return !!kindToIdToHandler[kind][id];
6262
}

0 commit comments

Comments
 (0)