mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-12 19:59:02 +08:00
Include support for contextual rewrite
This commit is contained in:
committed by
GitHub
parent
7a15941349
commit
4a8f29c946
10
types/webpack-dev-server/index.d.ts
vendored
10
types/webpack-dev-server/index.d.ts
vendored
@@ -14,6 +14,7 @@ import * as express from 'express';
|
||||
import * as serveStatic from 'serve-static';
|
||||
import * as https from 'https';
|
||||
import * as http from 'http';
|
||||
import { Url } from "url";
|
||||
|
||||
declare namespace WebpackDevServer {
|
||||
interface ListeningApp {
|
||||
@@ -31,9 +32,16 @@ declare namespace WebpackDevServer {
|
||||
|
||||
type ProxyConfigArray = ProxyConfigArrayItem[];
|
||||
|
||||
interface Context {
|
||||
match: RegExpMatchArray;
|
||||
parsedUrl: Url;
|
||||
}
|
||||
|
||||
type RewriteTo = (context: Context) => string;
|
||||
|
||||
interface Rewrite {
|
||||
from: RegExp;
|
||||
to: string;
|
||||
to: string | RegExp | RewriteTo;
|
||||
}
|
||||
|
||||
interface HistoryApiFallbackConfig {
|
||||
|
||||
Reference in New Issue
Block a user