From 5e9d3fc16acc51e6c1ab0085956801cfdfc3d489 Mon Sep 17 00:00:00 2001 From: Maxime LUCE Date: Thu, 22 Oct 2015 01:23:04 +0200 Subject: [PATCH] Add typings for connect-livereload --- connect-livereload/connect-livereload.d.ts | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 connect-livereload/connect-livereload.d.ts diff --git a/connect-livereload/connect-livereload.d.ts b/connect-livereload/connect-livereload.d.ts new file mode 100644 index 000000000..98e851fec --- /dev/null +++ b/connect-livereload/connect-livereload.d.ts @@ -0,0 +1,38 @@ +// Type definitions for connect-livereload v0.5.3 +// Project: https://github.com/intesso/connect-livereload +// Definitions by: Maxime LUCE +// Definitions: https://github.com/borisyankov/DefinitelyTyped + +/// + +declare module "connect-livereload" { + import { HandleFunction } from "connect"; + + function livereload(): HandleFunction; + function livereload(options: livereload.Options): HandleFunction; + + module 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; +} \ No newline at end of file