-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(fast-path-parse): typings, jsdoc and other typings fixes
- Loading branch information
Showing
10 changed files
with
57 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
/** | ||
* Compiles an route path for fastest validation | ||
* @param path A path to be compiled | ||
* @returns Optimized function which validate params at runtime | ||
* @example | ||
* ```ts | ||
* import compile from 'fast-path-parser/aot/match'; | ||
* | ||
* const pathMatch = compile('/user/:id'); | ||
* pathMatch('/user/123') // returns `true` | ||
* ``` | ||
*/ | ||
function match(path: string): (pathname: string) => boolean; | ||
|
||
export = match; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
/** | ||
* Prepares an route path for validating | ||
* @param path A path to be compiled | ||
* @returns Function which validates runtime | ||
* @example | ||
* ```ts | ||
* import match from 'fast-path-parser/runtime/match'; | ||
* | ||
* const pathMatch = match('/user/:id'); | ||
* pathMatch('/user/123') // returns `true` | ||
* ``` | ||
*/ | ||
function match(path: string): (pathname: string) => boolean; | ||
|
||
export = match; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters