Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

history: Update PathUtils for 4.6.2 #17351

Merged
merged 3 commits into from
Jun 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion types/history/PathUtils.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { Path, Location, LocationDescriptorObject } from './index';

export function addLeadingSlash(path: Path): Path;
export function stripLeadingSlash(path: Path): Path;
export function stripPrefix(path: Path, prefix: string): Path;
export function hasBasename(path: Path): boolean;
export function stripBasename(path: Path, prefix: string): Path;
export function stripTrailingSlash(path: Path): Path;
export function parsePath(path: Path): Location;
export function createPath(location: LocationDescriptorObject): Path;
2 changes: 1 addition & 1 deletion types/history/history-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ let input = { value: "" };

{
let path = PathUtils.createPath({ pathname: '/a/path', hash: '#hash' });
let strippedPath = PathUtils.stripPrefix(path, '/a/');
let strippedPath = PathUtils.stripBasename(path, '/a/');
let location = PathUtils.parsePath(strippedPath);
}

Expand Down
2 changes: 1 addition & 1 deletion types/history/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Type definitions for history 4.5
// Type definitions for history 4.6.2
// Project: https://github.com/mjackson/history
// Definitions by: Sergey Buturlakin <https://github.com/sergey-buturlakin>, Nathan Brown <https://github.com/ngbrown>, Young Rok Kim <https://github.com/rokoroku>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
Expand Down