Skip to content

Commit 9c404cd

Browse files
bugfix: remove invalid MiddlewareConsumer typings
1 parent 8b04584 commit 9c404cd

14 files changed

Lines changed: 28 additions & 14 deletions

File tree

bundle/common/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export * from './decorators';
22
export * from './enums';
3-
export { NestModule, INestApplication, INestMicroservice, NestMiddleware, MiddlewareFunction, MiddlewareConsumer, OnModuleInit, ExceptionFilter, WebSocketAdapter, PipeTransform, Paramtype, ArgumentMetadata, OnModuleDestroy, ExecutionContext, CanActivate, RpcExceptionFilter, WsExceptionFilter, NestInterceptor, DynamicModule, INestApplicationContext, HttpServer, Provider, Type, HttpServerFactory, ArgumentsHost, INestExpressApplication, INestFastifyApplication } from './interfaces';
3+
export { NestModule, INestApplication, INestMicroservice, NestMiddleware, MiddlewareFunction, MiddlewareConsumer, OnModuleInit, ExceptionFilter, WebSocketAdapter, PipeTransform, Paramtype, ArgumentMetadata, OnModuleDestroy, ExecutionContext, CanActivate, RpcExceptionFilter, WsExceptionFilter, NestInterceptor, DynamicModule, INestApplicationContext, HttpServer, Provider, Type, HttpServerFactory, ArgumentsHost, INestExpressApplication, INestFastifyApplication, ForwardReference } from './interfaces';
44
export * from './interceptors';
55
export * from './services/logger.service';
66
export * from './pipes';

bundle/common/interfaces/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ export * from './nest-express-application.interface';
3030
export * from './nest-fastify-application.interface';
3131
export * from './modules/provider.interface';
3232
export * from './type.interface';
33+
export * from './modules/forward-reference.interface';
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export interface ForwardReference<T = any> {
2+
forwardRef: T;
3+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });

bundle/common/interfaces/modules/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ export * from './nest-module.interface';
33
export * from './on-init.interface';
44
export * from './dynamic-module.interface';
55
export * from './provider.interface';
6+
export * from './forward-reference.interface';
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import { DynamicModule } from './dynamic-module.interface';
22
import { Type } from '../type.interface';
33
import { Provider } from './provider.interface';
4+
import { ForwardReference } from './forward-reference.interface';
45
export interface ModuleMetadata {
5-
imports?: Array<Type<any> | DynamicModule | any[]>;
6+
imports?: Array<Type<any> | DynamicModule | ForwardReference>;
67
controllers?: Type<any>[];
78
providers?: Provider[];
8-
exports?: Array<DynamicModule | string | Provider | any[]>;
9+
exports?: Array<DynamicModule | string | Provider | ForwardReference>;
910
/** @deprecated */
10-
modules?: Array<Type<any> | DynamicModule | any[]>;
11+
modules?: Array<Type<any> | DynamicModule | ForwardReference>;
1112
/** @deprecated */
1213
components?: Provider[];
1314
}
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
export declare const forwardRef: (fn: () => any) => {
2-
forwardRef: () => any;
3-
};
1+
import { ForwardReference } from '../interfaces/modules/forward-reference.interface';
2+
export declare const forwardRef: (fn: () => any) => ForwardReference<any>;
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
"use strict";
22
Object.defineProperty(exports, "__esModule", { value: true });
3-
exports.forwardRef = (fn) => ({ forwardRef: fn });
3+
exports.forwardRef = (fn) => ({
4+
forwardRef: fn,
5+
});

bundle/core/index.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
export { MiddlewareBuilder } from './middleware/builder';
22
export { ModuleRef } from './injector/module-ref';
33
export { NestFactory } from './nest-factory';
4+
export { HTTP_SERVER_REF } from './injector/tokens';
45
export { APP_INTERCEPTOR, APP_FILTER, APP_GUARD, APP_PIPE } from './constants';
6+
export * from './adapters';
57
export * from './services';
68
export * from './nest-application';
79
export * from './nest-application-context';

bundle/core/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,14 @@ var module_ref_1 = require("./injector/module-ref");
1515
exports.ModuleRef = module_ref_1.ModuleRef;
1616
var nest_factory_1 = require("./nest-factory");
1717
exports.NestFactory = nest_factory_1.NestFactory;
18+
var tokens_1 = require("./injector/tokens");
19+
exports.HTTP_SERVER_REF = tokens_1.HTTP_SERVER_REF;
1820
var constants_1 = require("./constants");
1921
exports.APP_INTERCEPTOR = constants_1.APP_INTERCEPTOR;
2022
exports.APP_FILTER = constants_1.APP_FILTER;
2123
exports.APP_GUARD = constants_1.APP_GUARD;
2224
exports.APP_PIPE = constants_1.APP_PIPE;
25+
__export(require("./adapters"));
2326
__export(require("./services"));
2427
__export(require("./nest-application"));
2528
__export(require("./nest-application-context"));

0 commit comments

Comments
 (0)