Actualizar sigpro.ts

This commit is contained in:
2026-04-07 12:58:59 +02:00
parent 1bf92e7eda
commit b3a8bcfa52

View File

@@ -221,11 +221,11 @@ export const onUnmount = (fn: CleanupFn): void => {
context?.u.push(fn);
};
export const provide = (key: string | symbol, value: any): void => {
export const share = (key: string | symbol, value: any): void => {
if (context) context.p[key] = value;
};
export const inject = (key: string | symbol, defaultValue?: any): any => {
export const use = (key: string | symbol, defaultValue?: any): any => {
if (context && key in context.p) return context.p[key];
return defaultValue;
};