-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Link + helper files to Typescript (#1023)
* feat: port createMatchEnhancer * feat: port Link * feat: resolveRenderArgs to TS * feat: getRenderArgs, ResolverUtils to TS * rm comments * rm activeClassname default arg * rm Link type guard
- Loading branch information
Showing
8 changed files
with
130 additions
and
71 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
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import resolveRenderArgs, { ResolveRender } from './resolveRenderArgs'; | ||
import { Router } from './typeUtils'; | ||
|
||
export default async function getRenderArgs( | ||
router: Router, | ||
props: any, | ||
): Promise<ResolveRender> { | ||
let elements; | ||
|
||
for await (elements of resolveRenderArgs(router, props)) { | ||
// Nothing to do here. We just need the last value from the iterable. | ||
} | ||
|
||
return elements as ResolveRender; | ||
} |
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
Oops, something went wrong.