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 { - * listen(event: TargetEvent) { - * console.log(event.payload); - * } + * listen(event: TargetEvent) { + * console.log(event.payload); + * } * } * * @Injectable() diff --git a/packages/nestjs-logger/src/config/logger.config.ts b/packages/nestjs-logger/src/config/logger.config.ts index 2b348dfa3..add794fd8 100644 --- a/packages/nestjs-logger/src/config/logger.config.ts +++ b/packages/nestjs-logger/src/config/logger.config.ts @@ -34,7 +34,7 @@ export type LoggerConfigFactory = ConfigFactory & /** * Configuration for Logger. * - * ### example + * @example * ```ts * @Module({ * imports: [ diff --git a/packages/nestjs-logger/src/interfaces/logger-transport.interface.ts b/packages/nestjs-logger/src/interfaces/logger-transport.interface.ts index ecfa3281d..afcba7eb6 100644 --- a/packages/nestjs-logger/src/interfaces/logger-transport.interface.ts +++ b/packages/nestjs-logger/src/interfaces/logger-transport.interface.ts @@ -9,11 +9,11 @@ import { LogLevel } from '@nestjs/common'; * You can create a custom log method to submit the information to any * 3rd party transport you want to implement * - * ### Example + * @example * ```ts * @Injectable() * export class LoggerSentryTransport implements LoggerTransportInterface { - * constructor() { } + * constructor() {} * * log(message: string, logLevel: LogLevel, error?: Error | string): void { * // forward message to custom transport diff --git a/packages/nestjs-logger/src/logger-transport.service.ts b/packages/nestjs-logger/src/logger-transport.service.ts index ab4837b4c..59194e995 100644 --- a/packages/nestjs-logger/src/logger-transport.service.ts +++ b/packages/nestjs-logger/src/logger-transport.service.ts @@ -7,7 +7,7 @@ import { LoggerTransportInterface } from './interfaces/logger-transport.interfac * A transport service that will load all third party transport * that will be used to log messages to external * - * ### Example + * @example * ```ts * class TestTransport implements LoggerTransportInterface { * log(): void { diff --git a/packages/nestjs-logger/src/logger.module.ts b/packages/nestjs-logger/src/logger.module.ts index 16853cd3c..29bf7334a 100644 --- a/packages/nestjs-logger/src/logger.module.ts +++ b/packages/nestjs-logger/src/logger.module.ts @@ -14,7 +14,7 @@ import { * With classes for request interceptor and Exceptions filters * where will automatically log for any request or unhandled exceptions. * - * ### Example + * @example * ```ts * // app.module.ts * @Module({ diff --git a/packages/nestjs-logger/src/logger.service.ts b/packages/nestjs-logger/src/logger.service.ts index 58cd40370..3e15cddf7 100644 --- a/packages/nestjs-logger/src/logger.service.ts +++ b/packages/nestjs-logger/src/logger.service.ts @@ -14,7 +14,7 @@ import { LoggerTransportInterface } from './interfaces/logger-transport.interfac * You will need to create a custom logger and we must ensure that at least one application module imports the LoggerService * to trigger Nest to instantiate a singleton instance of our LoggerService class. * - * ### Example + * @example * ```ts * // Initialize a module that have the LoggerService imported * const app = await NestFactory.create(AppModule); @@ -34,7 +34,7 @@ import { LoggerTransportInterface } from './interfaces/logger-transport.interfac * app.useLogger(customLogger); * * await app.listen(3000); - *``` + * ``` */ @Injectable() export class LoggerService diff --git a/packages/nestjs-logger/src/transports/logger-sentry.transport.ts b/packages/nestjs-logger/src/transports/logger-sentry.transport.ts index 8c062619b..d7d614e47 100644 --- a/packages/nestjs-logger/src/transports/logger-sentry.transport.ts +++ b/packages/nestjs-logger/src/transports/logger-sentry.transport.ts @@ -7,7 +7,7 @@ import { LoggerTransportInterface } from '../interfaces/logger-transport.interfa * The transport that implements {@link LoggerTransportInterface} * to be used on {@link LoggerService} to log external messages * - * ### Example + * @example * ```ts * // Get the transport instance * const sentry = app.get(LoggerSentryTransport);