From 52fe1076eea4f22f68986470759072559aa4b329 Mon Sep 17 00:00:00 2001 From: Strandor Date: Thu, 24 Jun 2021 11:16:36 +0000 Subject: [PATCH] Added typescript support --- lib/index.d.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 lib/index.d.ts diff --git a/lib/index.d.ts b/lib/index.d.ts new file mode 100644 index 0000000..b46fb3e --- /dev/null +++ b/lib/index.d.ts @@ -0,0 +1,18 @@ +declare interface ParsedUrl { + protocols: string[]; + protocol: string; + port?: string; + resource: string; + user: string; + pathname: string; + hash: string; + search: string; + href: string; + query: { + [key: string]: any; + } +} + +declare function parseUrl(url: string, normalize?: boolean | Object): ParsedUrl; + +export default parseUrl