Skip to content

Commit 7928fc1

Browse files
authored
Fix the types for express.Router (#16)
1 parent 9ba24c3 commit 7928fc1

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@kiwiproject/dynamic-properties-provider",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"description": "Dynamic Properties Provider is a utility library to assist in the generation of field definitions based on model classes. This process is helpful if a UI needs to build dynamic forms based on models in a service but don't want to hardcode all the fields of the models in the UI. This is a port of the Java library with the same name.",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

src/property-extractor.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import express from "express";
1+
import { Router } from "express";
22
import { Property } from "./property";
33

44
/**
@@ -21,8 +21,8 @@ async function getPropertyListForObject(obj: any): Promise<Array<Property>> {
2121
*/
2222
function setupDynamicPropertiesEndpoints(
2323
objects: Record<string, any>,
24-
): express.Router {
25-
const router = express.Router();
24+
): Router {
25+
const router = Router();
2626

2727
router.get("/kiwi/dynamic-properties", async (_req, res, next) => {
2828
const props: object = {};

0 commit comments

Comments
 (0)