Skip to content

Commit 9a02a3a

Browse files
committed
fix: Typings improvements
1 parent e83e345 commit 9a02a3a

File tree

6 files changed

+7
-2
lines changed

6 files changed

+7
-2
lines changed

index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,5 @@ export const name = "AdminBroExpressjs";
101101
module.exports = { name, buildAuthenticatedRouter, buildRouter };
102102

103103
export default { name, buildAuthenticatedRouter, buildRouter };
104+
105+
export { AuthenticationOptions, FormidableOptions } from "./src/types";

src/buildAuthenticatedRouter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ import formidableMiddleware from "express-formidable";
4848
export const buildAuthenticatedRouter = (
4949
admin: AdminBro,
5050
auth: AuthenticationOptions,
51-
predefinedRouter?: express.Router,
51+
predefinedRouter?: express.Router | null,
5252
sessionOptions?: session.SessionOptions,
5353
formidableOptions?: FormidableOptions
5454
): Router => {

src/buildRouter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const INVALID_ADMIN_BRO_INSTANCE =
1111

1212
export const buildRouter = (
1313
admin: AdminBro,
14-
predefinedRouter?: Router,
14+
predefinedRouter?: Router | null,
1515
formidableOptions?: FormidableOptions
1616
): Router => {
1717
if (!(admin instanceof AdminBro)) {

tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
"moduleResolution": "node",
2121
"baseUrl": "./",
2222
"declarationDir": "types",
23+
"typeRoots": [
24+
"./typings"
25+
]
2326
},
2427
"exclude": [
2528
"node_modules",
File renamed without changes.

0 commit comments

Comments
 (0)