From 59f43c59a6467ec8a07ac44b18f8892d11f812c6 Mon Sep 17 00:00:00 2001 From: Thomas Roch Date: Tue, 27 Mar 2018 12:05:53 +0100 Subject: [PATCH] refactor: add named export --- dist/cjs/path-parser.js | 5 ++++- dist/es/path-parser.js | 1 + modules/Path.ts | 4 +++- typings/Path.d.ts | 3 ++- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/dist/cjs/path-parser.js b/dist/cjs/path-parser.js index 4af43b7..95b219b 100644 --- a/dist/cjs/path-parser.js +++ b/dist/cjs/path-parser.js @@ -1,5 +1,7 @@ 'use strict'; +Object.defineProperty(exports, '__esModule', { value: true }); + var searchParams = require('search-params'); /*! ***************************************************************************** @@ -297,4 +299,5 @@ var Path = /** @class */ (function () { return Path; }()); -module.exports = Path; +exports.Path = Path; +exports.default = Path; diff --git a/dist/es/path-parser.js b/dist/es/path-parser.js index 1f6875c..c693abc 100644 --- a/dist/es/path-parser.js +++ b/dist/es/path-parser.js @@ -296,3 +296,4 @@ var Path = /** @class */ (function () { }()); export default Path; +export { Path }; diff --git a/modules/Path.ts b/modules/Path.ts index e9efc1a..a48763f 100644 --- a/modules/Path.ts +++ b/modules/Path.ts @@ -64,7 +64,7 @@ export interface IBuildOptions { export type TestMatch = object | null -export default class Path { +export class Path { public static createPath(path) { return new Path(path) } @@ -292,3 +292,5 @@ export default class Path { }, {}) } } + +export default Path diff --git a/typings/Path.d.ts b/typings/Path.d.ts index a87dbb5..c44a0d6 100644 --- a/typings/Path.d.ts +++ b/typings/Path.d.ts @@ -16,7 +16,7 @@ export interface IBuildOptions { queryParams?: IOptions; } export declare type TestMatch = object | null; -export default class Path { +export declare class Path { static createPath(path: any): Path; path: string; tokens: IToken[]; @@ -37,3 +37,4 @@ export default class Path { private getParams(type); private urlTest(path, source, {caseSensitive}?); } +export default Path;