diff --git a/packages/nestjs-authentication/src/guards/auth.guard.ts b/packages/nestjs-authentication/src/guards/auth.guard.ts index 08e8f3e2b..7ef80d28d 100644 --- a/packages/nestjs-authentication/src/guards/auth.guard.ts +++ b/packages/nestjs-authentication/src/guards/auth.guard.ts @@ -17,6 +17,7 @@ import { FastifyAuthGuard } from './fastify-auth.guard'; /** * A Guard to use passport for express or fastify * + * @example * ```ts * @UseGuards(AuthGuard('local')) * @Post('login') diff --git a/packages/nestjs-common/src/decorators/auth-user.decorator.ts b/packages/nestjs-common/src/decorators/auth-user.decorator.ts index 55c3b53d9..67fddab31 100644 --- a/packages/nestjs-common/src/decorators/auth-user.decorator.ts +++ b/packages/nestjs-common/src/decorators/auth-user.decorator.ts @@ -6,6 +6,7 @@ import { AuthenticatedUserInterface } from '@concepta/ts-common'; * associated value if it exists (or undefined if it doesn't exist, * or if the user object has not been created). * + * @example * ```ts * @Get() * async findOne(@AuthUser('firstName') firstName: string) { diff --git a/packages/nestjs-event/src/events/event-async.ts b/packages/nestjs-event/src/events/event-async.ts index b72ad4c8c..e3e70d22c 100644 --- a/packages/nestjs-event/src/events/event-async.ts +++ b/packages/nestjs-event/src/events/event-async.ts @@ -13,7 +13,7 @@ import { Event } from './event'; * * For synchronous events, see the {@link EventSync} abstract class. * - * ### Example + * @example * ```ts * // event payload type * type MyPayloadType = {id: number, active: boolean}; diff --git a/packages/nestjs-event/src/events/event-sync.ts b/packages/nestjs-event/src/events/event-sync.ts index c930a191a..34f32e645 100644 --- a/packages/nestjs-event/src/events/event-sync.ts +++ b/packages/nestjs-event/src/events/event-sync.ts @@ -13,7 +13,7 @@ import { Event } from './event'; * * For asynchronous events, see the {@link EventAsync} abstract class. * - * ### Example + * @example * ```ts * // event payload type * type MyPayloadType = {id: number, active: boolean}; @@ -24,7 +24,6 @@ import { Event } from './event'; * // create an event * const myEvent = new MyEvent({id: 1234, active: true}); * ``` - * */ export abstract class EventSync
extends Event
diff --git a/packages/nestjs-event/src/events/event.ts b/packages/nestjs-event/src/events/event.ts
index 194f455b8..719bf2abc 100644
--- a/packages/nestjs-event/src/events/event.ts
+++ b/packages/nestjs-event/src/events/event.ts
@@ -14,7 +14,7 @@ import { EventInterface } from './interfaces/event.interface';
* sync and async event types for your convenience. They are {@link EventSync}
* and {@link EventAsync}.
*
- * ### Example
+ * @example
* ```ts
* // event payload type
* type MyPayloadType = {id: number, active: boolean};
diff --git a/packages/nestjs-event/src/listeners/event-listener-on.ts b/packages/nestjs-event/src/listeners/event-listener-on.ts
index 37cb7a1e8..2428068d9 100644
--- a/packages/nestjs-event/src/listeners/event-listener-on.ts
+++ b/packages/nestjs-event/src/listeners/event-listener-on.ts
@@ -9,7 +9,7 @@ import { EventListenOnOptionsInterface } from '../services/interfaces/event-list
* [listen]{@link EventListenerOn#listen} method. The [listen]{@link EventListenerOn#listen}
* method will receive the payload dispatched by {@link EventDispatchService}.
*
- * ### Example
+ * @example
* ```ts
* // event payload type
* type MyPayloadType = {id: number, active: boolean};
diff --git a/packages/nestjs-event/src/listeners/event-listener.ts b/packages/nestjs-event/src/listeners/event-listener.ts
index c0b8f7e55..fc0dc0885 100644
--- a/packages/nestjs-event/src/listeners/event-listener.ts
+++ b/packages/nestjs-event/src/listeners/event-listener.ts
@@ -17,7 +17,7 @@ import { EventInstance, EventReturnType } from '../event-types';
* There are additional abstract classes available which have implemented the basic types
* for you. So far we have {@link EventListenerOn}... more to come!
*
- * ### Example
+ * @example
* ```ts
* // event payload type
* type MyEventPayload = {id: number, active: boolean};
diff --git a/packages/nestjs-event/src/services/event-dispatch.service.ts b/packages/nestjs-event/src/services/event-dispatch.service.ts
index 70e663662..93cf41e34 100644
--- a/packages/nestjs-event/src/services/event-dispatch.service.ts
+++ b/packages/nestjs-event/src/services/event-dispatch.service.ts
@@ -28,7 +28,7 @@ export class EventDispatchService {
* Synchronously calls each of the listeners registered for the event,
* in the order they were registered, passing the event arguments to each.
*
- * ### Example
+ * @example
* ```ts
* import { Injectable } from '@nestjs/common';
* import { EventDispatchService, EventSync } from '@concepta/nestjs-events';
@@ -70,6 +70,7 @@ export class EventDispatchService {
* Asynchronously calls each of the listeners registered for the event,
* in the order they were registered, passing the event arguments to each.
*
+ * @example
* ```ts
* import { Injectable } from '@nestjs/common';
* import { EventDispatchService, EventAsync } from '@concepta/nestjs-events';
diff --git a/packages/nestjs-event/src/services/event-listen.service.ts b/packages/nestjs-event/src/services/event-listen.service.ts
index 918ae9326..e6a59ad01 100644
--- a/packages/nestjs-event/src/services/event-listen.service.ts
+++ b/packages/nestjs-event/src/services/event-listen.service.ts
@@ -34,16 +34,16 @@ export class EventListenService {
* See the [EventEmitter2.on](https://github.com/EventEmitter2/EventEmitter2#emitteronevent-listener-options-objectboolean)
* documentation for more details about the underlying emitter API.
*
- * ### Example
+ * @example
* ```ts
* import { Injectable, OnModuleInit } from '@nestjs/common';
* import { EventListenService, EventListenerOn } from '@concepta/nestjs-events';
* import { TargetEvent } from 'target-module';
*
* class MyListener extends EventListenerOn