mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-07 08:17:05 +00:00
Non empty namespce
This commit is contained in:
+24
-23
@@ -10,27 +10,28 @@ import { Url } from 'url';
|
||||
|
||||
import * as core from "express-serve-static-core";
|
||||
|
||||
declare function historyApiFallback(options?: Options): core.RequestHandler;
|
||||
declare namespace historyApiFallback {}
|
||||
declare function historyApiFallback(options?: historyApiFallback.Options): core.RequestHandler;
|
||||
|
||||
declare namespace historyApiFallback {
|
||||
interface Options {
|
||||
exclusions?: string[];
|
||||
disableDotRule?: true;
|
||||
htmlAcceptHeaders?: string[];
|
||||
index?: string;
|
||||
logger?: typeof console.log;
|
||||
rewrites?: Rewrite[];
|
||||
verbose?: boolean;
|
||||
}
|
||||
|
||||
interface Context {
|
||||
match: RegExpMatchArray;
|
||||
parsedUrl: Url;
|
||||
}
|
||||
type RewriteTo = (context: Context) => string;
|
||||
|
||||
interface Rewrite {
|
||||
from: RegExp;
|
||||
to: string | RegExp | RewriteTo;
|
||||
}
|
||||
}
|
||||
export = historyApiFallback;
|
||||
|
||||
interface Options {
|
||||
exclusions?: string[];
|
||||
disableDotRule?: true;
|
||||
htmlAcceptHeaders?: string[];
|
||||
index?: string;
|
||||
logger?: typeof console.log;
|
||||
rewrites?: Rewrite[];
|
||||
verbose?: boolean;
|
||||
}
|
||||
|
||||
interface Context {
|
||||
match: RegExpMatchArray;
|
||||
parsedUrl: Url;
|
||||
}
|
||||
type RewriteTo = (context: Context) => string;
|
||||
|
||||
interface Rewrite {
|
||||
from: RegExp;
|
||||
to: string | RegExp | RewriteTo;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user