The method subscribe isn't actually deprecated, but the way you're using it is deprecated. Try switching to the new syntax of it.
// Deprecated
source.subscribe(
(res) => cb(res),
error => console.error(error),
() => console.log('Complete')
);
// Recommended
source.subscribe({
next: (res) => cb(res),
error: error => console.error(error),
complete: () => console.log('Complete')
});
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…