-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Description
the default usage guide is
export const [registerMathService, getMathService] = defineProxyService(
'MathService',
() => new MathService(),
);
will make non-background part actually run new MathService()
and invoke all its imports, should mention it, after all it non-background part do not need these code.
and have a alternative example, basically is two part
// background
export const [registerMathService,_] = defineProxyService(
'MathService',
() => new MathService(),
);
// non-background
export const [_, getBackgroundService] = defineProxyService(
'MathService',
// eslint-disable-next-line -- Proxied
() => ({}) as IMathService,
);
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed