-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.d.ts
More file actions
23 lines (23 loc) · 757 Bytes
/
index.d.ts
File metadata and controls
23 lines (23 loc) · 757 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/// <reference types="express" />
import { Driver } from '@cycle/run';
import * as express from 'express';
import xs from 'xstream';
export declare type RoutePath = string;
export interface RouterSourceTemplate<T> {
route: (path: RoutePath) => RouterSourceTemplate<T>;
get: (path: RoutePath) => T;
post: (path: RoutePath) => T;
put: (path: RoutePath) => T;
delete: (path: RoutePath) => T;
}
export declare type RouterSource = RouterSourceTemplate<any>;
export interface Request extends express.Request {
id: string;
locals: any;
}
export interface Response {
id: string;
status?: number;
send: any;
}
export declare const makeRouterDriver: (router: express.Router) => Driver<xs<Response>, RouterSourceTemplate<any>>;