This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const subscription: Subscription = interval(1000).subscribe((num: number) => { | |
console.log(num); | |
}); | |
// Cancelar la suscripción después de 5 segundos | |
setTimeout(() => { | |
subscription.unsubscribe(); | |
console.log('Suscripción cancelada'); | |
}, 5000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Print to console": { | |
"prefix": "cl", | |
"body": [ | |
"console.log('$1');", | |
"$2" | |
], | |
"description": "Log output to console" | |
}, | |
"Observer": { | |
"prefix": "$obs", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.charAt(0) |