mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
36 lines
927 B
TypeScript
36 lines
927 B
TypeScript
// Type definitions for connect-livereload v0.5.3
|
|
// Project: https://github.com/intesso/connect-livereload
|
|
// Definitions by: Maxime LUCE <https://github.com/SomaticIT>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
|
|
import { HandleFunction } from "connect";
|
|
|
|
declare function livereload(): HandleFunction;
|
|
declare function livereload(options: livereload.Options): HandleFunction;
|
|
|
|
declare namespace livereload {
|
|
export type FileMatcher = string | RegExp;
|
|
|
|
export interface Rule {
|
|
match: RegExp;
|
|
fn: (w: string, s: string) => string;
|
|
}
|
|
|
|
export interface Options {
|
|
ignore?: FileMatcher[];
|
|
excludeList?: FileMatcher[];
|
|
|
|
include?: FileMatcher[];
|
|
html?: (val: string) => boolean;
|
|
rules?: Rule[];
|
|
disableCompression?: boolean;
|
|
|
|
hostname?: string;
|
|
port?: number;
|
|
src?: string;
|
|
}
|
|
}
|
|
|
|
export = livereload;
|