Skip to content

Commit

Permalink
refactor: add named export
Browse files Browse the repository at this point in the history
  • Loading branch information
troch committed Mar 27, 2018
1 parent d0d40db commit 59f43c5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
5 changes: 4 additions & 1 deletion dist/cjs/path-parser.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var searchParams = require('search-params');

/*! *****************************************************************************
Expand Down Expand Up @@ -297,4 +299,5 @@ var Path = /** @class */ (function () {
return Path;
}());

module.exports = Path;
exports.Path = Path;
exports.default = Path;
1 change: 1 addition & 0 deletions dist/es/path-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,3 +296,4 @@ var Path = /** @class */ (function () {
}());

export default Path;
export { Path };
4 changes: 3 additions & 1 deletion modules/Path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -292,3 +292,5 @@ export default class Path {
}, {})
}
}

export default Path
3 changes: 2 additions & 1 deletion typings/Path.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[];
Expand All @@ -37,3 +37,4 @@ export default class Path {
private getParams(type);
private urlTest(path, source, {caseSensitive}?);
}
export default Path;

0 comments on commit 59f43c5

Please sign in to comment.