From 321969d161fefb598a24254e7f55213a5dea2a9d Mon Sep 17 00:00:00 2001 From: Anthony Dionise Date: Tue, 5 Feb 2019 15:25:51 -0500 Subject: [PATCH] Non empty namespce --- .../index.d.ts | 47 ++++++++++--------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/types/connect-history-api-fallback-exclusions/index.d.ts b/types/connect-history-api-fallback-exclusions/index.d.ts index fa69b20e17..afbe7aa6a6 100644 --- a/types/connect-history-api-fallback-exclusions/index.d.ts +++ b/types/connect-history-api-fallback-exclusions/index.d.ts @@ -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; -}