Mercurial
comparison benchmark/bun-http-framework-benchmark/dev/adonis/contracts/events.ts @ 183:a8976a008a9d
[BenchMark] Added bun bench mark to test seoboe vs other popular benchmarks.
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Fri, 23 Jan 2026 21:19:08 -0800 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 179:8d17f6e6e290 | 183:a8976a008a9d |
|---|---|
| 1 /** | |
| 2 * Contract source: https://git.io/JfefG | |
| 3 * | |
| 4 * Feel free to let us know via PR, if you find something broken in this contract | |
| 5 * file. | |
| 6 */ | |
| 7 | |
| 8 declare module '@ioc:Adonis/Core/Event' { | |
| 9 /* | |
| 10 |-------------------------------------------------------------------------- | |
| 11 | Define typed events | |
| 12 |-------------------------------------------------------------------------- | |
| 13 | | |
| 14 | You can define types for events inside the following interface and | |
| 15 | AdonisJS will make sure that all listeners and emit calls adheres | |
| 16 | to the defined types. | |
| 17 | | |
| 18 | For example: | |
| 19 | | |
| 20 | interface EventsList { | |
| 21 | 'new:user': UserModel | |
| 22 | } | |
| 23 | | |
| 24 | Now calling `Event.emit('new:user')` will statically ensure that passed value is | |
| 25 | an instance of the the UserModel only. | |
| 26 | | |
| 27 */ | |
| 28 interface EventsList { | |
| 29 // | |
| 30 } | |
| 31 } |