refactor(core): adjust effect api (#11935)

This commit is contained in:
EYHN
2025-04-24 10:06:11 +00:00
parent 1d38e5787b
commit eaa1bc6bf1
41 changed files with 79 additions and 146 deletions

View File

@@ -95,13 +95,6 @@ export function effect(...args: any[]) {
function subscribe() {
subscription = subject$.pipe.apply(subject$, args as any).subscribe({
next(value) {
const error = new EffectError('should not emit value', value);
// make a uncaught exception
setTimeout(() => {
throw error;
}, 0);
},
complete() {
const error = new EffectError('effect unexpected complete');
// make a uncaught exception