Skip to content

Commit 2d43885

Browse files
Merge pull request #193 from bitgopatmcl/import-http-methods
fix: use methods from io-ts-http
2 parents b9f0252 + 7e2548d commit 2d43885

File tree

1 file changed

+7
-2
lines changed
  • packages/typed-express-router/src

1 file changed

+7
-2
lines changed

packages/typed-express-router/src/types.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1-
import { ApiSpec, HttpRoute, RequestType } from '@api-ts/io-ts-http';
1+
import {
2+
ApiSpec,
3+
HttpRoute,
4+
Method as HttpMethod,
5+
RequestType,
6+
} from '@api-ts/io-ts-http';
27
import express from 'express';
38
import * as t from 'io-ts';
49

5-
export type Methods = 'get' | 'post' | 'put' | 'delete';
10+
export type Methods = Lowercase<HttpMethod>;
611

712
export type RouteAt<
813
Spec extends ApiSpec,

0 commit comments

Comments
 (0)