Commit 250ad137 authored by nanahira's avatar nanahira

add Caller

parent e5c85b7f
Pipeline #8826 passed with stages
in 2 minutes and 22 seconds
...@@ -311,3 +311,9 @@ export const InjectLogger = (name?: string) => ...@@ -311,3 +311,9 @@ export const InjectLogger = (name?: string) =>
'default', 'default',
), ),
); );
export const Caller = () =>
InjectSystem((obj) => {
const ctx = obj.__ctx;
const targetCtx: Context = ctx[Context.current] || ctx;
return targetCtx;
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment