Skip to content

Commit

Permalink
Merge pull request #10848 from Tony133/refactor/rename-fastify-view-i…
Browse files Browse the repository at this point in the history
…nterface

refactor(fastify): renamed point-of-view interface
  • Loading branch information
kamilmysliwiec committed Jan 11, 2023
2 parents f6ebbea + fc44246 commit 0e0e24b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions packages/platform-fastify/adapters/fastify-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import {
import { parse as querystringParse } from 'querystring';
import {
FastifyStaticOptions,
PointOfViewOptions,
FastifyViewOptions,
} from '../interfaces/external';

type FastifyHttp2SecureOptions<
Expand Down Expand Up @@ -409,7 +409,7 @@ export class FastifyAdapter<
);
}

public setViewEngine(options: PointOfViewOptions | string) {
public setViewEngine(options: FastifyViewOptions | string) {
if (isString(options)) {
new Logger('FastifyAdapter').error(
"setViewEngine() doesn't support a string argument.",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/**
* "fastify/view" interfaces
* @see https://github.com/fastify/point-of-view/blob/master/types/index.d.ts
*/

export interface PointOfViewOptions {
export interface FastifyViewOptions {
engine: {
ejs?: any;
eta?: any;
Expand Down
2 changes: 1 addition & 1 deletion packages/platform-fastify/interfaces/external/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from './fastify-static-options.interface';
export * from './point-of-view-options.interface';
export * from './fastify-view-options.interface';
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
InjectOptions,
Response as LightMyRequestResponse,
} from 'light-my-request';
import { FastifyStaticOptions, PointOfViewOptions } from './external';
import { FastifyStaticOptions, FastifyViewOptions } from './external';

export interface NestFastifyApplication extends INestApplication {
/**
Expand Down Expand Up @@ -41,7 +41,7 @@ export interface NestFastifyApplication extends INestApplication {
* Don't pass in a string. The string type in the argument is for compatibilility reason and will cause an exception.
* @returns {this}
*/
setViewEngine(options: PointOfViewOptions | string): this;
setViewEngine(options: FastifyViewOptions | string): this;

/**
* A wrapper function around native `fastify.inject()` method.
Expand Down

0 comments on commit 0e0e24b

Please sign in to comment.