From baafa81401f48879b199f96c7404a8470d020a28 Mon Sep 17 00:00:00 2001 From: odin3 Date: Thu, 8 Jun 2017 20:11:18 +0300 Subject: [PATCH] Add types for normalize-url --- types/normalize-url/index.d.ts | 20 ++++++++++++++++++++ types/normalize-url/tsconfig.json | 21 +++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 types/normalize-url/index.d.ts create mode 100644 types/normalize-url/tsconfig.json diff --git a/types/normalize-url/index.d.ts b/types/normalize-url/index.d.ts new file mode 100644 index 0000000000..7433263923 --- /dev/null +++ b/types/normalize-url/index.d.ts @@ -0,0 +1,20 @@ +// Type definitions for normalize-url v1.9.1 +// Project: https://github.com/sindresorhus/normalize-url +// Definitions by: odin3 +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare module NormalizeUrl { + interface INormalizeUrlArgs { + normalizeProtocol: boolean; + normalizeHttps: boolean; + stripFragment: boolean; + stripWWW: boolean; + removeQueryParameters: string[]; + removeTrailingSlash: boolean; + removeDirectoryIndex: RegExp[]; + } + + function normalizeUrl(url: string, args?: INormalizeUrlArgs): string; +} + +export = NormalizeUrl.normalizeUrl; diff --git a/types/normalize-url/tsconfig.json b/types/normalize-url/tsconfig.json new file mode 100644 index 0000000000..27e01ecd7b --- /dev/null +++ b/types/normalize-url/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts" + ] +} \ No newline at end of file