<commit_before>// Type definitions for connect-history-api-fallback-exclusions 1.5
// Project: https://github.com/Wirewheel/connect-history-api-fallback#readme
// Definitions by: <NAME> <https://github.com/tonystonee>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2

/// <reference types="node" />

import { Url } from 'url';

import * as core from "express-serve-static-core";

declare function historyApiFallback(options?: Options): core.RequestHandler;
declare namespace historyApiFallback {}
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;
}<commit_msg>Non empty namespce<commit_after>// Type definitions for connect-history-api-fallback-exclusions 1.5
// Project: https://github.com/Wirewheel/connect-history-api-fallback#readme
// Definitions by: <NAME> <https://github.com/tonystonee>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2

/// <reference types="node" />

import { Url } from 'url';

import * as core from "express-serve-static-core";

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;
{'fraction_non_alphanumeric': 0.12589755864049784, 'fraction_numerical': 0.003829583532790809, 'mean_word_length': 3.553376906318083, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '824606', 'n_tokens_mistral': 633, 'n_tokens_neox': 619, 'n_words': 150}