Skip to content

Commit 6cf0741

Browse files
committed
adding back ExtendsType
1 parent 0ce77f7 commit 6cf0741

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/types.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ import type Request from './router/Request.js';
99
import type Response from './router/Response.js';
1010
import type Router from './router/Router.js';
1111

12+
//--------------------------------------------------------------------//
13+
// General Types
14+
15+
export type ExtendsType<T, U> = U & Pick<T, Exclude<keyof T, keyof U>>;
16+
17+
export type Constructor<T, U extends Record<string, unknown> = {}> = U & {
18+
new (): T;
19+
};
20+
1221
//--------------------------------------------------------------------//
1322
// Data Types
1423

0 commit comments

Comments
 (0)