
Security News
Deno Goes the Way of the Dinosaur
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.
@eggjs/eventbus-decorator
Advanced tools
@eggjs/eventbus-decoratorimport { EventBus } from '@eggjs/eventbus-decorator';
// Define event first.
// Ts can check event and args type for you.
declare module '@eggjs/eventbus-decorator' {
interface Events {
hello: (msg: string) => Promise<void>;
}
}
class Foo {
@Inject()
private readonly eventBus: EventBus;
bar() {
this.eventBus.emit('hello', '01');
}
}
Cache events in memory until uncork.
class Foo {
@Inject()
private readonly eventBus: ContextEventBus;
bar() {
this.eventBus.cork();
// ...do something
this.eventBus.emit('hello', '01');
// ...do other things
// emit all cached events
this.eventBus.uncork();
}
}
@Event('hello')
export class Foo {
async handle(msg: string): Promise<void> {
console.log('msg: ', msg);
}
}
@Event('hello')
@Event('hi')
export class Foo {
async handle(msg: string): Promise<void> {
console.log('msg: ', msg);
}
}
inject event context if you want to know which event is being handled. The context param must be the first param
@Event('hello')
@Event('hi')
export class Foo {
async handle(@EventContext() ctx: IEventContext, msg: string): Promise<void> {
console.log('eventName: ', ctx.eventName);
console.log('msg: ', msg);
}
}
FAQs
tegg eventbus decorator
The npm package @eggjs/eventbus-decorator receives a total of 588 weekly downloads. As such, @eggjs/eventbus-decorator popularity was classified as not popular.
We found that @eggjs/eventbus-decorator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 10 open source maintainers collaborating on the project.

Security News
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.

Security News
Anthropic’s free OSS Scanner uses Mythos and other Claude models to find open source vulnerabilities and send maintainers reports with proposed fixes.

Security News
On Front Lines’ Early Adopters: CISO podcast, Andrew Becherer shares lessons from Datadog, weighs the long-term costs of AI-built tools, and explains how founders can actually gain a CISO’s trust.