Add escape-string-regexp type definition.

This commit is contained in:
Lea Hayes
2016-03-07 23:33:57 +00:00
parent 9f0f926a12
commit bce9beea07
2 changed files with 18 additions and 0 deletions
@@ -0,0 +1,8 @@
/// <reference path="escape-string-regexp.d.ts"/>
import escapeStringRegexp from 'escape-string-regexp';
var inputString: string = '^abc$';
var outputString: string;
outputString = escapeStringRegexp(inputString);
+10
View File
@@ -0,0 +1,10 @@
// Type definitions for escape-string-regexp
// Project: https://github.com/sindresorhus/escape-string-regexp
// Definitions by: kruncher <https://github.com/kruncher/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module "escape-string-regexp" {
export default function (str: string): string;
}